mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 00:49:17 +09:00
chore(client): tweak deck
This commit is contained in:
parent
4f0878e267
commit
135dfa8026
@ -31,16 +31,6 @@ const alwaysShowMainColumn = computed(deckStore.makeGetterSetter('alwaysShowMain
|
|||||||
const columnAlign = computed(deckStore.makeGetterSetter('columnAlign'));
|
const columnAlign = computed(deckStore.makeGetterSetter('columnAlign'));
|
||||||
const profile = computed(deckStore.makeGetterSetter('profile'));
|
const profile = computed(deckStore.makeGetterSetter('profile'));
|
||||||
|
|
||||||
watch(navWindow, async () => {
|
|
||||||
const { canceled } = await os.confirm({
|
|
||||||
type: 'info',
|
|
||||||
text: i18n.ts.reloadToApplySetting,
|
|
||||||
});
|
|
||||||
if (canceled) return;
|
|
||||||
|
|
||||||
unisonReload();
|
|
||||||
});
|
|
||||||
|
|
||||||
async function setProfile() {
|
async function setProfile() {
|
||||||
const { canceled, result: name } = await os.inputText({
|
const { canceled, result: name } = await os.inputText({
|
||||||
title: i18n.ts._deck.profile,
|
title: i18n.ts._deck.profile,
|
||||||
|
@ -79,12 +79,14 @@ import { i18n } from '@/i18n';
|
|||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue'));
|
const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue'));
|
||||||
|
|
||||||
if (deckStore.state.navWindow) {
|
mainRouter.navHook = (path): boolean => {
|
||||||
mainRouter.navHook = (path) => {
|
const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main');
|
||||||
|
if (deckStore.state.navWindow || noMainColumn) {
|
||||||
os.pageWindow(path);
|
os.pageWindow(path);
|
||||||
return true;
|
return true;
|
||||||
};
|
}
|
||||||
}
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
const isMobile = ref(window.innerWidth <= 500);
|
const isMobile = ref(window.innerWidth <= 500);
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
|
@ -13,7 +13,7 @@ type ColumnWidget = {
|
|||||||
|
|
||||||
export type Column = {
|
export type Column = {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: 'main' | 'widgets' | 'notifications' | 'tl' | 'antenna' | 'list' | 'mentions' | 'direct';
|
||||||
name: string | null;
|
name: string | null;
|
||||||
width: number;
|
width: number;
|
||||||
widgets?: ColumnWidget[];
|
widgets?: ColumnWidget[];
|
||||||
|
Loading…
Reference in New Issue
Block a user