mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat: introduce desktop app with Tauri (#296)
This commit is contained in:
@@ -168,4 +168,12 @@ router.beforeEach((to) => {
|
||||
return token ? true : { name: 'Login' }
|
||||
})
|
||||
|
||||
router.afterEach(async (to) => {
|
||||
if (!('__TAURI_INTERNALS__' in window)) return
|
||||
try {
|
||||
const { invoke } = await import('@tauri-apps/api/core')
|
||||
invoke('resize_for_route', { route: to.path })
|
||||
} catch { /* not in Tauri */ }
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user