Skip to content

修改版权日期为自动更新#603

Merged
cute-omega merged 1 commit intodocmirror:masterfrom
afatcat-xie:master
Apr 22, 2026
Merged

修改版权日期为自动更新#603
cute-omega merged 1 commit intodocmirror:masterfrom
afatcat-xie:master

Conversation

@afatcat-xie
Copy link
Copy Markdown
Contributor

Ⅰ. 描述此PR的作用:

修改版权日期为自动更新

Ⅱ. 此PR修复了哪个issue吗?

Ⅲ. 界面变化截屏

并没有,只不过使用一个函数(Date().getFullYear())来动态获取时间(xxxx)插入版权2020-xxxx

Copy link
Copy Markdown

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

此 PR 旨在将版权年份从手动维护改为自动基于当前年份生成,避免每年手动更新。

Changes:

  • 在 Electron Builder 配置中将版权年份改为使用 new Date().getFullYear() 生成
  • 在 GUI 页脚展示中将年份改为动态渲染当前年份

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/gui/vue.config.js Electron Builder 版权信息年份改为构建时动态生成
packages/gui/linux-arm64.vue.config.js ARM64 Linux 构建配置同样改为构建时动态生成版权年份
packages/gui/src/view/App.vue 页脚版权年份改为运行时动态渲染当前年份

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

Comment on lines 226 to 228
<div class="mt5">
©2020-2026 docmirror.cn by
©2020-{{ new Date().getFullYear() }} docmirror.cn by
<a @click="openExternal('https://github.com/greper')">Greper</a>,
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

Avoid creating a new Date instance directly in the template interpolation. This expression is re-evaluated on every re-render and makes the template less declarative; define a currentYear data/computed property (or method) in the script section and interpolate that instead.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@afatcat-xie 修复该问题并通过测试后可合并(建议缓存该Date()对象)
md要不是copilot不能在跨仓库pr上使用我就指挥copilot修了

@cute-omega cute-omega merged commit 345f28d into docmirror:master Apr 22, 2026
17 checks passed
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.

3 participants