forked from mirror/misskey
feat: classicモードでテーマが自動変更された際元に戻すように (#9669)
* feat: classicモードでテーマが自動変更された際元に戻すように * docs: update CHANGELOG.md * fix: prefixを miux:ui_temp から ui_temp に変更
This commit is contained in:
parent
b2ed4c9508
commit
7190bd00c9
@ -9,6 +9,11 @@
|
|||||||
You should also include the user name that made the change.
|
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)
|
## 13.2.4 (2023/01/27)
|
||||||
### Improvements
|
### Improvements
|
||||||
- リモートカスタム絵文字表示時のパフォーマンスを改善
|
- リモートカスタム絵文字表示時のパフォーマンスを改善
|
||||||
|
@ -18,6 +18,7 @@ type Keys =
|
|||||||
'useSystemFont' |
|
'useSystemFont' |
|
||||||
'fontSize' |
|
'fontSize' |
|
||||||
'ui' |
|
'ui' |
|
||||||
|
'ui_temp' |
|
||||||
'locale' |
|
'locale' |
|
||||||
'localeVersion' |
|
'localeVersion' |
|
||||||
'theme' |
|
'theme' |
|
||||||
|
@ -124,6 +124,8 @@ function onAiClick(ev) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (window.innerWidth < 1024) {
|
if (window.innerWidth < 1024) {
|
||||||
|
const currentUI = miLocalStorage.getItem('ui')
|
||||||
|
miLocalStorage.setItem('ui_temp', currentUI || 'default');
|
||||||
miLocalStorage.setItem('ui', 'default');
|
miLocalStorage.setItem('ui', 'default');
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,15 @@ mainRouter.on('change', () => {
|
|||||||
|
|
||||||
document.documentElement.style.overflowY = 'scroll';
|
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(() => {
|
defaultStore.ready.then(() => {
|
||||||
if (defaultStore.state.widgets.length === 0) {
|
if (defaultStore.state.widgets.length === 0) {
|
||||||
defaultStore.set('widgets', [{
|
defaultStore.set('widgets', [{
|
||||||
|
Loading…
Reference in New Issue
Block a user