feat(ui): 优化主调度台默认选项
This commit is contained in:
@@ -29,7 +29,7 @@ __version__ = "4.2.0"
|
|||||||
__author__ = "DLmaster361 <DLmaster_361@163.com>"
|
__author__ = "DLmaster361 <DLmaster_361@163.com>"
|
||||||
__license__ = "GPL-3.0 license"
|
__license__ = "GPL-3.0 license"
|
||||||
|
|
||||||
from .core import AppConfig, QueueConfig, MaaConfig, Task, Task_manager, Main_timer
|
from .core import AppConfig, QueueConfig, MaaConfig, Task, TaskManager, MainTimer
|
||||||
from .models import MaaManager
|
from .models import MaaManager
|
||||||
from .services import Notify, Crypto, System
|
from .services import Notify, Crypto, System
|
||||||
from .ui import AUTO_MAA
|
from .ui import AUTO_MAA
|
||||||
@@ -40,8 +40,8 @@ __all__ = [
|
|||||||
"QueueConfig",
|
"QueueConfig",
|
||||||
"MaaConfig",
|
"MaaConfig",
|
||||||
"Task",
|
"Task",
|
||||||
"Task_manager",
|
"TaskManager",
|
||||||
"Main_timer",
|
"MainTimer",
|
||||||
"MaaManager",
|
"MaaManager",
|
||||||
"Notify",
|
"Notify",
|
||||||
"Crypto",
|
"Crypto",
|
||||||
|
|||||||
@@ -166,20 +166,31 @@ class DispatchCenter(QWidget):
|
|||||||
"""更新顶栏"""
|
"""更新顶栏"""
|
||||||
|
|
||||||
list = []
|
list = []
|
||||||
|
queue_numb, member_numb = 0, 0
|
||||||
|
|
||||||
if (Config.app_path / "config/QueueConfig").exists():
|
if (Config.app_path / "config/QueueConfig").exists():
|
||||||
for json_file in (Config.app_path / "config/QueueConfig").glob("*.json"):
|
for json_file in (Config.app_path / "config/QueueConfig").glob("*.json"):
|
||||||
list.append(f"队列 - {json_file.stem}")
|
list.append(f"队列 - {json_file.stem}")
|
||||||
|
queue_numb += 1
|
||||||
|
|
||||||
if (Config.app_path / "config/MaaConfig").exists():
|
if (Config.app_path / "config/MaaConfig").exists():
|
||||||
for subdir in (Config.app_path / "config/MaaConfig").iterdir():
|
for subdir in (Config.app_path / "config/MaaConfig").iterdir():
|
||||||
if subdir.is_dir():
|
if subdir.is_dir():
|
||||||
list.append(f"实例 - Maa - {subdir.name}")
|
list.append(f"实例 - Maa - {subdir.name}")
|
||||||
|
member_numb += 1
|
||||||
|
|
||||||
self.script_list["主调度台"].top_bar.object.clear()
|
self.script_list["主调度台"].top_bar.object.clear()
|
||||||
self.script_list["主调度台"].top_bar.object.addItems(list)
|
self.script_list["主调度台"].top_bar.object.addItems(list)
|
||||||
self.script_list["主调度台"].top_bar.object.setCurrentIndex(-1)
|
self.script_list["主调度台"].top_bar.mode.clear()
|
||||||
self.script_list["主调度台"].top_bar.mode.setCurrentIndex(-1)
|
self.script_list["主调度台"].top_bar.mode.addItems(["自动代理", "人工排查"])
|
||||||
|
|
||||||
|
if queue_numb == 1:
|
||||||
|
self.script_list["主调度台"].top_bar.object.setCurrentIndex(0)
|
||||||
|
elif member_numb == 1:
|
||||||
|
self.script_list["主调度台"].top_bar.object.setCurrentIndex(queue_numb)
|
||||||
|
else:
|
||||||
|
self.script_list["主调度台"].top_bar.object.setCurrentIndex(-1)
|
||||||
|
self.script_list["主调度台"].top_bar.mode.setCurrentIndex(0)
|
||||||
|
|
||||||
|
|
||||||
class DispatchBox(QWidget):
|
class DispatchBox(QWidget):
|
||||||
@@ -223,7 +234,6 @@ class DispatchBox(QWidget):
|
|||||||
self.object = ComboBox()
|
self.object = ComboBox()
|
||||||
self.object.setPlaceholderText("请选择调度对象")
|
self.object.setPlaceholderText("请选择调度对象")
|
||||||
self.mode = ComboBox()
|
self.mode = ComboBox()
|
||||||
self.mode.addItems(["自动代理", "人工排查"])
|
|
||||||
self.mode.setPlaceholderText("请选择调度模式")
|
self.mode.setPlaceholderText("请选择调度模式")
|
||||||
|
|
||||||
self.button = PushButton("开始任务")
|
self.button = PushButton("开始任务")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"main_version": "4.2.3.1",
|
"main_version": "4.2.3.1",
|
||||||
"updater_version": "1.1.1.3",
|
"updater_version": "1.1.1.3",
|
||||||
"announcement": "\n## 新增功能\n- 添加`简洁用户列表下相邻两个任务间的切换方式`可选项\n## 修复BUG\n- 修复静默代理标记移除异常情况\n## 程序优化\n- 优化MAA关闭方法\n- 添加高级代理文件校验过程\n- 升级日志监看方法",
|
"announcement": "\n## 新增功能\n- 添加`简洁用户列表下相邻两个任务间的切换方式`可选项\n## 修复BUG\n- 修复静默代理标记移除异常情况\n## 程序优化\n- 优化MAA关闭方法\n- 添加高级代理文件校验过程\n- 升级日志监看方法\n- 优化部分代码逻辑\n- 优化部分UI显示\n- 优化部分提示信息\n- 优化主调度台默认选项",
|
||||||
"proxy_list": [
|
"proxy_list": [
|
||||||
"",
|
"",
|
||||||
"https://gitproxy.click/",
|
"https://gitproxy.click/",
|
||||||
|
|||||||
Reference in New Issue
Block a user