Skip to content

Commit 92803d0

Browse files
authored
Merge pull request #39 from ZeroCatDev/copilot/add-donation-card-to-about-page
Add donation card to About page
2 parents 2f02dd9 + 2964c52 commit 92803d0

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

src/components/settings/AboutCard.vue

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,45 @@
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+
29+
</div>
30+
</div>
31+
</v-card-item>
32+
<v-card-text>
33+
<p class="text-body-2 mb-3">
34+
我是Classworks的开发者孙悟元,是一名高二的中国在校学生。Classworks 是一个完全开源免费的项目。如果可以,欢迎打赏。
35+
</p>
36+
<div class="mt-4">
37+
<v-btn
38+
append-icon="mdi-heart"
39+
aria-label="Support Classworks on Aifadian"
40+
class="text-none"
41+
color="pink"
42+
rounded="xl"
43+
variant="elevated"
44+
@click="openDonationLink"
45+
>
46+
爱发电
47+
</v-btn>
48+
</div>
49+
</v-card-text>
50+
</v-card>
51+
1352
<div class="d-flex flex-column align-start">
1453
<v-avatar class="mb-4" size="120">
1554
<v-img
@@ -378,6 +417,10 @@ export default {
378417
}
379418
};
380419
420+
const openDonationLink = () => {
421+
window.open('https://afdian.com/a/wydev', '_blank');
422+
};
423+
381424
onMounted(() => {
382425
loadDependencies();
383426
});
@@ -396,6 +439,7 @@ export default {
396439
openReportDialog,
397440
copyEnvInfo,
398441
openFeedback,
442+
openDonationLink,
399443
envBoxText,
400444
envInfo,
401445
reportBody,
@@ -405,3 +449,27 @@ export default {
405449
},
406450
};
407451
</script>
452+
453+
<style scoped>
454+
.gradient-donation {
455+
background: linear-gradient(135deg, rgba(236, 64, 122, 0.15), rgba(233, 30, 99, 0.08) 60%);
456+
border: 2px solid rgba(236, 64, 122, 0.25);
457+
transition: all 0.3s ease;
458+
cursor: pointer;
459+
}
460+
461+
.gradient-donation:hover {
462+
transform: translateY(-4px);
463+
box-shadow: 0 8px 24px rgba(236, 64, 122, 0.3) !important;
464+
}
465+
466+
.gradient-donation:active {
467+
transform: translateY(-2px);
468+
}
469+
470+
.card-content {
471+
display: flex;
472+
align-items: center;
473+
justify-content: space-between;
474+
}
475+
</style>

0 commit comments

Comments
 (0)