feat: classicモードでテーマが自動変更された際元に戻すように (#9669)
* feat: classicモードでテーマが自動変更された際元に戻すように * docs: update CHANGELOG.md * fix: prefixを miux:ui_temp から ui_temp に変更
This commit is contained in:
@@ -18,6 +18,7 @@ type Keys =
|
||||
'useSystemFont' |
|
||||
'fontSize' |
|
||||
'ui' |
|
||||
'ui_temp' |
|
||||
'locale' |
|
||||
'localeVersion' |
|
||||
'theme' |
|
||||
|
@@ -124,6 +124,8 @@ function onAiClick(ev) {
|
||||
}
|
||||
|
||||
if (window.innerWidth < 1024) {
|
||||
const currentUI = miLocalStorage.getItem('ui')
|
||||
miLocalStorage.setItem('ui_temp', currentUI || 'default');
|
||||
miLocalStorage.setItem('ui', 'default');
|
||||
location.reload();
|
||||
}
|
||||
|
@@ -141,6 +141,15 @@ mainRouter.on('change', () => {
|
||||
|
||||
document.documentElement.style.overflowY = 'scroll';
|
||||
|
||||
if (window.innerWidth > 1024) {
|
||||
const tempUI = miLocalStorage.getItem('ui_temp')
|
||||
if (tempUI) {
|
||||
miLocalStorage.setItem('ui', tempUI)
|
||||
miLocalStorage.removeItem('ui_temp')
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
defaultStore.ready.then(() => {
|
||||
if (defaultStore.state.widgets.length === 0) {
|
||||
defaultStore.set('widgets', [{
|
||||
|
Reference in New Issue
Block a user