Skip to content

功能页入口迁移为远程配置驱动 - #33

Open
r1zzup wants to merge 1 commit into
TokenTeam:mainfrom
r1zzup:feat/function-apps-remote-config
Open

功能页入口迁移为远程配置驱动#33
r1zzup wants to merge 1 commit into
TokenTeam:mainfrom
r1zzup:feat/function-apps-remote-config

Conversation

@r1zzup

@r1zzup r1zzup commented Aug 23, 2026

Copy link
Copy Markdown

改动内容

  • 功能页 9 个入口从硬编码迁移为远程配置(iwut-config/function-apps.json)驱动
  • 支持 route(应用内路由,成绩/考试)与 lan(校园网确认)两种新入口类型
  • 新增本地默认回退配置,远程拉取失败/为空时仍展示默认入口
  • 新增 function-apps.schema.json 校验远程配置结构

涉及文件

  • services/function-apps.ts
  • constants/default-function-apps.ts
  • app/(tabs)/function.tsx
  • app/_layout.tsx
  • lib/i18n/locales/{zh,en}.json
  • schemas/function-apps.schema.json

验证

  • tsc --noEmit 通过
  • 远程配置已通过 ajv 按 schema 校验

@r1zzup
r1zzup requested a review from zhxycn as a code owner August 23, 2026 19:43

@zhxycn zhxycn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

请清理你的分支,本地构建测试的噪声不应提交至仓库

Comment thread constants/default-function-apps.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

不需要添加默认App这层兜底,我们改为从远端拉取本身就是为了控制哪些功能是用户可见的

@r1zzup
r1zzup force-pushed the feat/function-apps-remote-config branch from 9dbe85a to 18076b0 Compare August 24, 2026 05:07
功能页入口由远程配置驱动,支持 route 与 lan 两种类型;新增 schema 校验;移除硬编码与默认兜底;清理 i18n 死键

Co-Authored-By: Claude <noreply@anthropic.com>
@r1zzup
r1zzup force-pushed the feat/function-apps-remote-config branch from 18076b0 to 0f058f7 Compare August 24, 2026 05:13
Comment thread app/(tabs)/function.tsx
],
},
];
function resolveLocalizedString(value: LocalizedString): string {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i18n辅助函数项目里有,直接使用即可

Comment thread .gitignore
node_modules/

# 项目使用 bun 作为包管理器;package-lock.json 由 npm 生成,不入库
package-lock.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

不应修改此文件

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.

2 participants