Skip to content
Open
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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# 赞赏码

网站免费、开源、保持简单,如果你想支持作者,请使用微信扫描赞赏码,以下是赞赏榜的前10名赞助者(最后更新 2025.9.10
网站免费、开源、保持简单,如果你想支持作者,请使用微信扫描赞赏码,以下是赞赏榜的前10名赞助者(最后更新 2026.3.5

<img src="./misc/images/approve.png" alt="wechat" style="width: 35%; max-width: 100%;border: 1px solid black;">

Expand All @@ -42,10 +42,10 @@
| 1 | 冰楠 ₿.Ξ 🧘 | 188 |
| 2 | 高胖胖 | 101 |
| 3 | 不疯就行 | 100 |
| 4 | 魏鹏程 | 88 |
| 5 | 什么长发及腰不如短发凉 | 87 |
| 6 | Youyo🍊 | 66 |
| 7 | 安分wa | 50 |
| 8 | 高小伦 | 50 |
| 9 | | 30 |
| 10 | 匿名用户 | 30 |
| 4 | | 100 |
| 5 | 魏鹏程 | 88 |
| 6 | 什么长发及腰不如短发凉 | 87 |
| 7 | Youyo🍊 | 66 |
| 8 | 安分wa | 50 |
| 9 | 高小伦 | 50 |
| 10 | | 30 |
18 changes: 9 additions & 9 deletions static/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ const i18n = {
zh: '《赞助名单》',
},
sponsorHint: {
en: 'The website is free, open-source, and kept simple. If you want to support the author, please scan the sponsor code with WeChat. Below are the top 10 sponsors (last updated on 2025.1.21)',
zh: '网站免费、开源、保持简单,如果你想支持作者,请使用微信扫描赞赏码,以下是赞赏榜的前10名赞助者(最后更新 2025.9.10)',
en: 'The website is free, open-source, and kept simple. If you want to support the author, please scan the sponsor code with WeChat. Below are the top 10 sponsors (last updated on 2026.3.5)',
zh: '网站免费、开源、保持简单,如果你想支持作者,请使用微信扫描赞赏码,以下是赞赏榜的前10名赞助者(最后更新 2026.3.5)',
Comment on lines +266 to +267
Copy link

Choose a reason for hiding this comment

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

suggestion: Avoid hardcoding the 'last updated' date in localized strings to reduce maintenance overhead.

The date is duplicated in both English and Chinese strings, so it must be updated in multiple places each time sponsor data changes. Instead, derive it from a single source (e.g., a sponsorLastUpdated constant or sponsor data) and interpolate it into the localized strings to keep them in sync automatically.

Suggested implementation:

  sponsorHint: {
    en: `The website is free, open-source, and kept simple. If you want to support the author, please scan the sponsor code with WeChat. Below are the top 10 sponsors (last updated on ${sponsorLastUpdated})`,
    zh: `网站免费、开源、保持简单,如果你想支持作者,请使用微信扫描赞赏码,以下是赞赏榜的前10名赞助者(最后更新 ${sponsorLastUpdated})`,
  },

To fully implement this, you also need to introduce a single source of truth for sponsorLastUpdated:

  1. If this file uses a normal <script> block with export default:

    • Add a module-level constant near the top of the script:
      const sponsorLastUpdated = '2026.3.5';
    • Place it just after <script> and before export default { ... }.
  2. If this file uses <script setup>:

    • Add the same constant inside the <script setup> block:
      const sponsorLastUpdated = '2026.3.5';
  3. For a more robust solution, consider deriving sponsorLastUpdated from your sponsor data (e.g., a lastUpdated field on the sponsor list) instead of hardcoding '2026.3.5'. In that case, ensure sponsorLastUpdated is computed once and reused in the sponsorHint strings.

},
no: {
en: 'No.',
Expand Down Expand Up @@ -325,13 +325,13 @@ const sponsorData = [
{'no': '1', 'name': '冰楠 ₿.Ξ 🧘', 'sponsorship': '188'},
{'no': '2', 'name': '高胖胖', 'sponsorship': '101'},
{'no': '3', 'name': '不疯就行', 'sponsorship': '100'},
{'no': '4', 'name': '魏鹏程', 'sponsorship': '88'},
{'no': '5', 'name': '什么长发及腰不如短发凉', 'sponsorship': '87'},
{'no': '6', 'name': 'Youyo🍊', 'sponsorship': '66'},
{'no': '7', 'name': '安分wa', 'sponsorship': '50'},
{'no': '8', 'name': '高小伦', 'sponsorship': '50'},
{'no': '9', 'name': '', 'sponsorship': '30'},
{'no': '10', 'name': '匿名用户', 'sponsorship': '30'}
{'no': '4', 'name': '', 'sponsorship': '100'},
{'no': '5', 'name': '魏鹏程', 'sponsorship': '88'},
{'no': '6', 'name': '什么长发及腰不如短发凉', 'sponsorship': '87'},
{'no': '7', 'name': 'Youyo🍊', 'sponsorship': '66'},
{'no': '8', 'name': '安分wa', 'sponsorship': '50'},
{'no': '9', 'name': '高小伦', 'sponsorship': '50'},
{'no': '10', 'name': '', 'sponsorship': '30'}
]

function reset(msg) {
Expand Down