enhance(frontend): ウィジェットもpreference管理に

This commit is contained in:
syuilo
2025-03-09 15:13:49 +09:00
parent 2918fb2609
commit 69eee9f050
8 changed files with 57 additions and 61 deletions

View File

@@ -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', () => {