mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 09:33:03 -04:00
Add in client updater, Notices API
This commit is contained in:
parent
9aaa47ea4e
commit
8161a07dba
20 changed files with 525 additions and 48 deletions
|
@ -4,6 +4,7 @@ import { React } from "../webpack/common";
|
|||
import { mergeDefaults } from '../utils/misc';
|
||||
|
||||
interface Settings {
|
||||
notifyAboutUpdates: boolean;
|
||||
unsafeRequire: boolean;
|
||||
useQuickCss: boolean;
|
||||
plugins: {
|
||||
|
@ -15,10 +16,11 @@ interface Settings {
|
|||
}
|
||||
|
||||
const DefaultSettings: Settings = {
|
||||
notifyAboutUpdates: true,
|
||||
unsafeRequire: false,
|
||||
useQuickCss: true,
|
||||
plugins: {}
|
||||
} as any;
|
||||
};
|
||||
|
||||
for (const plugin in plugins) {
|
||||
DefaultSettings.plugins[plugin] = {
|
||||
|
@ -77,7 +79,7 @@ export const Settings = makeProxy(settings);
|
|||
* @returns Settings
|
||||
*/
|
||||
export function useSettings() {
|
||||
const [, forceUpdate] = React.useReducer(x => ({}), {});
|
||||
const [, forceUpdate] = React.useReducer(() => ({}), {});
|
||||
|
||||
React.useEffect(() => {
|
||||
subscriptions.add(forceUpdate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue