diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-21 15:02:18 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-21 15:02:18 +0300 |
| commit | 660e5ad101e41dffa94c5775491108f359cd8359 (patch) | |
| tree | dfd5fe07d7c7b038dd48b8d7607a6f062e944869 /web/html/xui/component | |
| parent | aebf52efb22a64ac2b0ba203dd41b7523b7d998c (diff) | |
[dark] change message by theme
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui/component')
| -rw-r--r-- | web/html/xui/component/themeSwitch.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/html/xui/component/themeSwitch.html b/web/html/xui/component/themeSwitch.html index 3bc1ad7d..9ca080d9 100644 --- a/web/html/xui/component/themeSwitch.html +++ b/web/html/xui/component/themeSwitch.html @@ -21,6 +21,7 @@ this.isDarkTheme = !this.isDarkTheme; localStorage.setItem('dark-mode', this.isDarkTheme); document.querySelector('body').setAttribute('class', this.isDarkTheme ? 'dark' : 'light') + document.getElementById('message').className = themeSwitcher.currentTheme; }, }; } @@ -31,6 +32,10 @@ props: [], template: `{{template "component/themeSwitchTemplate"}}`, data: () => ({ themeSwitcher }), + mounted() { + this.$message.config({getContainer: () => document.getElementById('message')}); + document.getElementById('message').className = themeSwitcher.currentTheme; + } }); </script> {{end}}
\ No newline at end of file |
