Added elaborate template switching.

This commit is contained in:
2024-08-26 06:15:22 +02:00
parent fa991c0294
commit 80d8a8109a
29 changed files with 617 additions and 180 deletions

View File

@@ -15,7 +15,7 @@
</a>
<Icon
v-if="!stash.public"
v-if="!stash.isPublic"
v-tooltip="'This stash is private'"
icon="eye-blocked"
class="private noselect"
@@ -31,7 +31,7 @@
<template #popper>
<ul class="stash-menu nolist">
<li
v-if="stash.public"
v-if="stash.isPublic"
class="menu-item"
@click="setPublic(false)"
>
@@ -158,7 +158,7 @@ async function setPublic(isPublic) {
done.value = false;
await patch(`/stashes/${props.stash.id}`, { public: isPublic }, {
await patch(`/stashes/${props.stash.id}`, { isPublic }, {
undoFeedback: !isPublic && `Stash '${props.stash.name}' set to private`,
successFeedback: isPublic && `Stash '${props.stash.name}' set to public`,
errorFeedback: 'Failed to update stash',