Repository navigation
设置页和设置弹窗改了就存,去掉「保存」按钮 - #453
Merged
Merged
Conversation
Merged
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.
设置页去掉「保存」按钮,改了就存:打字停 0.4 秒存,中文输入中不存,离开输入框、拨开关或点删除行这类按钮马上存,存的时候不重画输入框,光标不动。设置和 AI 平台分开存,一行平台没填完不耽误别的设置;这行打字时不标红,离开输入框才标红。接口地址改到别的主机会删掉已存的 Key,所以接口地址等离开输入框才存。存的时候没有点击,不能请求访问权限,改由页面顶部「未授权访问」横幅的「授权」按钮来请求。关页面时还没存出去的修改照样发出;如果它要排在一次进行中的保存后面,或者值不合法存不进去,浏览器先问一句。
收藏夹设置、关注设置、摘读记录设置三个弹窗只留「完成」,点它或按 Esc 关掉就存改过的项。取消勾选收藏夹会删取消收藏记录,所以单独弹确认框;关注设置天数不对时「完成」和 Esc 都不关,被强制关掉时不存并提示原因。
验证:
node scripts/selftest.mjs(41 个)和node scripts/smoke.mjs通过。另在临时 user-data-dir 的无头 Chrome 里加载扩展,真打字、按 Esc 后读 storage 核对:设置页 24 项(停顿后才存、光标不动、中文输入中不存、半填的平台不写也不标红、改接口地址打到一半 Key 还在、点按钮删掉属性行也存上、刷新后值还在),弹窗 7 项(Esc 和「完成」都存、关注天数不对时 Esc 关不掉)。收藏夹取消勾选的确认框要登录 B站 才读得到收藏夹,只有 selftest 覆盖。