mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
Merge branch 'dev'
This commit is contained in:
commit
aa449b0ab7
3 changed files with 13 additions and 2 deletions
|
@ -108,6 +108,7 @@ async function init() {
|
||||||
noPersist: true,
|
noPersist: true,
|
||||||
onClick: relaunch
|
onClick: relaunch
|
||||||
}), 10_000);
|
}), 10_000);
|
||||||
|
if (Settings.autoUpdateRelaunch) return relaunch;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@ import plugins from "~plugins";
|
||||||
const logger = new Logger("Settings");
|
const logger = new Logger("Settings");
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
autoUpdate: boolean;
|
autoUpdate: boolean;
|
||||||
autoUpdateNotification: boolean,
|
autoUpdateRelaunch: boolean;
|
||||||
|
autoUpdateNotification: boolean;
|
||||||
useQuickCss: boolean;
|
useQuickCss: boolean;
|
||||||
enableReactDevtools: boolean;
|
enableReactDevtools: boolean;
|
||||||
themeLinks: string[];
|
themeLinks: string[];
|
||||||
|
@ -87,6 +88,7 @@ export interface Settings {
|
||||||
|
|
||||||
const DefaultSettings: Settings = {
|
const DefaultSettings: Settings = {
|
||||||
autoUpdate: true,
|
autoUpdate: true,
|
||||||
|
autoUpdateRelaunch: false,
|
||||||
autoUpdateNotification: true,
|
autoUpdateNotification: true,
|
||||||
useQuickCss: true,
|
useQuickCss: true,
|
||||||
themeLinks: [],
|
themeLinks: [],
|
||||||
|
|
|
@ -189,7 +189,7 @@ function Newer(props: CommonProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function Updater() {
|
function Updater() {
|
||||||
const settings = useSettings(["autoUpdate", "autoUpdateNotification"]);
|
const settings = useSettings(["autoUpdate", "autoUpdateRelaunch", "autoUpdateNotification"]);
|
||||||
|
|
||||||
const [repo, err, repoPending] = useAwaiter(getRepo, { fallbackValue: "Loading..." });
|
const [repo, err, repoPending] = useAwaiter(getRepo, { fallbackValue: "Loading..." });
|
||||||
|
|
||||||
|
@ -221,6 +221,14 @@ function Updater() {
|
||||||
>
|
>
|
||||||
Get notified when an automatic update completes
|
Get notified when an automatic update completes
|
||||||
</Switch>
|
</Switch>
|
||||||
|
<Switch
|
||||||
|
value={settings.autoUpdateRelaunch}
|
||||||
|
onChange={(v: boolean) => settings.autoUpdateRelaunch = v}
|
||||||
|
note="Relaunch's the app after automatically updating with no prompt"
|
||||||
|
disabled={!settings.autoUpdate}
|
||||||
|
>
|
||||||
|
When automatically updating relaunch as well without a prompt
|
||||||
|
</Switch>
|
||||||
|
|
||||||
<Forms.FormTitle tag="h5">Repo</Forms.FormTitle>
|
<Forms.FormTitle tag="h5">Repo</Forms.FormTitle>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue