feat(ui): 设置页拆分 LAN/Named/Quick 三区块,二维码与启停按实际运行通道显示(重做 #97 纯 UI 版) - #138
Open
alone-tree wants to merge 2 commits into
Open
alone-tree wants to merge 2 commits into
alone-tree wants to merge 2 commits into
Conversation
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.
背景
重做 #97(已关闭):按 review 意见重做成「真正纯 UI」的最小版本,设置页按 LAN / Named / Quick 三通道区块重组。设计依据见 #98 文档(决策 16 已随本 PR 修订)。
对照 review 意见逐条处理
lib/service.mjs。原 PR 的tunnelActiveMode字段删除,改为客户端纯 UI 推导——tunnelUrl为*.trycloudflare.com即 Quick、否则 Named、未运行则为 null(与既有namedTakeEffect提示的判定方式一致)。语义与后端字段等价,tunnelActiveMode留待后续设备认证 PR 再落地。adminRpcCall/POCKET_ADMIN_RPC_CHANNEL(那是设备认证 PR 才需要的)。tunnelStatusLine()(启动中/失败状态行)、publicPinRow()(公网访问密码行)、既有qrArea/Switch/row。三区块行为
tunnelStop→tunnelSetConfig→tunnelStart)完成「先停另一条、切配置、再开启」,无需后端配合。switchToQuick、modeBtnStyle、单区块公网 UI。测试与验收
node client/build.mjs重建 bundle;全量测试 178 例中 174 通过,3 个失败(download超时、tunnel-args假 cloudflared ENOENT、proxy端口)经与未改动的upstream/main基线复跑比对,为本机环境问题、与本次改动无关;守护本改动的test/smoke.test.js(bundle 可选链)与test/locales.test.js(zh/en key 对齐)均通过。docs/三通道独立管理改造方案.md决策 16)按仓库约定放在链尾提交。关联 #97、#90。