diff --git a/CHANGELOG.md b/CHANGELOG.md index e767c15df4..e236006afb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ You should also include the user name that made the change. --> +## 13.x.x (unreleased) + +### Bugfixes +- Client: classicモード使用時にwindowサイズによってdefaultに変更された後に、windowサイズが元に戻ったらclassicに戻すように修正 #9669 + ## 13.2.4 (2023/01/27) ### Improvements - リモートカスタム絵文字表示時のパフォーマンスを改善 diff --git a/packages/frontend/src/local-storage.ts b/packages/frontend/src/local-storage.ts index 68dc9ebe41..e6b828696c 100644 --- a/packages/frontend/src/local-storage.ts +++ b/packages/frontend/src/local-storage.ts @@ -18,6 +18,7 @@ type Keys = 'useSystemFont' | 'fontSize' | 'ui' | + 'ui_temp' | 'locale' | 'localeVersion' | 'theme' | diff --git a/packages/frontend/src/ui/classic.vue b/packages/frontend/src/ui/classic.vue index dab4b9b274..a5c2f8ca23 100644 --- a/packages/frontend/src/ui/classic.vue +++ b/packages/frontend/src/ui/classic.vue @@ -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(); } diff --git a/packages/frontend/src/ui/universal.vue b/packages/frontend/src/ui/universal.vue index babc232875..a9bb85ab6a 100644 --- a/packages/frontend/src/ui/universal.vue +++ b/packages/frontend/src/ui/universal.vue @@ -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', [{