Skip to content

Commit 40879f8

Browse files
committed
Add leave settings page with ESC
1 parent 22db188 commit 40879f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/AppSidebar.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts" setup>
22
import { exit } from '@tauri-apps/api/process'
3+
import { useKey } from '../composables/useKey'
34
import { Page } from '../constants'
45
import { AppStorage } from '../storage'
56
import { useStore } from '../stores/store'
@@ -18,6 +19,8 @@ function handleBack() {
1819
1920
store.setPage(page)
2021
}
22+
23+
useKey('esc', handleBack, { source: () => store.currentPage === Page.Settings })
2124
</script>
2225

2326
<template>

0 commit comments

Comments
 (0)