Skip to content

Commit 8691feb

Browse files
CopilotSunwuyuan
andcommitted
Add beautiful donation card to About page
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
1 parent 67598f8 commit 8691feb

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

src/components/settings/AboutCard.vue

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,47 @@
1010
<v-card-text>
1111
<v-row>
1212
<v-col class="mx-auto" cols="12" md="8">
13+
<!-- 捐赠卡片 -->
14+
<v-card
15+
border
16+
class="donation-card gradient-donation clickable mb-6"
17+
color="pink-lighten-4"
18+
elevation="8"
19+
hover
20+
rounded="xl"
21+
variant="tonal"
22+
@click="openDonationLink"
23+
>
24+
<v-card-item>
25+
<div class="card-content">
26+
<div>
27+
<div class="text-h6 font-weight-bold">❤️ 支持 Classworks</div>
28+
<div class="text-caption text-medium-emphasis mt-1">
29+
您的捐赠将帮助项目持续发展
30+
</div>
31+
</div>
32+
</div>
33+
</v-card-item>
34+
<v-card-text>
35+
<p class="text-body-2 mb-3">
36+
Classworks 是一个完全开源免费的项目,由社区开发者们利用业余时间维护。
37+
如果这个工具对您有帮助,您可以考虑通过爱发电支持开发者。
38+
</p>
39+
<div class="mt-4">
40+
<v-btn
41+
append-icon="mdi-heart"
42+
class="text-none"
43+
color="pink"
44+
rounded="xl"
45+
variant="elevated"
46+
@click="openDonationLink"
47+
>
48+
前往爱发电支持开发者
49+
</v-btn>
50+
</div>
51+
</v-card-text>
52+
</v-card>
53+
1354
<div class="d-flex flex-column align-start">
1455
<v-avatar class="mb-4" size="120">
1556
<v-img
@@ -378,6 +419,10 @@ export default {
378419
}
379420
};
380421
422+
const openDonationLink = () => {
423+
window.open('https://afdian.com/a/wydev', '_blank');
424+
};
425+
381426
onMounted(() => {
382427
loadDependencies();
383428
});
@@ -396,6 +441,7 @@ export default {
396441
openReportDialog,
397442
copyEnvInfo,
398443
openFeedback,
444+
openDonationLink,
399445
envBoxText,
400446
envInfo,
401447
reportBody,
@@ -405,3 +451,31 @@ export default {
405451
},
406452
};
407453
</script>
454+
455+
<style scoped>
456+
.gradient-donation {
457+
background: linear-gradient(135deg, rgba(236, 64, 122, 0.15), rgba(233, 30, 99, 0.08) 60%);
458+
border: 2px solid rgba(236, 64, 122, 0.25);
459+
transition: all 0.3s ease;
460+
cursor: pointer;
461+
}
462+
463+
.gradient-donation:hover {
464+
transform: translateY(-4px);
465+
box-shadow: 0 8px 24px rgba(236, 64, 122, 0.3) !important;
466+
}
467+
468+
.gradient-donation:active {
469+
transform: translateY(-2px);
470+
}
471+
472+
.clickable {
473+
cursor: pointer;
474+
}
475+
476+
.card-content {
477+
display: flex;
478+
align-items: center;
479+
justify-content: space-between;
480+
}
481+
</style>

0 commit comments

Comments
 (0)