mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 10:01:53 +08:00
web: ui config
This commit is contained in:
@@ -346,6 +346,16 @@ export var tools = new function() {
|
||||
};
|
||||
};
|
||||
|
||||
self.config = new function() {
|
||||
return {
|
||||
"get": function(key, default_value) {
|
||||
let value = window.getComputedStyle(document.documentElement).getPropertyValue(`--config-ui--${key}`);
|
||||
return (value || default_value);
|
||||
},
|
||||
"getBool": (key, default_value) => !!parseInt(self.config.get(key, (default_value ? "1" : "0"))),
|
||||
};
|
||||
};
|
||||
|
||||
self.browser = browser;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user