File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { invoke } from "@tauri-apps/api/core";
10
10
import { AppStatus , type AppState } from " ./types.d.ts" ;
11
11
import { listen } from " @tauri-apps/api/event" ;
12
12
import { useAppState } from " ./composables/app-state.js" ;
13
+ import {useRouter } from " #vue-router" ;
13
14
14
15
const router = useRouter ();
15
16
@@ -22,14 +23,16 @@ router.beforeEach(async () => {
22
23
23
24
switch (state .value .status ) {
24
25
case AppStatus .NotConfigured :
25
- router .push (" /setup" );
26
+ router .push ({ path: " /setup" }). then (() => { console . log ( " Pushed Setup " )} );
26
27
break ;
27
28
case AppStatus .SignedOut :
28
29
router .push (" /auth" );
29
30
break ;
30
31
case AppStatus .SignedInNeedsReauth :
31
32
router .push (" /auth/signedout" );
32
33
break ;
34
+ default :
35
+ router .push (" /store" );
33
36
}
34
37
35
38
listen (" auth/processing" , () => {
Original file line number Diff line number Diff line change 1
1
<template />
2
2
3
3
<script setup lang="ts">
4
- const router = useRouter ();
5
- router .replace (" /store" );
6
4
</script >
Original file line number Diff line number Diff line change @@ -41,9 +41,12 @@ pub struct Database {
41
41
pub base_url : String ,
42
42
pub games : DatabaseGames ,
43
43
}
44
+ pub static DATA_ROOT_DIR : LazyLock < PathBuf > =
45
+ LazyLock :: new ( || BaseDirs :: new ( ) . unwrap ( ) . data_dir ( ) . join ( "drop" ) ) ;
44
46
45
47
pub type DatabaseInterface =
46
48
rustbreak:: Database < Database , rustbreak:: backend:: PathBackend , Bincode > ;
49
+
47
50
pub trait DatabaseImpls {
48
51
fn set_up_database ( ) -> DatabaseInterface ;
49
52
fn database_is_set_up ( & self ) -> bool ;
@@ -82,6 +85,4 @@ impl DatabaseImpls for DatabaseInterface {
82
85
let handle = self . borrow_data ( ) . unwrap ( ) ;
83
86
Url :: parse ( & handle. base_url ) . unwrap ( )
84
87
}
85
- }
86
- pub static DATA_ROOT_DIR : LazyLock < PathBuf > =
87
- LazyLock :: new ( || BaseDirs :: new ( ) . unwrap ( ) . data_dir ( ) . join ( "drop" ) ) ;
88
+ }
You can’t perform that action at this time.
0 commit comments