Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add club member list #519

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export default defineNuxtConfig({
},
googleFonts: {
families: {
'Inter': true,
'Noto Sans SC': true,
'IBM+Plex+Mono': true,
'Inter': [400, 500],
'Noto Sans SC': [400, 500],
'IBM+Plex+Mono': [400, 500],
},
},
runtimeConfig: {
Expand Down
35 changes: 32 additions & 3 deletions pages/cas/clubs/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,43 @@ definePageMeta({
</CardDescription>
</CardHeader>
<CardContent>
<div v-if="hasDescriptionC" v-text="Description_C" />
<div v-else class="text-sm italic text-muted-foreground text-center w-full">
<div class="font-bold">
简介
</div>
<div v-if="hasDescriptionC" class="my-3" v-text="Description_C" />
<div v-else class="text-sm italic text-muted-foreground text-center w-full my-2">
暂无简介 ;-(
</div>
<!-- Don't show the English Description until i18n is completed -->
<Separator class="my-4" />
<div class="font-bold">
成员
</div>
<div v-if="club.gmember.length === 0" class="text-sm italic text-muted-foreground text-center w-full my-2">
暂无成员 ;-(
</div>
<div v-else class="mt-3">
<div class="flex flex-wrap">
<div v-for="(member, index) in club.gmember" :key="member.StudentID" class="flex items-center">
<div class="flex items-center">
<span class="">{{ member.S_Name }}</span> <span class="text-muted-foreground">({{ member.S_Nickname }})</span>
<Badge v-if="Number(member.LeaderYes) === 2" variant="default" class="ml-1">
社长
</Badge>
<Badge v-else-if="Number(member.LeaderYes) === 1" variant="secondary" class="ml-1">
副社
</Badge>
<Badge v-else variant="outline" class="ml-1">
社员
</Badge>
<span v-if="index < club.gmember.length - 1" class="mx-2">/</span>
</div>
</div>
</div>
</div>
</CardContent>
</Card>
<Card class="xl:w-1/4 w-full xl:ml-2">
<Card class="xl:w-1/4 w-full xl:ml-2 h-min">
<CardHeader>
<CardTitle class="flex items-center gap-x-1">
社团属性
Expand Down