1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-06-10 00:24:51 +00:00

feat(momotalk): add a single tool page for momotalk,

remove its scheduler,
and some minor improvements
This commit is contained in:
2025-10-13 11:39:43 +08:00
parent 02b8de6d18
commit 3cd8161afb
14 changed files with 103 additions and 75 deletions
+2 -20
View File
@@ -1062,28 +1062,10 @@
}
},
"Momotalk": {
"Scheduler": {
"Momotalk": {
"Enable": {
"type": "checkbox",
"value": false,
"option": [
true,
false
]
},
"NextRun": {
"type": "datetime",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Command": {
"type": "input",
"value": "Momotalk",
"display": "hide"
},
"ServerUpdate": {
"type": "input",
"value": "04:00",
"value": true,
"display": "hide"
}
}
+7
View File
@@ -267,3 +267,10 @@ ItemStorage:
stored: StoredTacticalChallengeTicket
order: 6
color: "#7ac8e5"
# ==================== Momotalk ====================
Momotalk:
Enable:
value: true
display: hide
+7 -1
View File
@@ -33,7 +33,13 @@
"tasks": [
"Circle",
"Task",
"Mail",
"Mail"
]
},
"Tool": {
"menu": "collapse",
"page": "tool",
"tasks": [
"Momotalk"
]
}
+8 -1
View File
@@ -80,5 +80,12 @@ Reward:
- Scheduler
Mail:
- Scheduler
# ==================== Tool ====================
Tool:
menu: 'collapse'
page: 'tool'
tasks:
Momotalk:
- Scheduler
- Momotalk
+3
View File
@@ -166,3 +166,6 @@ class GeneratedConfig:
ItemStorage_BountyTicket = {}
ItemStorage_ScrimmageTicket = {}
ItemStorage_TacticalChallengeTicket = {}
# Group `Momotalk`
Momotalk_Enable = True
+14
View File
@@ -15,6 +15,10 @@
"Reward": {
"name": "Reward",
"help": ""
},
"Tool": {
"name": "Tools",
"help": ""
}
},
"Task": {
@@ -849,6 +853,16 @@
"help": ""
}
},
"Momotalk": {
"_info": {
"name": "Momotalk",
"help": "Tools need to stop the scheduler and then run independently"
},
"Enable": {
"name": "",
"help": ""
}
},
"Gui": {
"Aside": {
"Install": "Install",
+14
View File
@@ -15,6 +15,10 @@
"Reward": {
"name": "收菜",
"help": ""
},
"Tool": {
"name": "工具",
"help": ""
}
},
"Task": {
@@ -849,6 +853,16 @@
"help": ""
}
},
"Momotalk": {
"_info": {
"name": "Momotalk",
"help": "工具需要停止调度器再单独运行"
},
"Enable": {
"name": "",
"help": ""
}
},
"Gui": {
"Aside": {
"Install": "安装",
+13 -12
View File
@@ -611,7 +611,7 @@ class AlasGUI(Frame):
[
put_scope("scheduler-bar"),
put_scope("groups"),
put_scope("log-bar"),
put_scope("daemon-log-bar"),
put_scope("log", [put_html("")]),
],
)
@@ -625,7 +625,7 @@ class AlasGUI(Frame):
[
put_scope(
"_daemon_upper",
[put_scope("scheduler-bar"), put_scope("log-bar")],
[put_scope("scheduler-bar"), put_scope("daemon-log-bar")],
),
put_scope("groups"),
put_scope("log", [put_html("")]),
@@ -654,16 +654,17 @@ class AlasGUI(Frame):
scope="scheduler_btn",
)
with use_scope("log-bar"):
put_text(t("Gui.Overview.Log")).style(
"font-size: 1.25rem; margin: auto .5rem auto;"
)
put_scope(
"log-bar-btns",
[
put_scope("log_scroll_btn"),
],
)
with use_scope("daemon-log-bar"):
with use_scope("log-title"):
put_text(t("Gui.Overview.Log")).style(
"font-size: 1.25rem; margin: auto .5rem auto;"
)
put_scope(
"log-bar-btns",
[
put_scope("log_scroll_btn"),
],
)
switch_log_scroll = BinarySwitchButton(
label_on=t("Gui.Button.ScrollON"),
+6 -1
View File
@@ -6,11 +6,12 @@ from multiprocessing import Process
from typing import Dict, List, Union
from filelock import FileLock
from rich.console import Console, ConsoleRenderable
from module.config.utils import filepath_config
from module.logger import logger, set_file_logger, set_func_logger
from module.webui.fake import get_config_mod, mod_instance
from module.webui.setting import State
from rich.console import Console, ConsoleRenderable
class ProcessManager:
@@ -147,6 +148,10 @@ class ProcessManager:
if e is not None:
AzurLaneAutoScript.stop_event = e
ArisuAutoSweeper(config_name=config_name).loop()
elif func == "Momotalk":
from tasks.momotalk.momotalk import MomoTalk
MomoTalk(config=config_name, task="Momotalk").run()
else:
logger.critical(f"No function matched: {func}")
logger.info(f"[{config_name}] exited. Reason: Finish\n")