summaryrefslogtreecommitdiff
path: root/packages/frontend/src/ui/classic.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-09 15:13:49 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-09 15:13:49 +0900
commit69eee9f05024776b1f3d4a16e9b52ced8b7152cd (patch)
treec96974e54e41e2a7ae7045a3c65081129f4cc817 /packages/frontend/src/ui/classic.vue
parentrefactor(frontend): relocate theme script (diff)
downloadmisskey-69eee9f05024776b1f3d4a16e9b52ced8b7152cd.tar.gz
misskey-69eee9f05024776b1f3d4a16e9b52ced8b7152cd.tar.bz2
misskey-69eee9f05024776b1f3d4a16e9b52ced8b7152cd.zip
enhance(frontend): ウィジェットもpreference管理に
Diffstat (limited to 'packages/frontend/src/ui/classic.vue')
-rw-r--r--packages/frontend/src/ui/classic.vue26
1 files changed, 12 insertions, 14 deletions
diff --git a/packages/frontend/src/ui/classic.vue b/packages/frontend/src/ui/classic.vue
index abe612ab3e..12791dba30 100644
--- a/packages/frontend/src/ui/classic.vue
+++ b/packages/frontend/src/ui/classic.vue
@@ -143,20 +143,18 @@ if (window.innerWidth < 1024) {
document.documentElement.style.overflowY = 'scroll';
-store.loaded.then(() => {
- if (store.state.widgets.length === 0) {
- store.set('widgets', [{
- name: 'calendar',
- id: 'a', place: null, data: {},
- }, {
- name: 'notifications',
- id: 'b', place: null, data: {},
- }, {
- name: 'trends',
- id: 'c', place: null, data: {},
- }]);
- }
-});
+if (prefer.s.widgets.length === 0) {
+ prefer.set('widgets', [{
+ name: 'calendar',
+ id: 'a', place: null, data: {},
+ }, {
+ name: 'notifications',
+ id: 'b', place: null, data: {},
+ }, {
+ name: 'trends',
+ id: 'c', place: null, data: {},
+ }]);
+}
onMounted(() => {
window.addEventListener('resize', () => {