refactor
This commit is contained in:
parent
ce6b2448ce
commit
1c9e25470a
|
@ -46,7 +46,16 @@ export const PREF_DEF = {
|
||||||
},
|
},
|
||||||
widgets: {
|
widgets: {
|
||||||
accountDependent: true,
|
accountDependent: true,
|
||||||
default: [] as {
|
default: [{
|
||||||
|
name: 'calendar',
|
||||||
|
id: 'a', place: 'right', data: {},
|
||||||
|
}, {
|
||||||
|
name: 'notifications',
|
||||||
|
id: 'b', place: 'right', data: {},
|
||||||
|
}, {
|
||||||
|
name: 'trends',
|
||||||
|
id: 'c', place: 'right', data: {},
|
||||||
|
}] as {
|
||||||
name: string;
|
name: string;
|
||||||
id: string;
|
id: string;
|
||||||
place: string | null;
|
place: string | null;
|
||||||
|
|
|
@ -144,19 +144,6 @@ if (window.innerWidth < 1024) {
|
||||||
|
|
||||||
document.documentElement.style.overflowY = 'scroll';
|
document.documentElement.style.overflowY = 'scroll';
|
||||||
|
|
||||||
if (prefer.s.widgets.length === 0) {
|
|
||||||
prefer.commit('widgets', [{
|
|
||||||
name: 'calendar',
|
|
||||||
id: 'a', place: null, data: {},
|
|
||||||
}, {
|
|
||||||
name: 'notifications',
|
|
||||||
id: 'b', place: null, data: {},
|
|
||||||
}, {
|
|
||||||
name: 'trends',
|
|
||||||
id: 'c', place: null, data: {},
|
|
||||||
}]);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
isDesktop.value = (window.innerWidth >= DESKTOP_THRESHOLD);
|
isDesktop.value = (window.innerWidth >= DESKTOP_THRESHOLD);
|
||||||
|
|
|
@ -178,19 +178,6 @@ if (window.innerWidth > 1024) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prefer.s.widgets.length === 0) {
|
|
||||||
prefer.commit('widgets', [{
|
|
||||||
name: 'calendar',
|
|
||||||
id: 'a', place: 'right', data: {},
|
|
||||||
}, {
|
|
||||||
name: 'notifications',
|
|
||||||
id: 'b', place: 'right', data: {},
|
|
||||||
}, {
|
|
||||||
name: 'trends',
|
|
||||||
id: 'c', place: 'right', data: {},
|
|
||||||
}]);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!isDesktop.value) {
|
if (!isDesktop.value) {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
|
|
Loading…
Reference in New Issue