feat(tasks): use platform-aware delete shortcut on task detail view
This commit is contained in:
parent
699c766049
commit
cee2babc58
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue