Updated Themes and Themeselector
This commit is contained in:
parent
d60c6ca3b5
commit
f15b98d09a
2 changed files with 7 additions and 3 deletions
|
@ -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',
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue