mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 02:43:33 +00:00
move update settings to advanced tab
This commit is contained in:
parent
912aea8174
commit
9f8d9a5b28
3 changed files with 6 additions and 6 deletions
|
|
@ -1,9 +1,11 @@
|
||||||
import { StylesSettings } from '/@/renderer/features/settings/components/advanced/styles-settings';
|
import { StylesSettings } from '/@/renderer/features/settings/components/advanced/styles-settings';
|
||||||
|
import { UpdateSettings } from '/@/renderer/features/settings/components/window/update-settings';
|
||||||
import { Stack } from '/@/shared/components/stack/stack';
|
import { Stack } from '/@/shared/components/stack/stack';
|
||||||
|
|
||||||
export const AdvancedTab = () => {
|
export const AdvancedTab = () => {
|
||||||
return (
|
return (
|
||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
|
<UpdateSettings />
|
||||||
<StylesSettings />
|
<StylesSettings />
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import { Select } from '/@/shared/components/select/select';
|
||||||
import { Switch } from '/@/shared/components/switch/switch';
|
import { Switch } from '/@/shared/components/switch/switch';
|
||||||
|
|
||||||
const localSettings = isElectron() ? window.api.localSettings : null;
|
const localSettings = isElectron() ? window.api.localSettings : null;
|
||||||
const utils = isElectron() ? window.api.utils : null;
|
|
||||||
|
|
||||||
export const UpdateSettings = () => {
|
export const UpdateSettings = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
@ -37,7 +36,9 @@ export const UpdateSettings = () => {
|
||||||
value: 'beta',
|
value: 'beta',
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
defaultValue={'latest'}
|
defaultValue={
|
||||||
|
(localSettings?.get('release_channel') as string | undefined) || 'latest'
|
||||||
|
}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
if (!value) return;
|
if (!value) return;
|
||||||
localSettings?.set('release_channel', value);
|
localSettings?.set('release_channel', value);
|
||||||
|
|
@ -48,7 +49,6 @@ export const UpdateSettings = () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
value={settings.releaseChannel}
|
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
description: t('setting.releaseChannel', {
|
description: t('setting.releaseChannel', {
|
||||||
|
|
@ -85,5 +85,5 @@ export const UpdateSettings = () => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return <SettingsSection divider={utils?.isLinux()} options={updateOptions} />;
|
return <SettingsSection divider={true} options={updateOptions} />;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import isElectron from 'is-electron';
|
||||||
|
|
||||||
import { DiscordSettings } from '/@/renderer/features/settings/components/window/discord-settings';
|
import { DiscordSettings } from '/@/renderer/features/settings/components/window/discord-settings';
|
||||||
import { PasswordSettings } from '/@/renderer/features/settings/components/window/password-settings';
|
import { PasswordSettings } from '/@/renderer/features/settings/components/window/password-settings';
|
||||||
import { UpdateSettings } from '/@/renderer/features/settings/components/window/update-settings';
|
|
||||||
import { WindowSettings } from '/@/renderer/features/settings/components/window/window-settings';
|
import { WindowSettings } from '/@/renderer/features/settings/components/window/window-settings';
|
||||||
import { Stack } from '/@/shared/components/stack/stack';
|
import { Stack } from '/@/shared/components/stack/stack';
|
||||||
|
|
||||||
|
|
@ -13,7 +12,6 @@ export const WindowTab = () => {
|
||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
<WindowSettings />
|
<WindowSettings />
|
||||||
<DiscordSettings />
|
<DiscordSettings />
|
||||||
<UpdateSettings />
|
|
||||||
{utils?.isLinux() && (
|
{utils?.isLinux() && (
|
||||||
<>
|
<>
|
||||||
<PasswordSettings />
|
<PasswordSettings />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue