Move system theme option out from store

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

No files matched your search

@@ -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"
+1 -5
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() {