Moved custom theme in AprilFoolsManager.js

This commit is contained in:
keplyx 2020-03-08 13:29:43 +01:00
parent 52131ac401
commit bcdd1f9875
2 changed files with 22 additions and 22 deletions

View file

@ -49,6 +49,27 @@ export default class AprilFoolsManager {
return menu; return menu;
} }
static getAprilFoolsTheme(currentTheme : Object) {
return {
...currentTheme,
colors: {
...currentTheme.colors,
primary: '#bebe03',
accent: '#bebe03',
background: '#5b3e02',
tabBackground: "#5b3e02",
card: "#5b3e02",
surface: "#5b3e02",
dividerBackground: '#362201',
textDisabled: '#b9b9b9',
// Calendar/Agenda
agendaBackgroundColor: '#5b3e02',
agendaDayTextColor: '#6d6d6d',
},
};
}
isAprilFoolsEnabled() { isAprilFoolsEnabled() {
return this.aprilFoolsEnabled; return this.aprilFoolsEnabled;
} }

View file

@ -93,27 +93,6 @@ export default class ThemeManager {
}; };
} }
static getAprilFoolsTheme() {
return {
...ThemeManager.getBaseTheme(),
colors: {
...ThemeManager.getBaseTheme().colors,
primary: '#bebe03',
accent: '#bebe03',
background: '#5b3e02',
tabBackground: "#5b3e02",
card: "#5b3e02",
surface: "#5b3e02",
dividerBackground: '#362201',
textDisabled: '#b9b9b9',
// Calendar/Agenda
agendaBackgroundColor: '#5b3e02',
agendaDayTextColor: '#6d6d6d',
},
};
}
/** /**
* Get this class instance or create one if none is found * Get this class instance or create one if none is found
* @returns {ThemeManager} * @returns {ThemeManager}
@ -137,7 +116,7 @@ export default class ThemeManager {
*/ */
static getCurrentTheme(): Object { static getCurrentTheme(): Object {
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled()) if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
return ThemeManager.getAprilFoolsTheme(); return AprilFoolsManager.getAprilFoolsTheme(ThemeManager.getBaseTheme());
else else
return ThemeManager.getBaseTheme() return ThemeManager.getBaseTheme()
} }