From c18ed5954eda7c6a0a28e2ab50de59c118f4fd03 Mon Sep 17 00:00:00 2001 From: Jonas <77726472+kobolol@users.noreply.github.com> Date: Sun, 8 Mar 2026 19:15:25 +0100 Subject: [PATCH] Add OnlineMode route and extract app styles Introduce an OnlineMode route and placeholder component, wire it into the router and Home menu (replace the removed local-vs-bot entry). Rename utils/index.ts to router/index.ts and add the new /onlineMode route; update main.ts to import the router from ./router and include the new app.css. Extract shared #game and .game-content styles into GUI/src/app.css and remove the duplicate styles from LocalMode.vue. Make small UI tweaks: adjust GameEndedMenu width, minor formatting/attribute fixes in Layout.vue and LocalMode.vue. --- GUI/src/Home.vue | 6 +--- GUI/src/Layout.vue | 8 ++--- GUI/src/app.css | 17 ++++++++++ GUI/src/components/GameEndedMenu.vue | 2 +- GUI/src/main.ts | 4 ++- GUI/src/{utils => router}/index.ts | 6 ++++ GUI/src/routes/LocalMode.vue | 48 ++++++++++++---------------- GUI/src/routes/OnlineMode.vue | 9 ++++++ 8 files changed, 61 insertions(+), 39 deletions(-) create mode 100644 GUI/src/app.css rename GUI/src/{utils => router}/index.ts (79%) create mode 100644 GUI/src/routes/OnlineMode.vue diff --git a/GUI/src/Home.vue b/GUI/src/Home.vue index bb87204..3eb1285 100644 --- a/GUI/src/Home.vue +++ b/GUI/src/Home.vue @@ -6,15 +6,11 @@ let buttons = [ color: "red", componentName: "LocalMode" }, - { - name: "Lokal gegen Bot", - icon: "mdi-robot-angry-outline", - color: "green", - }, { name: "Online Multiplayer", icon: "mdi-web", color: "blue", + componentName: "OnlineMode" }, ] diff --git a/GUI/src/Layout.vue b/GUI/src/Layout.vue index edafb16..6847395 100644 --- a/GUI/src/Layout.vue +++ b/GUI/src/Layout.vue @@ -7,10 +7,10 @@ - 4-Gewinnt @@ -22,4 +22,4 @@ - \ No newline at end of file + diff --git a/GUI/src/app.css b/GUI/src/app.css new file mode 100644 index 0000000..e7ec6c4 --- /dev/null +++ b/GUI/src/app.css @@ -0,0 +1,17 @@ +#game { + width: 100%; + min-height: calc(100dvh - var(--v-layout-top)); + display: flex; + justify-content: center; + align-items: center; + padding: 16px; + box-sizing: border-box; +} + +.game-content { + display: flex; + flex-direction: column; + align-items: center; + gap: 16px; + width: 100%; +} \ No newline at end of file diff --git a/GUI/src/components/GameEndedMenu.vue b/GUI/src/components/GameEndedMenu.vue index 6c13690..5d68136 100644 --- a/GUI/src/components/GameEndedMenu.vue +++ b/GUI/src/components/GameEndedMenu.vue @@ -21,7 +21,7 @@ const message = computed(() => {