-
+
+
+
-
-
diff --git a/client/src/components/NavBar.vue b/client/src/components/NavBar.vue
new file mode 100644
index 0000000..e11af91
--- /dev/null
+++ b/client/src/components/NavBar.vue
@@ -0,0 +1,28 @@
+
+
+
+
\ No newline at end of file
diff --git a/client/src/components/Table.vue b/client/src/components/Table.vue
index 338bd0b..1f1ddec 100644
--- a/client/src/components/Table.vue
+++ b/client/src/components/Table.vue
@@ -2,7 +2,9 @@
| Date |
- {{ track.icon }} |
+
+
+ |
@@ -18,6 +20,7 @@
+
+
+ {{props.icon}}
+
+
\ No newline at end of file
diff --git a/client/src/main.ts b/client/src/main.ts
index 26bcf20..90cdedc 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -1,6 +1,12 @@
import { createApp } from 'vue'
import './style.scss'
-import App from './App.vue'
+import router from './router'
+import { state } from "./state";
import 'bulma/css/bulma.css'
+import App from './App.vue'
-createApp(App).mount('#app')
+
+const app = createApp(App)
+app.use(router)
+app.mount('#app')
+state.populate()
diff --git a/client/src/router.ts b/client/src/router.ts
new file mode 100644
index 0000000..806e60d
--- /dev/null
+++ b/client/src/router.ts
@@ -0,0 +1,15 @@
+import { createRouter, createWebHistory } from 'vue-router'
+import TableView from './views/TableView.vue'
+import NewTrackView from './views/NewTrackView.vue'
+
+const router = createRouter({
+ history: createWebHistory(),
+ routes: [
+ { path: '/', component: TableView },
+ { path: '/new-track', component: NewTrackView }
+ // for other pages:
+ // {path: '/', component: import('./views/TableView.vue')}
+ ]
+})
+
+export default router
\ No newline at end of file
diff --git a/client/src/state.ts b/client/src/state.ts
index cc140cd..8d7b479 100644
--- a/client/src/state.ts
+++ b/client/src/state.ts
@@ -1,5 +1,6 @@
import { reactive } from "vue"
import { Track } from "./track"
+import { Tick } from './ticks'
import { error } from "./error"
enum State {
@@ -8,6 +9,15 @@ enum State {
Fetched,
}
+function dateQuery(date: Date): URLSearchParams {
+ let query = new URLSearchParams()
+ query.set("year", date.getUTCFullYear().toString())
+ query.set("month", (date.getUTCMonth() + 1).toString())
+ // good thing I still had this ^^^^^^^^^^^^^^ in mind when I wrote this 😬
+ query.set("day", date.getUTCDate().toString())
+ return query
+}
+
export const state = reactive({
tracks: new Array