功能页入口迁移为远程配置驱动 - #33
Open
r1zzup wants to merge 1 commit into
Open
Conversation
zhxycn
reviewed
Aug 24, 2026
Member
There was a problem hiding this comment.
不需要添加默认App这层兜底,我们改为从远端拉取本身就是为了控制哪些功能是用户可见的
r1zzup
force-pushed
the
feat/function-apps-remote-config
branch
2 times, most recently
from
August 24, 2026 05:13
18076b0 to
0f058f7
Compare
zhxycn
requested changes
Aug 24, 2026
| ], | ||
| }, | ||
| ]; | ||
| function resolveLocalizedString(value: LocalizedString): string { |
| node_modules/ | ||
|
|
||
| # 项目使用 bun 作为包管理器;package-lock.json 由 npm 生成,不入库 | ||
| package-lock.json |
功能页入口由远程配置驱动,支持 route 与 lan 两种类型;新增 schema 校验;移除硬编码与默认兜底;清理 i18n 死键 Co-Authored-By: Claude <noreply@anthropic.com>
r1zzup
force-pushed
the
feat/function-apps-remote-config
branch
from
August 27, 2026 05:41
0f058f7 to
f7559d3
Compare
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.
功能页(学习工具 / 生活服务 / 校园资讯)的入口此前硬编码在前端。本次改为从远程配置仓库(
iwut-config)拉取function-apps.json,由远端控制哪些功能对用户可见,不再需要发版即可上/下线入口。改动
schemas/function-apps.schema.json:远程配置结构的 JSON Schema(draft-07),约束 id、颜色、路由/链接二选一等规则。services/function-apps.ts:拉取、解析并校验远程配置,非法条目静默丢弃,route/uri 互斥校验。store/function-apps.ts:Zustand store,5 分钟节流 + persist 持久化。app/(tabs)/function.tsx:改为从 store 读取分区与入口,移除本地默认兜底(远程即唯一来源),复用现有 i18n 辅助函数resolveLocalizedString。.gitignore:补充.gradle/与package-lock.json,避免本地构建噪声入库。lib/i18n中已无引用的死键。验证
ajv校验远程function-apps.json通过。bun install拉取main新引入的依赖)。