Storage improve (#6976)
* wip
* wip
* wip
* wip
* wip
* Update storage.ts
* wip
* wip
* wip
* wip
* Update storage.ts
* Update storage.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update storage.ts
* wip
* wip
* wip
* wip
* 🍕
* wip
* wip
* wip
* wip
* wip
* wip
* Update deck-storage.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update store.ts
* wip
* wip
* wip
* wip
* Update init.ts
* wip
* wip
* Update pizzax.ts
* wip
* wip
* Update timeline.vue
* Update init.ts
* wip
* wip
* Update init.ts
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
<main ref="main">
|
||||
<div class="content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition :name="$store.state.device.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
|
||||
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
|
||||
<keep-alive :include="['timeline']">
|
||||
<component :is="Component" :ref="changePage"/>
|
||||
</keep-alive>
|
||||
@ -31,7 +31,7 @@
|
||||
<button class="button nav _button" @click="showNav" ref="navButton"><Fa :icon="faBars"/><i v-if="navIndicated"><Fa :icon="faCircle"/></i></button>
|
||||
<button v-if="$route.name === 'index'" class="button home _button" @click="top()"><Fa :icon="faHome"/></button>
|
||||
<button v-else class="button home _button" @click="$router.push('/')"><Fa :icon="faHome"/></button>
|
||||
<button class="button notifications _button" @click="$router.push('/my/notifications')"><Fa :icon="faBell"/><i v-if="$store.state.i.hasUnreadNotification"><Fa :icon="faCircle"/></i></button>
|
||||
<button class="button notifications _button" @click="$router.push('/my/notifications')"><Fa :icon="faBell"/><i v-if="$i.hasUnreadNotification"><Fa :icon="faCircle"/></i></button>
|
||||
<button class="button widget _button" @click="widgetsShowing = true"><Fa :icon="faLayerGroup"/></button>
|
||||
</div>
|
||||
|
||||
@ -66,6 +66,7 @@ import XHeader from './_common_/header.vue';
|
||||
import XSide from './default.side.vue';
|
||||
import * as os from '@/os';
|
||||
import { sidebarDef } from '@/sidebar';
|
||||
import { ColdDeviceStorage } from '@/store';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
|
||||
@ -104,8 +105,8 @@ export default defineComponent({
|
||||
keymap(): any {
|
||||
return {
|
||||
'd': () => {
|
||||
if (this.$store.state.device.syncDeviceDarkMode) return;
|
||||
this.$store.commit('device/set', { key: 'darkMode', value: !this.$store.state.device.darkMode });
|
||||
if (ColdDeviceStorage.get('syncDeviceDarkMode')) return;
|
||||
this.$store.set('darkMode', !this.$store.state.darkMode);
|
||||
},
|
||||
'p': os.post,
|
||||
'n': os.post,
|
||||
@ -114,14 +115,6 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
|
||||
widgets(): any {
|
||||
return this.$store.state.deviceUser.widgets;
|
||||
},
|
||||
|
||||
menu(): string[] {
|
||||
return this.$store.state.deviceUser.menu;
|
||||
},
|
||||
|
||||
navIndicated(): boolean {
|
||||
for (const def in this.menuDef) {
|
||||
if (def === 'notifications') continue; // 通知は下にボタンとして表示されてるから
|
||||
@ -140,8 +133,8 @@ export default defineComponent({
|
||||
created() {
|
||||
document.documentElement.style.overflowY = 'scroll';
|
||||
|
||||
if (this.$store.state.deviceUser.widgets.length === 0) {
|
||||
this.$store.commit('deviceUser/setWidgets', [{
|
||||
if (this.$store.state.widgets.length === 0) {
|
||||
this.$store.set('widgets', [{
|
||||
name: 'calendar',
|
||||
id: 'a', place: 'right', data: {}
|
||||
}, {
|
||||
|
Reference in New Issue
Block a user