Moved custom theme in AprilFoolsManager.js

这个提交包含在:
keplyx 2020-03-08 13:29:43 +01:00
父节点 52131ac401
当前提交 bcdd1f9875
共有 2 个文件被更改,包括 22 次插入22 次删除

查看文件

@ -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;
} }

查看文件

@ -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()
} }