Updated Themes and Themeselector

This commit is contained in:
Neshura 2022-12-15 23:41:48 +01:00
parent d60c6ca3b5
commit f15b98d09a
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A
2 changed files with 7 additions and 3 deletions

View file

@ -29,7 +29,7 @@ export const lightTheme: DefaultTheme = {
colors: { colors: {
background: '#ffffff', background: '#ffffff',
primary: '#00aaff', primary: '#00aaff',
secondary:'#ffaa00', secondary:'#ff5300',
online: '#00ff00', online: '#00ff00',
loading: '#ff5300', loading: '#ff5300',
offline: '#ff0000', offline: '#ff0000',
@ -42,7 +42,7 @@ export const darkTheme: DefaultTheme = {
colors: { colors: {
background: '#1f1f1f', background: '#1f1f1f',
primary: '#00aaff', primary: '#00aaff',
secondary:'#ffaa00', secondary:'#ff5300',
online: '#00ff00', online: '#00ff00',
loading: '#ff5300', loading: '#ff5300',
offline: '#ff0000', offline: '#ff0000',
@ -55,7 +55,7 @@ export const amoledTheme: DefaultTheme = {
colors: { colors: {
background: '#000000', background: '#000000',
primary: '#00aaff', primary: '#00aaff',
secondary:'#ffaa00', secondary:'#ff5300',
online: '#00ff00', online: '#00ff00',
loading: '#ff5300', loading: '#ff5300',
offline: '#ff0000', offline: '#ff0000',

View file

@ -16,6 +16,10 @@ export const StyleSelector = () => {
const currentTheme = useContext(ThemeContext); const currentTheme = useContext(ThemeContext);
const [selectedTheme, setSelectedTheme] = useState(themes[currentTheme.themeId]); const [selectedTheme, setSelectedTheme] = useState(themes[currentTheme.themeId]);
if(currentTheme !== selectedTheme) {
setSelectedTheme(currentTheme);
}
const updateThemeWithStorage = (newTheme: DefaultTheme) => { const updateThemeWithStorage = (newTheme: DefaultTheme) => {
if (newTheme.themeId === lightTheme.themeId) { if (newTheme.themeId === lightTheme.themeId) {