feat(core): 电源相关选项改为所有任务完成后生效
This commit is contained in:
@@ -266,27 +266,11 @@ class _TaskManager(QObject):
|
||||
Config.queue_dict[name]["Config"].queueSet_AfterAccomplish
|
||||
)
|
||||
!= "None"
|
||||
and not Config.power_signal
|
||||
):
|
||||
|
||||
from app.ui import ProgressRingMessageBox
|
||||
|
||||
mode_book = {
|
||||
"Shutdown": "关机",
|
||||
"Hibernate": "休眠",
|
||||
"Sleep": "睡眠",
|
||||
"KillSelf": "关闭AUTO_MAA",
|
||||
}
|
||||
|
||||
choice = ProgressRingMessageBox(
|
||||
Config.main_window,
|
||||
f"{mode_book[Config.queue_dict[name]["Config"].get(Config.queue_dict[name]["Config"].queueSet_AfterAccomplish)]}倒计时",
|
||||
Config.power_signal = Config.queue_dict[name]["Config"].get(
|
||||
Config.queue_dict[name]["Config"].queueSet_AfterAccomplish
|
||||
)
|
||||
if choice.exec():
|
||||
System.set_power(
|
||||
Config.queue_dict[name]["Config"].get(
|
||||
Config.queue_dict[name]["Config"].queueSet_AfterAccomplish
|
||||
)
|
||||
)
|
||||
|
||||
def check_maa_version(self, v: str):
|
||||
"""检查MAA版本"""
|
||||
|
||||
Reference in New Issue
Block a user