Skip to content

Add donation card to About page#39

Merged
Sunwuyuan merged 5 commits intomainfrom
copilot/add-donation-card-to-about-page
Feb 3, 2026
Merged

Add donation card to About page#39
Sunwuyuan merged 5 commits intomainfrom
copilot/add-donation-card-to-about-page

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

Adds prominent donation card to Settings > About page linking to https://afdian.com/a/wydev.

Changes

  • AboutCard.vue: Added donation card component at top of About section
    • Pink gradient card with heart emoji and Chinese call-to-action
    • Opens Aifadian link in new tab via openDonationLink() method
    • Follows existing Vuetify 3 card patterns (elevation, hover transforms)

Screenshot

Donation card on About page

The card uses a linear-gradient background with pink tones and includes accessibility attributes (aria-label) for the CTA button.

Original prompt

给关于页面添加美观的大卡片提示请用户捐赠,指向https://afdian.com/a/wydev


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 3, 2026

Deploying classworks with  Cloudflare Pages  Cloudflare Pages

Latest commit: faea001
Status: ✅  Deploy successful!
Preview URL: https://5848d5f5.classworks.pages.dev
Branch Preview URL: https://copilot-add-donation-card-to.classworks.pages.dev

View logs

…ria-label

Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add donation card to about page Add donation card to About page Feb 3, 2026
Copilot AI requested a review from Sunwuyuan February 3, 2026 00:17
@Sunwuyuan Sunwuyuan marked this pull request as ready for review February 3, 2026 00:24
Copilot AI review requested due to automatic review settings February 3, 2026 00:24
@Sunwuyuan Sunwuyuan merged commit 92803d0 into main Feb 3, 2026
3 of 5 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a prominent donation card to the Settings > About page, encouraging users to support the Classworks project through the Aifadian (爱发电) platform.

Changes:

  • Added a pink gradient donation card component with hover effects at the top of the About section
  • Implemented openDonationLink() method to open https://afdian.com/a/wydev in a new tab
  • Added custom CSS styles following existing gradient card patterns in the codebase

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

color="pink"
rounded="xl"
variant="elevated"
@click="openDonationLink"
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The click handler is defined on both the card (line 22) and the button inside it (line 44). When the button is clicked, both click handlers will fire due to event bubbling. Consider adding @click.stop to the button's click handler to prevent the event from propagating to the parent card, or remove the click handler from one of these elements.

Suggested change
@click="openDonationLink"
@click.stop="openDonationLink"

Copilot uses AI. Check for mistakes.
Comment on lines +469 to +474

.card-content {
display: flex;
align-items: center;
justify-content: space-between;
}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .card-content CSS class is defined but not used for any functional styling in the donation card. The div structure with this class (lines 25-30) contains unnecessary nesting with empty divs. Consider simplifying this structure or removing the unused class definition.

Suggested change
.card-content {
display: flex;
align-items: center;
justify-content: space-between;
}

Copilot uses AI. Check for mistakes.
<!-- 捐赠卡片 -->
<v-card
border
class="donation-card gradient-donation clickable mb-6"
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'clickable' class is used but not defined in this component's scoped styles. While it may work if defined globally or in another component, scoped styles won't apply it here. The cursor: pointer is already set in .gradient-donation (line 458), making this class redundant. Consider removing the 'clickable' class from the v-card.

Suggested change
class="donation-card gradient-donation clickable mb-6"
class="donation-card gradient-donation mb-6"

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +31
<div class="card-content">
<div>
<div class="text-h6 font-weight-bold">请支持我们 Classworks</div>

</div>
</div>
</v-card-item>
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structure contains unnecessary nested divs (lines 26-29) with one being empty (line 29). This creates needless DOM depth without adding functionality. Simplify by removing the wrapper divs and placing the title directly in v-card-item.

Suggested change
<div class="card-content">
<div>
<div class="text-h6 font-weight-bold">请支持我们 Classworks</div>
</div>
</div>
</v-card-item>
<v-card-title class="text-h6 font-weight-bold">
请支持我们 Classworks
</v-card-title>
</v-card-item>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants