Skip to content

Open source personal finance application

fix(shortcuts): update keyboard shortcuts for sidebar toggle and form actions

Ilya Komichev9ecbf01b8349
diff --git a/app/components/layout/Sidebar.vue b/app/components/layout/Sidebar.vue
index 6bc29be0..b8c5b74a 100644
--- a/app/components/layout/Sidebar.vue
+++ b/app/components/layout/Sidebar.vue
@@ -125,7 +125,7 @@ const isShowLogoMenu = ref(false)
<div class="absolute bottom-1 left-1 hidden w-full items-center md:flex">
<UTooltip
:text="t('app.toggleSidebar')"
- :kbds="['Shift', 'D']"
+ :kbds="['Meta', '\\']"
>
<UiItem1
class="z-10 text-4"
diff --git a/app/layouts/default.vue b/app/layouts/default.vue
index cb5bd6dd..9aacbadd 100644
--- a/app/layouts/default.vue
+++ b/app/layouts/default.vue
@@ -45,18 +45,18 @@ const { error, status } = useAsyncData(
)
defineShortcuts({
- escape: () => {
+ 'escape': () => {
if (trnsFormStore.ui.isShow)
trnsFormStore.ui.isShow = false
},
- meta_g: () => {
+ 'meta_\\': () => {
+ isShowSidebar.value = !isShowSidebar.value
+ },
+ 'meta_g': () => {
trnsFormStore.ui.isShow
? trnsFormStore.ui.isShow = false
: trnsFormStore.trnFormCreate()
},
- shift_d: () => {
- isShowSidebar.value = !isShowSidebar.value
- },
})
usePageScroll()