From c1c1f561c8e3857d755bfda5769ef64edd55a5e8 Mon Sep 17 00:00:00 2001
From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com>
Date: Sat, 2 Mar 2024 18:55:00 +0800
Subject: [PATCH 22/38] fix: altered to the correct link
---
pages/clubs/[id].vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/clubs/[id].vue b/pages/clubs/[id].vue
index 2b1683a8..2feb9b71 100644
--- a/pages/clubs/[id].vue
+++ b/pages/clubs/[id].vue
@@ -70,7 +70,7 @@ definePageMeta({
你当前访问的页面不存在,也许你应该考虑...
-
+
From 9aa9188ddda60ce446f0a2a6b3a91e203566ce62 Mon Sep 17 00:00:00 2001
From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com>
Date: Sat, 2 Mar 2024 20:54:30 +0800
Subject: [PATCH 23/38] feat: add JetBrains Run/Debug Configuration
---
.run/Run Nuxt via pnpm.run.xml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 .run/Run Nuxt via pnpm.run.xml
diff --git a/.run/Run Nuxt via pnpm.run.xml b/.run/Run Nuxt via pnpm.run.xml
new file mode 100644
index 00000000..dd4a8ac7
--- /dev/null
+++ b/.run/Run Nuxt via pnpm.run.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 65c3e81496392426ba974b73fad478896000c11f Mon Sep 17 00:00:00 2001
From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com>
Date: Sat, 2 Mar 2024 21:27:27 +0800
Subject: [PATCH 24/38] refactor: filter club info with a brand-new method
feat: show info about supervisor & group member counts
---
pages/clubs/[id].vue | 99 +++++++++++++++++++++++++++++---------------
1 file changed, 65 insertions(+), 34 deletions(-)
diff --git a/pages/clubs/[id].vue b/pages/clubs/[id].vue
index 2feb9b71..0e74138a 100644
--- a/pages/clubs/[id].vue
+++ b/pages/clubs/[id].vue
@@ -10,17 +10,23 @@ const clubs: Clubs = json as Clubs
const route = useRoute()
const id = route.params.id // Fetch current Club ID via route params
-// Filter clubs based on C_GroupsID
-// It just works ;)
+// Filter clubs based on C_GroupsID and include information at the same level as groups
const filteredClubs = Object.values(clubs).flatMap(clubCategory =>
- clubCategory.flatMap(club => club.groups.filter(group => group.C_GroupsID === id)))
+ clubCategory.filter(club =>
+ club.groups.some(group => group.C_GroupsID === id),
+ ).map(club => ({
+ ...club, // Spread to include all same-level information
+ groups: club.groups.filter(group => group.C_GroupsID === id), // Filter groups to only include those that match the ID
+ })),
+)
// Get the number of members in each group
-// const groupMemberCounts = filteredClubs.map(group => group.gmember.length)
+const groupMemberCounts = filteredClubs.length > 0 ? filteredClubs[0].gmember.length : 0
+// Get the Chinese Description of the club
let Description_C
-if (filteredClubs[0] && filteredClubs[0].C_DescriptionC)
- Description_C = cleanHTML(filteredClubs[0].C_DescriptionC) || '
From b2ce4331002f478242812543e4a87b1daf562a0c Mon Sep 17 00:00:00 2001
From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com>
Date: Sat, 2 Mar 2024 22:03:10 +0800
Subject: [PATCH 25/38] refactor: move `cleanHTML` to `/utils`
---
{components/custom => utils}/cleanHTML.d.ts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {components/custom => utils}/cleanHTML.d.ts (100%)
diff --git a/components/custom/cleanHTML.d.ts b/utils/cleanHTML.d.ts
similarity index 100%
rename from components/custom/cleanHTML.d.ts
rename to utils/cleanHTML.d.ts
From bb87ec6cf63ef051437d97fce29bdd65c566eea2 Mon Sep 17 00:00:00 2001
From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com>
Date: Sat, 2 Mar 2024 22:03:23 +0800
Subject: [PATCH 26/38] refactor: move `cleanHTML` to `/utils`
---
components/custom/club-card.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/custom/club-card.vue b/components/custom/club-card.vue
index cd4b4985..3646c7de 100644
--- a/components/custom/club-card.vue
+++ b/components/custom/club-card.vue
@@ -4,7 +4,7 @@ import type { Club } from '~/content/clubs'
import { Button } from '@/components/ui/button'
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'
import { cn } from '@/lib/utils'
-import { cleanHTML } from '~/components/custom/cleanHTML.d.ts'
+import { cleanHTML } from '~/utils/cleanHTML.d.ts'
import Badge from '~/components/ui/badge/Badge.vue'
const props = defineProps({
From 4ee8c3443acb3ea697896f546890927f53963fbe Mon Sep 17 00:00:00 2001
From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com>
Date: Sat, 2 Mar 2024 22:06:29 +0800
Subject: [PATCH 27/38] fix: add several styles to certain objects refactor:
update `cleanHTML` directory feat(hidden): Recent Activities
---
pages/clubs/[id].vue | 42 +++++++++++++++++++++++++++++++++++-------
1 file changed, 35 insertions(+), 7 deletions(-)
diff --git a/pages/clubs/[id].vue b/pages/clubs/[id].vue
index 0e74138a..6dc5045d 100644
--- a/pages/clubs/[id].vue
+++ b/pages/clubs/[id].vue
@@ -1,8 +1,9 @@
-
@@ -39,7 +41,7 @@ definePageMeta({
Date: Sat, 2 Mar 2024 23:25:09 +0800
Subject: [PATCH 37/38] fix: minor fixes
---
pages/cas/clubs/[id].vue | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/pages/cas/clubs/[id].vue b/pages/cas/clubs/[id].vue
index f9492d89..f47e9771 100644
--- a/pages/cas/clubs/[id].vue
+++ b/pages/cas/clubs/[id].vue
@@ -4,7 +4,7 @@ import { Button } from '@/components/ui/button'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { cleanHTML } from '@/lib/utils'
import json from '@/content/clubs.json'
-import type { Clubs } from '@/content/clubs'
+import type { Club, Clubs } from '@/content/clubs'
const clubs: Clubs = json as Clubs
const route = useRoute()
@@ -18,7 +18,7 @@ const filteredClubs = Object.values(clubs).flatMap(clubCategory =>
...club, // Spread to include all same-level information
groups: club.groups.filter(group => group.C_GroupsID === id), // Filter groups to only include those that match the ID
})),
-)
+) as Club[]
// Get the number of members in each group
const groupMemberCounts = filteredClubs.length > 0 ? filteredClubs[0].gmember.length : 0
@@ -40,10 +40,10 @@ definePageMeta({