From da735935e9c2547dead20bbe74b85a1f19decbd5 Mon Sep 17 00:00:00 2001 From: Soenke Date: Sun, 14 Sep 2025 19:29:58 +0200 Subject: [PATCH] AAAAAAAAAAA --- frontend/package-lock.json | 23 +- frontend/package.json | 1 + frontend/src/assets/dart.svg | 2 +- frontend/src/css/app.scss | 4 +- frontend/src/layouts/MainLayout.vue | 17 +- frontend/src/pages/IndexPage.vue | 54 ++- .../game/Components/dartPickerComponent.vue | 356 +++++++++++++++++ .../src/pages/game/createOnlineGamePage.vue | 2 +- frontend/src/pages/game/endGamePage.vue | 52 +++ frontend/src/pages/game/gamePage.vue | 358 +++++++++++++++++- frontend/src/router/routes.js | 1 + 11 files changed, 849 insertions(+), 21 deletions(-) create mode 100644 frontend/src/pages/game/Components/dartPickerComponent.vue create mode 100644 frontend/src/pages/game/endGamePage.vue diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 958ecd3..d21b3ac 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@quasar/extras": "^1.16.4", "axios": "^1.11.0", + "bootstrap-icons": "^1.13.1", "quasar": "^2.16.0", "vue": "^3.4.18", "vue-router": "^4.0.0" @@ -2322,9 +2323,9 @@ } }, "node_modules/axios": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", - "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.1.tgz", + "integrity": "sha512-Kn4kbSXpkFHCGE6rBFNwIv0GQs4AvDT80jlveJDKFxjbTYMUeB4QtsdPCv6H8Cm19Je7IU6VFtRl2zWZI0rudQ==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -2447,6 +2448,22 @@ "dev": true, "license": "ISC" }, + "node_modules/bootstrap-icons": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.13.1.tgz", + "integrity": "sha512-ijombt4v6bv5CLeXvRWKy7CuM3TRTuPEuGaGKvTV5cz65rQSY8RQ2JcHt6b90cBBAC7s8fsf2EkQDldzCoXUjw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", diff --git a/frontend/package.json b/frontend/package.json index 6a95f30..3f203e5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,6 +17,7 @@ "dependencies": { "@quasar/extras": "^1.16.4", "axios": "^1.11.0", + "bootstrap-icons": "^1.13.1", "quasar": "^2.16.0", "vue": "^3.4.18", "vue-router": "^4.0.0" diff --git a/frontend/src/assets/dart.svg b/frontend/src/assets/dart.svg index d5b0295..92d7cf4 100644 --- a/frontend/src/assets/dart.svg +++ b/frontend/src/assets/dart.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/css/app.scss b/frontend/src/css/app.scss index d77c37c..241085d 100644 --- a/frontend/src/css/app.scss +++ b/frontend/src/css/app.scss @@ -11,7 +11,7 @@ img { .dart { - position: fixed; + position: absolute; transform: translate(-50%, -50%); width: 200px; height: auto; @@ -25,9 +25,7 @@ img { .dartBoardDiv { display: flex; flex-direction: column; - justify-content: center; align-items: center; - height: 100vh; } .numpadBtn { diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue index a5e42f8..90aebf6 100644 --- a/frontend/src/layouts/MainLayout.vue +++ b/frontend/src/layouts/MainLayout.vue @@ -134,9 +134,6 @@ - - - @@ -166,11 +163,15 @@ function onSettingsClick () { router.push("/user/settings") } function onGameClick () { - const path = LocalStorage.getItem('returnPath', route.fullPath) - if (path) { - router.push(path) - } else { - router.push("/") + const path = route.fullPath + const savedPath = LocalStorage.getItem('returnPath', route.fullPath) + console.log(path) + if (path == "/user/settings" || path == "/rules") { + if (savedPath) { + router.push(savedPath) + } else { + router.push("/") + } } } function onRulesClick () { diff --git a/frontend/src/pages/IndexPage.vue b/frontend/src/pages/IndexPage.vue index d444779..fd9a9db 100644 --- a/frontend/src/pages/IndexPage.vue +++ b/frontend/src/pages/IndexPage.vue @@ -2,17 +2,65 @@

Digitale Helfer für Dart

- - + +
+ + + +
Create a Game
+
+ + + + +
+ + + + +
Join a Game
+
+ + + + +
+
+ +
Quasar logo - +
\ No newline at end of file diff --git a/frontend/src/pages/game/createOnlineGamePage.vue b/frontend/src/pages/game/createOnlineGamePage.vue index c3b04dd..3590d75 100644 --- a/frontend/src/pages/game/createOnlineGamePage.vue +++ b/frontend/src/pages/game/createOnlineGamePage.vue @@ -48,7 +48,7 @@ import { useRouter } from 'vue-router' const router = useRouter() const $q = useQuasar(); -const gameID = ref(); +const gameID = ref(null); const gameCreator = ref(null); const gamePlayers = ref([]); const user = ref({ username:"", id:0 }); diff --git a/frontend/src/pages/game/endGamePage.vue b/frontend/src/pages/game/endGamePage.vue new file mode 100644 index 0000000..7b24696 --- /dev/null +++ b/frontend/src/pages/game/endGamePage.vue @@ -0,0 +1,52 @@ + + + diff --git a/frontend/src/pages/game/gamePage.vue b/frontend/src/pages/game/gamePage.vue index 44e721a..f60b8a3 100644 --- a/frontend/src/pages/game/gamePage.vue +++ b/frontend/src/pages/game/gamePage.vue @@ -1,7 +1,361 @@ diff --git a/frontend/src/router/routes.js b/frontend/src/router/routes.js index da9f7a3..2c98435 100644 --- a/frontend/src/router/routes.js +++ b/frontend/src/router/routes.js @@ -18,6 +18,7 @@ const routes = [ { path: 'game/local/create', component: () => import('pages/game/createLocalGamePage.vue') }, { path: 'game/online/create', component: () => import('pages/game/createOnlineGamePage.vue') }, { path: 'game/online/join', component: () => import('pages/game/joinOnlineGamePage.vue') }, + { path: 'game/end', component: () => import('pages/game/endGamePage.vue') }, { path: 'error', component: () => import('pages/ErrorPage.vue') } ],