为程序添加 Sudo 模式 - #283
Draft
CreeperAWA wants to merge 4 commits into
Draft
为程序添加 Sudo 模式#283CreeperAWA wants to merge 4 commits into
CreeperAWA wants to merge 4 commits into
Conversation
实现了sudo模式功能,验证通过后可在配置时长内跳过敏感操作验证。包含全局sudo模式和设置页面独立sudo模式,添加了退出sudo模式的托盘菜单项,支持自定义sudo有效时长。
修正并补充了设置页面独立sudo生命周期的描述,明确其触发时机和生效范围
当sudo模式过期时,正确重置过期时间并触发状态变更通知,完善过期判断后的清理逻辑
新增托盘菜单sudo模式选项的分隔符管理和定时刷新功能,修复sudo模式状态更新不及时的问题,自动控制分隔符的显示与隐藏
CreeperAWA
marked this pull request as draft
September 20, 2026 12:12
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.
Sudo 模式可以在已经确认用户有权限访问某些功能的前提下跳过验证以减少验证次数,比如在安全设置页面调整窗口与应用的保护时不需要为每次操作都输入密码。
Sudo 模式会在通过验证后自动启用,非设置页面下默认 60s 后自动退出(可在安全设置页面修改),也可在托盘手动退出;设置页面下 Sudo 模式会在关闭设置页面后退出,同时不可在托盘手动退出也不会因超时自动退出。设置页面的 Sudo 与其他页面独立,不会互相干扰,在其他页面通过验证不会跳过设置页面的验证,反之亦然。