diff --git a/client/.dockerignore b/client/.dockerignore
deleted file mode 100644
index 04c01ba..0000000
--- a/client/.dockerignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/
-dist/
\ No newline at end of file
diff --git a/client/Dockerfile b/client/Dockerfile
deleted file mode 100644
index 1a44d67..0000000
--- a/client/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM node
-# user node has UID 1000 in the container
-USER node
-EXPOSE 5173
-VOLUME /client
-WORKDIR /client
-ADD package.json yarn.lock tsconfig.json tsconfig.node.json vite.config.ts /client/
-RUN yarn
-ADD public/ src/ index.html /client/
-
diff --git a/client/package.json b/client/package.json
index a7858e3..f410ede 100644
--- a/client/package.json
+++ b/client/package.json
@@ -12,8 +12,7 @@
"dependencies": {
"bulma": "^0.9.4",
"sass": "^1.25.0",
- "vue": "^3.2.47",
- "vue-router": "4"
+ "vue": "^3.2.47"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.1.0",
diff --git a/client/src/App.vue b/client/src/App.vue
index 8e42bdc..b7adb44 100644
--- a/client/src/App.vue
+++ b/client/src/App.vue
@@ -1,7 +1,14 @@
-
+
+
+
diff --git a/client/src/main.ts b/client/src/main.ts
index 90cdedc..26bcf20 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -1,12 +1,6 @@
import { createApp } from 'vue'
import './style.scss'
-import router from './router'
-import { state } from "./state";
-import 'bulma/css/bulma.css'
import App from './App.vue'
+import 'bulma/css/bulma.css'
-
-const app = createApp(App)
-app.use(router)
-app.mount('#app')
-state.populate()
+createApp(App).mount('#app')
diff --git a/client/src/router.ts b/client/src/router.ts
deleted file mode 100644
index 062c50d..0000000
--- a/client/src/router.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { createRouter, createWebHistory } from 'vue-router'
-import TableView from './views/TableView.vue'
-
-const router = createRouter({
- history: createWebHistory(),
- routes: [
- { path: '/', component: TableView }
- // 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..e0ad4ad 100644
--- a/client/src/state.ts
+++ b/client/src/state.ts
@@ -18,6 +18,12 @@ export const state = reactive({
source.addEventListener('TickAdded', event => {
console.log(event)
const tick: Tick = JSON.parse(event.data)
+ // for (const track of this.tracks) {
+ // if (track.id === tick.track_id) {
+ // console.debug('pushing tick')
+ // track.ticks?.push(tick)
+ // }
+ // }
const tracks = this.tracks.map(track => {
if (track.id === tick.track_id) {
const ticks = track.ticks ?? []
@@ -27,17 +33,22 @@ export const state = reactive({
}
return track
})
+ console.debug(tracks)
this.tracks = tracks
})
source.addEventListener('TickDropped', event => {
console.log(event)
const tick: Tick = JSON.parse(event.data)
+ // for (const track of this.tracks)
+ // if (track.id === tick.track_id)
+ // track.ticks = track.ticks?.filter($tick => $tick.id === tick.id)
const tracks = this.tracks.map(track => {
if (track.id === tick.track_id) {
track.ticks = track.ticks?.filter($tick => $tick.id !== tick.id)
}
return track
})
+ console.debug(tracks)
this.tracks = tracks
})
source.addEventListener('Lagged', event => {
@@ -49,7 +60,6 @@ export const state = reactive({
error(event)
window.location = window.location
})
- window.addEventListener('beforeunload', () => source.close())
},
async repopulate() {
this.state = State.Fetching
diff --git a/client/src/views/TableView.vue b/client/src/views/TableView.vue
deleted file mode 100644
index 053df35..0000000
--- a/client/src/views/TableView.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
diff --git a/client/yarn.lock b/client/yarn.lock
index a06ffcf..47e9ec4 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -213,11 +213,6 @@
"@vue/compiler-dom" "3.3.4"
"@vue/shared" "3.3.4"
-"@vue/devtools-api@^6.5.0":
- version "6.5.0"
- resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.0.tgz#98b99425edee70b4c992692628fa1ea2c1e57d07"
- integrity sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==
-
"@vue/reactivity-transform@3.3.4":
version "3.3.4"
resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz#52908476e34d6a65c6c21cd2722d41ed8ae51929"
@@ -527,13 +522,6 @@ vite@^4.3.9:
optionalDependencies:
fsevents "~2.3.2"
-vue-router@4:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.2.2.tgz#b0097b66d89ca81c0986be03da244c7b32a4fd81"
- integrity sha512-cChBPPmAflgBGmy3tBsjeoe3f3VOSG6naKyY5pjtrqLGbNEXdzCigFUHgBvp9e3ysAtFtEx7OLqcSDh/1Cq2TQ==
- dependencies:
- "@vue/devtools-api" "^6.5.0"
-
vue-template-compiler@^2.7.14:
version "2.7.14"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz#4545b7dfb88090744c1577ae5ac3f964e61634b1"
diff --git a/docker-compose_dev.yml b/docker-compose_dev.yml
index 93d4bf1..780b9be 100644
--- a/docker-compose_dev.yml
+++ b/docker-compose_dev.yml
@@ -37,9 +37,11 @@ services:
- ./db.mount:/var/lib/postgresql/data
client_devserver:
- build: ./client
+ image: node
volumes: [ ./client:/client/ ]
- command: "yarn dev --host 0.0.0.0"
+ working_dir: /client
+ command: [ "sh", "-c", "yarn && yarn dev --host 0.0.0.0" ]
+ expose: [ 5173 ]
networks: [ web ]
labels:
traefik.enable: true