refactor(frontend): rename pizzax fields
This commit is contained in:
@@ -105,7 +105,7 @@ const router = useRouter();
|
||||
|
||||
const forceIconOnly = ref(window.innerWidth <= 1279);
|
||||
const iconOnly = computed(() => {
|
||||
return forceIconOnly.value || (store.reactiveState.menuDisplay.value === 'sideIcon');
|
||||
return forceIconOnly.value || (store.r.menuDisplay.value === 'sideIcon');
|
||||
});
|
||||
|
||||
const menu = computed(() => prefer.s.menu);
|
||||
@@ -123,7 +123,7 @@ function calcViewState() {
|
||||
|
||||
window.addEventListener('resize', calcViewState);
|
||||
|
||||
watch(store.reactiveState.menuDisplay, () => {
|
||||
watch(store.r.menuDisplay, () => {
|
||||
calcViewState();
|
||||
});
|
||||
|
||||
|
@@ -100,7 +100,7 @@ function openAccountMenu(ev: MouseEvent) {
|
||||
}, ev);
|
||||
}
|
||||
|
||||
watch(store.reactiveState.menuDisplay, () => {
|
||||
watch(store.r.menuDisplay, () => {
|
||||
calcViewState();
|
||||
});
|
||||
|
||||
|
@@ -75,7 +75,7 @@ const widgetsShowing = ref(false);
|
||||
const fullView = ref(false);
|
||||
const globalHeaderHeight = ref(0);
|
||||
const wallpaper = miLocalStorage.getItem('wallpaper') != null;
|
||||
const showMenuOnTop = computed(() => store.state.menuDisplay === 'top');
|
||||
const showMenuOnTop = computed(() => store.s.menuDisplay === 'top');
|
||||
const live2d = shallowRef<HTMLIFrameElement>();
|
||||
const widgetsLeft = ref<HTMLElement>();
|
||||
const widgetsRight = ref<HTMLElement>();
|
||||
@@ -97,7 +97,7 @@ provide('shouldHeaderThin', showMenuOnTop.value);
|
||||
provide('forceSpacerMin', true);
|
||||
|
||||
function attachSticky(el: HTMLElement) {
|
||||
const sticky = new StickySidebar(el, 0, store.state.menuDisplay === 'top' ? 60 : 0); // TODO: ヘッダーの高さを60pxと決め打ちしているのを直す
|
||||
const sticky = new StickySidebar(el, 0, store.s.menuDisplay === 'top' ? 60 : 0); // TODO: ヘッダーの高さを60pxと決め打ちしているのを直す
|
||||
window.addEventListener('scroll', () => {
|
||||
sticky.calc(window.scrollY);
|
||||
}, { passive: true });
|
||||
|
@@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</div>
|
||||
<div :class="$style.sideMenu">
|
||||
<div :class="$style.sideMenuTop">
|
||||
<button v-tooltip.noDelay.left="`${i18n.ts._deck.profile}: ${store.state['deck.profile']}`" :class="$style.sideMenuButton" class="_button" @click="changeProfile"><i class="ti ti-caret-down"></i></button>
|
||||
<button v-tooltip.noDelay.left="`${i18n.ts._deck.profile}: ${store.s['deck.profile']}`" :class="$style.sideMenuButton" class="_button" @click="changeProfile"><i class="ti ti-caret-down"></i></button>
|
||||
<button v-tooltip.noDelay.left="i18n.ts._deck.deleteProfile" :class="$style.sideMenuButton" class="_button" @click="deleteProfile"><i class="ti ti-trash"></i></button>
|
||||
</div>
|
||||
<div :class="$style.sideMenuMiddle">
|
||||
@@ -137,7 +137,7 @@ const columnComponents = {
|
||||
|
||||
mainRouter.navHook = (path, flag): boolean => {
|
||||
if (flag === 'forcePage') return false;
|
||||
const noMainColumn = !store.state['deck.columns'].some(x => x.type === 'main');
|
||||
const noMainColumn = !store.s['deck.columns'].some(x => x.type === 'main');
|
||||
if (prefer.s['deck.navWindow'] || noMainColumn) {
|
||||
os.pageWindow(path);
|
||||
return true;
|
||||
@@ -160,8 +160,8 @@ watch(route, () => {
|
||||
});
|
||||
*/
|
||||
|
||||
const columns = store.reactiveState['deck.columns'];
|
||||
const layout = store.reactiveState['deck.layout'];
|
||||
const columns = store.r['deck.columns'];
|
||||
const layout = store.r['deck.layout'];
|
||||
const menuIndicated = computed(() => {
|
||||
if ($i == null) return false;
|
||||
for (const def in navbarItemDef) {
|
||||
@@ -214,12 +214,12 @@ loadDeck();
|
||||
|
||||
function changeProfile(ev: MouseEvent) {
|
||||
let items: MenuItem[] = [{
|
||||
text: store.state['deck.profile'],
|
||||
text: store.s['deck.profile'],
|
||||
active: true,
|
||||
action: () => {},
|
||||
}];
|
||||
getProfiles().then(profiles => {
|
||||
items.push(...(profiles.filter(k => k !== store.state['deck.profile']).map(k => ({
|
||||
items.push(...(profiles.filter(k => k !== store.s['deck.profile']).map(k => ({
|
||||
text: k,
|
||||
action: () => {
|
||||
store.set('deck.profile', k);
|
||||
@@ -252,17 +252,17 @@ function changeProfile(ev: MouseEvent) {
|
||||
async function deleteProfile() {
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'warning',
|
||||
text: i18n.tsx.deleteAreYouSure({ x: store.state['deck.profile'] }),
|
||||
text: i18n.tsx.deleteAreYouSure({ x: store.s['deck.profile'] }),
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
os.promiseDialog((async () => {
|
||||
if (store.state['deck.profile'] === 'default') {
|
||||
if (store.s['deck.profile'] === 'default') {
|
||||
await store.set('deck.columns', []);
|
||||
await store.set('deck.layout', []);
|
||||
await forceSaveDeck();
|
||||
} else {
|
||||
await deleteProfile_(store.state['deck.profile']);
|
||||
await deleteProfile_(store.s['deck.profile']);
|
||||
}
|
||||
await store.set('deck.profile', 'default');
|
||||
})(), () => {
|
||||
|
Reference in New Issue
Block a user