1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Move system theme option out from store

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-03-05 12:48:05 +03:00
parent 4114ad2c72
commit e9ad98b7c8
2 changed files with 5 additions and 6 deletions

View File

@ -45,7 +45,10 @@ const NonInjectedApplication: React.FC<Dependencies> = ({ appPreferenceItems })
<section id="appearance">
<SubTitle title="Theme" />
<Select
options={themeStore.themeOptions}
options={[
{ label: "Sync with computer", value: "system" },
...themeStore.themeOptions,
]}
value={userStore.colorTheme}
onChange={({ value }) => userStore.colorTheme = value}
themeName="lens"

View File

@ -70,14 +70,10 @@ export class ThemeStore extends Singleton {
}
@computed get themeOptions(): SelectOption<string>[] {
const options = Array.from(this.themes).map(([themeId, theme]) => ({
return Array.from(this.themes).map(([themeId, theme]) => ({
label: theme.name,
value: themeId,
}));
options.unshift({ label: "Sync with computer", value: "system" });
return options;
}
@computed get systemTheme() {