mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-21 19:53:50 +01:00
Replace Deck UI "Default navigation behavior" switch with radio buttons
This commit is contained in:
parent
8069cedf8e
commit
d3b18dac5d
@ -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 New Issue
Block a user