mirror of
https://github.com/kokonect-link/cherrypick
synced 2025-01-23 02:04:33 +09:00
tweak 36c922fb
This commit is contained in:
parent
301876cf8b
commit
28b92056c2
@ -66,6 +66,8 @@ export async function common(createVue: () => App<Element>) {
|
||||
let isClientMigrated = false;
|
||||
const showPushNotificationDialog = miLocalStorage.getItem('showPushNotificationDialog');
|
||||
|
||||
if (miLocalStorage.getItem('ui') === null) miLocalStorage.setItem('ui', 'friendly');
|
||||
|
||||
if (instance.swPublickey && ('PushManager' in window) && $i && $i.token && showPushNotificationDialog == null) {
|
||||
popup(defineAsyncComponent(() => import('@/components/MkPushNotification.vue')), {}, {}, 'closed');
|
||||
}
|
||||
|
@ -87,6 +87,9 @@ import { defaultStore } from '@/store.js';
|
||||
import { reloadAsk } from '@/scripts/reload-ask.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
|
||||
const isFriendly = ref(miLocalStorage.getItem('ui') === 'friendly');
|
||||
|
||||
const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
||||
|
||||
@ -152,11 +155,11 @@ function reset() {
|
||||
}
|
||||
|
||||
function resetButtomNavbar() {
|
||||
defaultStore.set('showHomeButtonInNavbar', true);
|
||||
defaultStore.set('showExploreButtonInNavbar', true);
|
||||
defaultStore.set('showHomeButtonInNavbar', !isFriendly.value);
|
||||
defaultStore.set('showExploreButtonInNavbar', isFriendly.value);
|
||||
defaultStore.set('showSearchButtonInNavbar', false);
|
||||
defaultStore.set('showNotificationButtonInNavbar', true);
|
||||
defaultStore.set('showMessageButtonInNavbar', true);
|
||||
defaultStore.set('showMessageButtonInNavbar', isFriendly.value);
|
||||
defaultStore.set('showWidgetButtonInNavbar', true);
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,8 @@ export const noteViewInterruptors: NoteViewInterruptor[] = [];
|
||||
export const notePostInterruptors: NotePostInterruptor[] = [];
|
||||
export const pageViewInterruptors: PageViewInterruptor[] = [];
|
||||
|
||||
const isFriendly = ref(miLocalStorage.getItem('ui') === 'friendly');
|
||||
|
||||
// TODO: それぞれいちいちwhereとかdefaultというキーを付けなきゃいけないの冗長なのでなんとかする(ただ型定義が面倒になりそう)
|
||||
// あと、現行の定義の仕方なら「whereが何であるかに関わらずキー名の重複不可」という制約を付けられるメリットもあるからそのメリットを引き継ぐ方法も考えないといけない
|
||||
export const defaultStore = markRaw(new Storage('base', {
|
||||
@ -658,7 +660,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
// - Settings/Navigation bar
|
||||
showMenuButtonInNavbar: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
default: !isFriendly.value,
|
||||
},
|
||||
showHomeButtonInNavbar: {
|
||||
where: 'device',
|
||||
@ -666,7 +668,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
},
|
||||
showExploreButtonInNavbar: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
default: isFriendly.value,
|
||||
},
|
||||
showSearchButtonInNavbar: {
|
||||
where: 'device',
|
||||
@ -678,7 +680,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
},
|
||||
showMessageButtonInNavbar: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
default: isFriendly.value,
|
||||
},
|
||||
showWidgetButtonInNavbar: {
|
||||
where: 'device',
|
||||
|
Loading…
Reference in New Issue
Block a user