From bf74f0e2594dbad96caa1635f9c426b32e3c2323 Mon Sep 17 00:00:00 2001 From: 180079995 <101566121+180079995@users.noreply.github.com> Date: Wed, 27 Nov 2024 00:07:57 +0800 Subject: [PATCH 1/3] discussion --- src/routes/+layout.svelte | 2 +- src/routes/join/+page.svelte | 19 +--- src/routes/session/[id]/+page.svelte | 33 ++++++- .../[id]/discussion/[userId]/+page.server.ts | 30 ++++++ .../[id]/discussion/[userId]/+page.svelte | 91 +++++++++++++++++++ 5 files changed, 154 insertions(+), 21 deletions(-) create mode 100644 src/routes/session/[id]/discussion/[userId]/+page.server.ts create mode 100644 src/routes/session/[id]/discussion/[userId]/+page.svelte diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 888fa88..b5aeebd 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -19,6 +19,6 @@ } main.sidebar-open { - margin-left: 12.5rem; /* 側邊欄的寬度 */ + margin-left: 12.5rem; } diff --git a/src/routes/join/+page.svelte b/src/routes/join/+page.svelte index 9250b24..0a3979c 100644 --- a/src/routes/join/+page.svelte +++ b/src/routes/join/+page.svelte @@ -40,22 +40,9 @@ bind:value={tempIdInput} required pattern="\d\{6}" - class="w-full rounded-lg border p-2" + class="w-full rounded-lg border p-2 font-bold" placeholder="Enter 6-digit code" /> - - - - {#if form?.idInvalid}
Please enter a valid 6-digit code
{/if} @@ -73,10 +60,10 @@ required pattern="^(?:[1-9]|[1-4][0-9]|50)$" class="w-full rounded-lg border p-2" - placeholder="輸入組別" + placeholder="Please enter your group number" /> {#if form?.groupNumberInvalid} -請輸入有效的組別
+Please enter a valid group number
{/if} diff --git a/src/routes/session/[id]/+page.svelte b/src/routes/session/[id]/+page.svelte index f5c59aa..e895d94 100644 --- a/src/routes/session/[id]/+page.svelte +++ b/src/routes/session/[id]/+page.svelte @@ -27,6 +27,11 @@ resources = resources.filter((_, i) => i !== index); } + function generateNewTask() { + // Generate new task + console.log('New task generated'); + } + removeResource(0); function applyChanges(newtitle: string, resources: Array<{ type: string; content: string }>) { @@ -87,19 +92,19 @@Hosted by {session.hostName}
@@ -253,7 +258,7 @@ {:else}session.topic
+