mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-28 21:08:52 -07:00
[client] Make switch layout a toggle instead of a dropdown
This commit is contained in:
parent
cd48af6393
commit
00b8622612
2 changed files with 9 additions and 23 deletions
|
@ -737,7 +737,7 @@ instanceTicker: "Server information of posts"
|
||||||
waitingFor: "Waiting for {x}"
|
waitingFor: "Waiting for {x}"
|
||||||
random: "Random"
|
random: "Random"
|
||||||
system: "System"
|
system: "System"
|
||||||
switchUi: "Layout"
|
switchUi: "Switch layout"
|
||||||
desktop: "Desktop"
|
desktop: "Desktop"
|
||||||
clip: "Clip"
|
clip: "Clip"
|
||||||
createNew: "Create new"
|
createNew: "Create new"
|
||||||
|
|
|
@ -111,27 +111,13 @@ export const navbarItemDef = reactive({
|
||||||
title: "switchUi",
|
title: "switchUi",
|
||||||
icon: "ph-layout ph-bold ph-lg",
|
icon: "ph-layout ph-bold ph-lg",
|
||||||
action: (ev) => {
|
action: (ev) => {
|
||||||
os.popupMenu(
|
if (ui === "default") {
|
||||||
[
|
localStorage.setItem("ui", "deck");
|
||||||
{
|
unisonReload();
|
||||||
text: i18n.ts.default,
|
} else {
|
||||||
active: ui === "default" || ui === null,
|
localStorage.setItem("ui", "default");
|
||||||
action: () => {
|
unisonReload();
|
||||||
localStorage.setItem("ui", "default");
|
}
|
||||||
unisonReload();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: i18n.ts.deck,
|
|
||||||
active: ui === "deck",
|
|
||||||
action: () => {
|
|
||||||
localStorage.setItem("ui", "deck");
|
|
||||||
unisonReload();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
ev.currentTarget ?? ev.target,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
help: {
|
help: {
|
||||||
|
|
Loading…
Reference in a new issue