feat(tasks): use platform-aware delete shortcut on task detail view

This commit is contained in:
kolaente 2026-04-09 09:34:48 +02:00 committed by kolaente
parent 699c766049
commit cee2babc58
1 changed files with 4 additions and 1 deletions

View File

@ -573,7 +573,7 @@
{{ $t('task.detail.actions.repeatAfter') }} {{ $t('task.detail.actions.repeatAfter') }}
</XButton> </XButton>
<XButton <XButton
v-shortcut="'Shift+Delete'" v-shortcut="deleteShortcut"
icon="trash-alt" icon="trash-alt"
:shadow="false" :shadow="false"
class="is-danger is-outlined has-no-border" class="is-danger is-outlined has-no-border"
@ -733,6 +733,9 @@ const lastProjectOrTaskProject = computed(() => lastProject.value ?? project.val
// Use Alt+r on other platforms // Use Alt+r on other platforms
const reminderShortcut = computed(() => isAppleDevice() ? 'Shift+KeyR' : 'Alt+KeyR') const reminderShortcut = computed(() => isAppleDevice() ? 'Shift+KeyR' : 'Alt+KeyR')
// Match native OS conventions for "delete the selected item"
const deleteShortcut = isAppleDevice() ? 'Backspace' : 'Delete'
onBeforeRouteLeave(async () => { onBeforeRouteLeave(async () => {
if (taskNotFound.value) { if (taskNotFound.value) {
return return