mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-15 07:19:16 +00:00
feat: support cmd+s / ctrl+s and rework button display on edit (#523)
Former-commit-id: 5a219f6a9c
This commit is contained in:
parent
e2dace75f4
commit
a2479155b2
2 changed files with 58 additions and 37 deletions
|
@ -360,24 +360,6 @@
|
|||
return v;
|
||||
});
|
||||
|
||||
const confirm = useConfirm();
|
||||
|
||||
async function deleteItem() {
|
||||
const confirmed = await confirm.open("Are you sure you want to delete this item?");
|
||||
|
||||
if (!confirmed.data) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { error } = await api.items.delete(itemId.value);
|
||||
if (error) {
|
||||
toast.error("Failed to delete item");
|
||||
return;
|
||||
}
|
||||
toast.success("Item deleted");
|
||||
navigateTo("/home");
|
||||
}
|
||||
|
||||
const refDialog = ref<HTMLDialogElement>();
|
||||
const dialoged = reactive({
|
||||
src: "",
|
||||
|
@ -480,10 +462,6 @@
|
|||
{{ t.name }}
|
||||
</NuxtLink>
|
||||
</div>
|
||||
<BaseButton class="btn btn-sm" @click="deleteItem()">
|
||||
<Icon name="mdi-delete" class="mr-2" />
|
||||
Delete
|
||||
</BaseButton>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue