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:
parent
4114ad2c72
commit
e9ad98b7c8
@ -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"
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user