diff --git a/frontend/src/components/Game/Main.svelte b/frontend/src/components/Game/Main.svelte
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/src/components/RenamePlayer.svelte b/frontend/src/components/RenamePlayer.svelte
index 2f605b8..34b8ae0 100644
--- a/frontend/src/components/RenamePlayer.svelte
+++ b/frontend/src/components/RenamePlayer.svelte
@@ -68,7 +68,7 @@
\ No newline at end of file
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 0c5f514..2b58fb8 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -1,3 +1,12 @@
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&display=swap');
-@import "tailwindcss";
-@import './app.scss';
+@import 'tailwindcss';
+@plugin 'flowbite/plugin';
+@custom-variant dark {
+ @media not print {
+ .dark & {
+ @slot;
+ }
+ }
+ }
+@source "../node_modules/flowbite-svelte/dist";
+@import './app.scss';
\ No newline at end of file
diff --git a/frontend/src/routes/Game.svelte b/frontend/src/routes/Game.svelte
index 85313a3..c042807 100644
--- a/frontend/src/routes/Game.svelte
+++ b/frontend/src/routes/Game.svelte
@@ -8,9 +8,9 @@
import { requestJoinRoom } from "../stores/roomStore";
onMount(async () => {
+ // TODO: check if already connected to room, currently its overwriting the session
const params = new URLSearchParams(window.location.search);
const joinParam = params.get('join');
- console.log('Join param:', joinParam);
if(joinParam) {
await requestJoinRoom(joinParam);
diff --git a/frontend/src/stores/sessionStore.ts b/frontend/src/stores/sessionStore.ts
index dc87fa8..897587e 100644
--- a/frontend/src/stores/sessionStore.ts
+++ b/frontend/src/stores/sessionStore.ts
@@ -80,6 +80,10 @@ class SessionManager {
return get(this.store);
}
+ startGame() {
+ this.socket?.emit("StartGame");
+ }
+
hasSessionData(): boolean {
const state = this.getState();
if (state.sessionToken && state.userId) return true;
diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js
deleted file mode 100644
index 213086f..0000000
--- a/frontend/tailwind.config.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import flowbitePlugin from 'flowbite/plugin'
-const { tailwindExtractor } = require("tailwindcss/lib/lib/purgeUnusedStyles");
-
-export default {
- content: ['./src/**/*.{html,js,svelte,ts}', './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}'],
- darkMode: ["class", '[data-theme="dark"]'],
- theme: {
- extend: {
- fontFamily: {
- lexend: ['"Lexend Deca"', 'sans-serif'], // Add Lexend Deca here
- },
- },
- },
- purge: {
- content: [
- 'src/app.html',
- 'src/**/*.svelte',
- ],
- options: {
- defaultExtractor: (content) => [
- ...tailwindExtractor(content),
- ...[
- ...content.matchAll(/(?:class:)*([\w\d-/:%.]+)/gm)
- ].map(([_match, group, ..._rest]) => group),
- ],
- keyframes: true,
- },
- },
- plugins: [flowbitePlugin],
- corePlugins: {
- preflight: false,
- }
-};