Skip to content

Commit

Permalink
Mac version fix for Command + Q to app quit
Browse files Browse the repository at this point in the history
  • Loading branch information
skurdindev committed Jul 23, 2024
1 parent f9b2830 commit 76a9f82
Show file tree
Hide file tree
Showing 5 changed files with 1,066 additions and 790 deletions.
188 changes: 94 additions & 94 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pastebar-app",
"version": "0.5.1",
"version": "0.5.3",
"private": true,
"scripts": {
"dev": "tauri dev",
Expand Down Expand Up @@ -67,7 +67,7 @@
"@tanstack/react-query": "5.25.0",
"@tanstack/react-query-devtools": "5.25.0",
"@tanstack/react-query-persist-client": "5.25.0",
"@tauri-apps/api": "^1.5.3",
"@tauri-apps/api": "^1.6.0",
"@types/node": "^20.10.0",
"@uiw/codemirror-extensions-langs": "^4.21.21",
"@uiw/codemirror-theme-github": "^4.21.21",
Expand Down Expand Up @@ -149,7 +149,7 @@
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@tailwindcss/line-clamp": "^0.4.4",
"@tauri-apps/cli": "^1.5.6",
"@tauri-apps/cli": "^1.6.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/bcryptjs": "^2.4.6",
"@types/codemirror": "^5.60.15",
Expand Down Expand Up @@ -185,4 +185,4 @@
"vite": "^5.0.11",
"vite-plugin-tauri": "^3.3.0"
}
}
}
9 changes: 7 additions & 2 deletions packages/pastebar-app-ui/src/layout/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export function NavBar() {

useEffect(() => {
if (systemTheme) {
// invoke('set_icon', { name: 'main', isDark: systemTheme === 'dark' })
setSystemTheme(systemTheme)
}
}, [systemTheme])
Expand Down Expand Up @@ -251,12 +250,18 @@ export function NavBar() {
navigate('/app-settings/preferences', { replace: true })
})

useHotkeys('ctrl+q', () => {
useHotkeys(['ctrl+q'], () => {
if (isWindows) {
closeWindow()
}
})

useHotkeys(['meta+q'], () => {
if (!isWindows) {
closeWindow()
}
})

useHotkeys(['alt+n', 'ctrl+n', 'meta+n'], async () => {
await toggleIsSplitPanelView()
})
Expand Down
Loading

0 comments on commit 76a9f82

Please sign in to comment.