Repository navigation
feat(ui): 新增可选 ICP 备案号页脚 - #12
Merged
Merged
Conversation
备案号通过 VITE_ICP_BEIAN 注入(生产机 frontend/.env.local,已 gitignore),未配置时组件返回 null 零 DOM 痕迹;仓库与开源发布不含任何具体号码,部署方可随时 git pull 更新而不冲突。
# Conflicts: # docs/CHANGELOG.md # frontend/.env.example
9 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
新增可选的 ICP 备案号页脚,满足部署方合规展示需求,同时不给开源仓库引入任何具体信息。
frontend/src/config.ts新增icpBeian(读VITE_ICP_BEIAN)frontend/src/components/IcpFooter.tsx:未配置时直接return null(零 DOM 痕迹),配置后渲染链接工信部beian.miit.gov.cn的页脚(target="_blank" rel="noreferrer")frontend/.env.example增占位与说明;docs/CHANGELOG.md增条目frontend/src/components/IcpFooter.test.tsx(2 用例:未配置空 DOM / 配置后号码与链接属性正确)变更类型
feat新功能fix缺陷修复docs文档refactor重构(不改行为)chore构建/依赖/杂项目标分支
dev(feature/fix 常规合并)main(仅发版合并,dev → main)自查清单
feat/fix/docs/chore/+ 简短描述),基于最新dev创建cargo fmt --check/cargo clippy -D warnings/cargo test通过(后端改动)eslint/tsc --noEmit/ 测试 / 构建通过(前端改动)unwrap()(测试代码除外)、无unsafe、无any关联 issue / 备注
部署用法(不碰仓库):在生产机
frontend/.env.local(已被frontend/.gitignore忽略)写入重新构建即可展示;号码不进 Git,
git pull无冲突。注意VITE_*为构建期注入,改号码需重新构建。校验:
tsc -b --force0 / oxlint 0 / 49 tests / build 通过。