diff --git a/public/theme-examples/dark.jpg b/public/theme-examples/dark.jpg new file mode 100644 index 00000000..5486b6b1 Binary files /dev/null and b/public/theme-examples/dark.jpg differ diff --git a/public/theme-examples/light.jpg b/public/theme-examples/light.jpg new file mode 100644 index 00000000..d1942952 Binary files /dev/null and b/public/theme-examples/light.jpg differ diff --git a/src/features/background/options/BackgroundOptions.jsx b/src/features/background/options/BackgroundOptions.jsx index 74c3e3f9..5a89d8c6 100644 --- a/src/features/background/options/BackgroundOptions.jsx +++ b/src/features/background/options/BackgroundOptions.jsx @@ -171,6 +171,62 @@ function BackgroundOptions() { ); + const EffectsOptions = () => ( + + + + + + + setBackgroundFilter(value)} + category="backgroundeffect" + element="#backgroundImage" + items={backgroundImageEffects} + /> + {backgroundFilter !== 'none' && ( + + )} + + + + ); + let backgroundSettings = APISettings; switch (backgroundType) { case 'custom': @@ -234,28 +290,6 @@ function BackgroundOptions() { {header} {subSection === '' ? ( <> - {/*
setBackgroundSettingsSection(true)}> -
- -
- - {variables.getMessage('settings:sections.background.source.title')} - - - {variables.getMessage('settings:sections.background.source.subtitle')} - -
-
-
- this.setState({ backgroundType: value })} - category="background" - items={getBackgroundOptionItems(marketplaceEnabled)} - /> -
-
*/}
- - - - - setBackgroundFilter(value)} - category="backgroundeffect" - element="#backgroundImage" - items={backgroundImageEffects} - /> - {backgroundFilter !== 'none' && ( - - )} - - + <>{EffectsOptions()} ) : null} ); diff --git a/src/features/misc/sections/Appearance.jsx b/src/features/misc/sections/Appearance.jsx index 9f92d647..78a799be 100644 --- a/src/features/misc/sections/Appearance.jsx +++ b/src/features/misc/sections/Appearance.jsx @@ -19,6 +19,7 @@ import values from 'utils/data/slider_values.json'; function AppearanceOptions() { const [accessibility, setAccessibility] = useState(false); + const [currentTheme, setCurrentTheme] = useState(localStorage.getItem('theme') || 'auto'); const { subSection } = useTab(); const ThemeSelection = () => { @@ -223,6 +224,58 @@ function AppearanceOptions() { ); }; + const newThemeSelector = (currentTheme) => { + const themes = [ + { + example: 'light.jpg', + name: variables.getMessage('settings:sections.appearance.theme.light'), + value: 'light', + }, + { + example: 'dark.jpg', + name: variables.getMessage('settings:sections.appearance.theme.dark'), + value: 'dark', + }, + { + example: 'light.jpg', + name: variables.getMessage('settings:sections.appearance.theme.auto'), + value: 'auto', + }, + ]; + + console.log(currentTheme); + + const ThemeCard = ({ example, name, value }) => { + return ( +
+ Light theme +
{name}
+
+ ); + }; + + return ( +
+

+ {variables.getMessage('settings:sections.appearance.theme.title')} +

+

+ {variables.getMessage('settings:sections.appearance.theme.description')} +

+
+ {themes.map((theme) => ( + + ))} +
+
+ ); + }; + let header; if (accessibility) { header = ( @@ -240,7 +293,7 @@ function AppearanceOptions() { } return ( <> - {header} + {/*{header}*/} {subSection === 'accessibility' ? ( ) : ( @@ -254,9 +307,14 @@ function AppearanceOptions() { icon={} onClick={() => setAccessibility(true)} /> + {newThemeSelector(currentTheme)} + + + +