diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte
index febf48a..3056b7b 100644
--- a/frontend/src/App.svelte
+++ b/frontend/src/App.svelte
@@ -3,15 +3,23 @@
import Router from "$lib/router/Router.svelte";
import { Close } from "$wails/main/App";
import { Toaster } from "svelte-sonner";
+ import * as srouter from "svelte-spa-router";
+ import { location } from "svelte-spa-router";
function keyDown(event: KeyboardEvent) {
if (event.ctrlKey && event.key == "r") {
window.location.reload();
}
- if (event.ctrlKey && event.key == 'w') {
- console.log("close");
+ if (event.ctrlKey && event.key == "w") {
Close();
}
+ if (event.ctrlKey && event.key == "Tab") {
+ if ($location == "/") {
+ srouter.replace("/Weight");
+ } else if ($location == "/Weight") {
+ srouter.replace("/");
+ }
+ }
}
@@ -19,8 +27,8 @@
-
-
-
-
+
+
+
+
diff --git a/frontend/src/lib/router/routes/Weight/Weight.svelte b/frontend/src/lib/router/routes/Weight/Weight.svelte
index 7224a68..8ca83c5 100644
--- a/frontend/src/lib/router/routes/Weight/Weight.svelte
+++ b/frontend/src/lib/router/routes/Weight/Weight.svelte
@@ -4,7 +4,6 @@
let forceUpdate = false;
weightStore.subscribe(() => {
- console.log("updte");
forceUpdate = !forceUpdate;
});