From 578af9b2bec81fb52f22b00f3a7c6b3ad6cab96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=8C=E8=97=A4=E3=81=B2=E3=81=A8=E3=82=8A?= <118675237+babuzeer@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:10:32 +0800 Subject: [PATCH] style: recover the background color (#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add notices to a new collection the new collection named todolist, and there are small changes about how the pages look like. * feat: add notices to a new collection * style: update npm and run format * style: run npm format again * style: channel and notice style * feat: useremail is added automatically * ci: format-check * css: pass the lint * style: recover the background color --------- Co-authored-by: sheeplin <1270610465@qq.com> Co-authored-by: My Go! <118411001+Clear1oveE@users.noreply.github.com> --- src/app.css | 1 + src/routes/chantemplate.svelte | 83 ++++++++++++++++++++++++++-------- src/routes/checknotice.svelte | 59 ++++++++++++++++-------- src/routes/selectTags.svelte | 1 + 4 files changed, 107 insertions(+), 37 deletions(-) diff --git a/src/app.css b/src/app.css index b87aec7..ebb3618 100644 --- a/src/app.css +++ b/src/app.css @@ -41,6 +41,7 @@ h1 { } #app { + width: 100%; max-width: 1280px; margin: 0 auto; padding: 2rem; diff --git a/src/routes/chantemplate.svelte b/src/routes/chantemplate.svelte index 31568e6..fd22f98 100644 --- a/src/routes/chantemplate.svelte +++ b/src/routes/chantemplate.svelte @@ -8,14 +8,17 @@ const pb = new PocketBase(PocketBase_URL); let records = []; + let tags = []; async function noticedisplay() { try { const channel = $currentchannelid; - const response = await pb.collection("notices").getFullList({ + const responses = await pb.collection("notices").getFullList({ sort: "-created", filter: `channelid="${channel}"`, }); - records = response; + const names = responses.map((response) => response.tag); + tags = [...new Set(names)]; + records = responses; } catch (error) { alert("fail to find"); } @@ -37,30 +40,59 @@ -{#each records as record} -