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"
|
||||
removeMember: "Remove member"
|
||||
verifiedLink: "Verified link"
|
||||
openInMainColumn: "Open in main column"
|
||||
|
||||
_sensitiveMediaDetection:
|
||||
description: "Reduces the effort of server moderation through automatically recognizing
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<template>
|
||||
<div class="_formRoot">
|
||||
<FormSwitch v-model="navWindow"
|
||||
>{{ i18n.ts.defaultNavigationBehaviour }}:
|
||||
{{ i18n.ts.openInWindow }}</FormSwitch
|
||||
>
|
||||
|
||||
<FormSwitch v-model="alwaysShowMainColumn" class="_formBlock">{{
|
||||
i18n.ts._deck.alwaysShowMainColumn
|
||||
}}</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">
|
||||
<template #label>{{ i18n.ts._deck.columnAlign }}</template>
|
||||
<option value="left">{{ i18n.ts.left }}</option>
|
||||
|
|
|
@ -220,7 +220,7 @@ mainRouter.navHook = (path, flag): boolean => {
|
|||
const noMainColumn = !deckStore.state.columns.some(
|
||||
(x) => x.type === "main",
|
||||
);
|
||||
if (deckStore.state.navWindow || noMainColumn) {
|
||||
if (deckStore.reactiveState.navWindow.value === "window" || noMainColumn) {
|
||||
os.pageWindow(path);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ export const deckStore = markRaw(
|
|||
},
|
||||
navWindow: {
|
||||
where: "deviceAccount",
|
||||
default: true,
|
||||
default: "window" as "window" | "column",
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue