mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-28 12:57:31 -07:00
Replace Deck UI "Default navigation behavior" switch with radio buttons
This commit is contained in:
parent
8069cedf8e
commit
d3b18dac5d
4 changed files with 9 additions and 7 deletions
|
@ -1127,6 +1127,7 @@ removeQuote: "Remove quote"
|
||||||
removeRecipient: "Remove recipient"
|
removeRecipient: "Remove recipient"
|
||||||
removeMember: "Remove member"
|
removeMember: "Remove member"
|
||||||
verifiedLink: "Verified link"
|
verifiedLink: "Verified link"
|
||||||
|
openInMainColumn: "Open in main column"
|
||||||
|
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "Reduces the effort of server moderation through automatically recognizing
|
description: "Reduces the effort of server moderation through automatically recognizing
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="_formRoot">
|
<div class="_formRoot">
|
||||||
<FormSwitch v-model="navWindow"
|
|
||||||
>{{ i18n.ts.defaultNavigationBehaviour }}:
|
|
||||||
{{ i18n.ts.openInWindow }}</FormSwitch
|
|
||||||
>
|
|
||||||
|
|
||||||
<FormSwitch v-model="alwaysShowMainColumn" class="_formBlock">{{
|
<FormSwitch v-model="alwaysShowMainColumn" class="_formBlock">{{
|
||||||
i18n.ts._deck.alwaysShowMainColumn
|
i18n.ts._deck.alwaysShowMainColumn
|
||||||
}}</FormSwitch>
|
}}</FormSwitch>
|
||||||
|
|
||||||
|
<FormRadios v-model="navWindow" class="_formBlock">
|
||||||
|
<template #label>{{ i18n.ts.defaultNavigationBehaviour }}</template>
|
||||||
|
<option value="window">{{ i18n.ts.openInWindow }}</option>
|
||||||
|
<option value="column">{{ i18n.ts.openInMainColumn }}</option>
|
||||||
|
</FormRadios>
|
||||||
|
|
||||||
<FormRadios v-model="columnAlign" class="_formBlock">
|
<FormRadios v-model="columnAlign" class="_formBlock">
|
||||||
<template #label>{{ i18n.ts._deck.columnAlign }}</template>
|
<template #label>{{ i18n.ts._deck.columnAlign }}</template>
|
||||||
<option value="left">{{ i18n.ts.left }}</option>
|
<option value="left">{{ i18n.ts.left }}</option>
|
||||||
|
|
|
@ -220,7 +220,7 @@ mainRouter.navHook = (path, flag): boolean => {
|
||||||
const noMainColumn = !deckStore.state.columns.some(
|
const noMainColumn = !deckStore.state.columns.some(
|
||||||
(x) => x.type === "main",
|
(x) => x.type === "main",
|
||||||
);
|
);
|
||||||
if (deckStore.state.navWindow || noMainColumn) {
|
if (deckStore.reactiveState.navWindow.value === "window" || noMainColumn) {
|
||||||
os.pageWindow(path);
|
os.pageWindow(path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ export const deckStore = markRaw(
|
||||||
},
|
},
|
||||||
navWindow: {
|
navWindow: {
|
||||||
where: "deviceAccount",
|
where: "deviceAccount",
|
||||||
default: true,
|
default: "window" as "window" | "column",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue