Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
viewModel: {
parent: null,
- data: {
- language: '__default__',
- },
+ data: {},
},
controller: {
xclass: 'Ext.app.ViewController',
init: function(view) {
- let theme = Ext.util.Cookies.get(view.cookieName) || '__default__';
+ let theme = '__default__';
+
+ let savedTheme = Ext.util.Cookies.get(view.cookieName);
+ if (savedTheme && savedTheme in Proxmox.Utils.theme_map) {
+ theme = savedTheme;
+ }
this.getViewModel().set('theme', theme);
},
applyTheme: function(button) {