mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-23 23:53:57 +00:00
theme edit: ensure that the saved theme is actually valid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
745aeaacdd
commit
5835bc4c10
@ -4,14 +4,17 @@ Ext.define('Proxmox.window.ThemeEditWindow', {
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user