From e42ac1273772a132d59224f174c887ca7dac8473 Mon Sep 17 00:00:00 2001 From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com> Date: Sat, 2 Mar 2024 13:01:53 +0800 Subject: [PATCH 01/38] feat: detail information of specific club --- components/custom/club-card.vue | 8 +++-- pages/clubs/[id].vue | 64 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 pages/clubs/[id].vue diff --git a/components/custom/club-card.vue b/components/custom/club-card.vue index 382deb40..22918332 100644 --- a/components/custom/club-card.vue +++ b/components/custom/club-card.vue @@ -57,9 +57,11 @@ const props = defineProps({ - + + + diff --git a/pages/clubs/[id].vue b/pages/clubs/[id].vue new file mode 100644 index 00000000..5d8168aa --- /dev/null +++ b/pages/clubs/[id].vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file From d399d273a3a1eac48da5baee25772cd2d2f23dde Mon Sep 17 00:00:00 2001 From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com> Date: Sat, 2 Mar 2024 13:14:03 +0800 Subject: [PATCH 02/38] style: make the code fit Lint style --- pages/clubs/[id].vue | 52 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pages/clubs/[id].vue b/pages/clubs/[id].vue index 5d8168aa..523a6b0b 100644 --- a/pages/clubs/[id].vue +++ b/pages/clubs/[id].vue @@ -28,31 +28,31 @@ definePageMeta({
- - - - {{ group.C_NameC }} - - {{ group.C_NameE }} - - -

{{ group.C_DescriptionC }}

-
-

{{ group.C_DescriptionE }}

-
-
- - - - 社团属性 - - Club Info - - -

社团类型: {{ group.C_Category }}

- -
-
+ + + + {{ group.C_NameC }} + + {{ group.C_NameE }} + + +

{{ group.C_DescriptionC }}

+
+

{{ group.C_DescriptionE }}

+
+
+ + + + 社团属性 + + Club Info + + +

社团类型: {{ group.C_Category }}

+ +
+
@@ -61,4 +61,4 @@ definePageMeta({ \ No newline at end of file + From 10ca1f4a3de655ee78f5eedfaafdc932ff33bdef Mon Sep 17 00:00:00 2001 From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com> Date: Sat, 2 Mar 2024 13:16:33 +0800 Subject: [PATCH 03/38] style: make the code fit Lint style (again) --- pages/clubs/[id].vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/clubs/[id].vue b/pages/clubs/[id].vue index 523a6b0b..bcdbc77e 100644 --- a/pages/clubs/[id].vue +++ b/pages/clubs/[id].vue @@ -37,7 +37,7 @@ definePageMeta({

{{ group.C_DescriptionC }}

-
+

{{ group.C_DescriptionE }}

@@ -56,7 +56,9 @@ definePageMeta({ -

Sorry, but we didn't find anything here.

+

+ Sorry, but we didn't find anything here. +

From b3d26591b62c8dd2726f29df78f4d7bbafd04032 Mon Sep 17 00:00:00 2001 From: Alan Ye <45558679+AlanYe-Dev@users.noreply.github.com> Date: Sat, 2 Mar 2024 18:43:51 +0800 Subject: [PATCH 21/38] style: remove v-bind --- pages/clubs/[id].vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/clubs/[id].vue b/pages/clubs/[id].vue index 39eb74d3..2b1683a8 100644 --- a/pages/clubs/[id].vue +++ b/pages/clubs/[id].vue @@ -66,9 +66,11 @@ definePageMeta({
-

你当前访问的页面不存在,也许你应该考虑...

+

+ 你当前访问的页面不存在,也许你应该考虑... +


- +
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) || '
暂无简介 ;-(
' +if (filteredClubs[0] && filteredClubs[0].groups[0].C_DescriptionC) + Description_C = cleanHTML(filteredClubs[0].groups[0].C_DescriptionC) || '
暂无简介 ;-(
' else Description_C = '
暂无简介 ;-(
' @@ -32,35 +38,60 @@ definePageMeta({