Skip to content

Commit b77ddc2

Browse files
committed
feat: tidy date
1 parent 7d437f8 commit b77ddc2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import type { Lang } from "./i18n";
1414
1515
const { t, locale } = useI18n({ useScope: "global" });
1616
17+
const currentYear = new Date().getFullYear();
18+
1719
const currentLang = computed<Lang>({
1820
get: () => locale.value as Lang,
1921
set: (lang) => {
@@ -288,7 +290,7 @@ onUnmounted(() => {
288290
<footer class="footer">
289291
<div class="footer-content">
290292
<p class="copyright">
291-
<span>{{ t("footer.copyright") }}</span>
293+
<span>{{ t("footer.copyright", { year: currentYear }) }}</span>
292294
<span class="footer-divider" aria-hidden="true"> · </span>
293295
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">蜀ICP备2023035054号-3</a>
294296
</p>

src/i18n.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const messages = {
144144
qrHint: "扫码关注,获取最新动态",
145145
},
146146
footer: {
147-
copyright: 2025 RushDB. All Rights Reserved.",
147+
copyright: 2024-{year} RushDB. All Rights Reserved.",
148148
},
149149
language: {
150150
zh: "🇨🇳 中文",
@@ -293,7 +293,7 @@ const messages = {
293293
qrHint: "Scan to follow for updates",
294294
},
295295
footer: {
296-
copyright: 2025 RushDB. All Rights Reserved.",
296+
copyright: 2024-{year} RushDB. All Rights Reserved.",
297297
},
298298
language: {
299299
zh: "🇨🇳 中文",
@@ -442,7 +442,7 @@ const messages = {
442442
qrHint: "QRコードでフォローして最新情報を入手",
443443
},
444444
footer: {
445-
copyright: 2025 RushDB. All Rights Reserved.",
445+
copyright: 2024 - {year} RushDB. All Rights Reserved.",
446446
},
447447
language: {
448448
zh: "🇨🇳 中文",

0 commit comments

Comments
 (0)