Merge branch 'fluent-gui-dev'
This commit is contained in:
@@ -49,8 +49,6 @@ class AppConfig:
|
||||
|
||||
# 检查文件完整性
|
||||
self.initialize()
|
||||
self.check_config()
|
||||
self.check_database()
|
||||
|
||||
def initialize(self) -> None:
|
||||
"""初始化程序的配置文件"""
|
||||
@@ -83,6 +81,9 @@ class AppConfig:
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
self.check_config()
|
||||
self.check_database()
|
||||
|
||||
def check_config(self) -> None:
|
||||
"""检查配置文件字段完整性并补全"""
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class Notification:
|
||||
title=title,
|
||||
message=message,
|
||||
app_name="AUTO_MAA",
|
||||
app_icon=self.config.app_path / "resources/icons/AUTO_MAA.ico",
|
||||
app_icon=str(self.config.app_path / "resources/icons/AUTO_MAA.ico"),
|
||||
timeout=t,
|
||||
ticker=ticker,
|
||||
toast=True,
|
||||
|
||||
478
app/ui/gui.py
478
app/ui/gui.py
@@ -26,26 +26,35 @@ v4.2
|
||||
"""
|
||||
|
||||
from PySide6.QtWidgets import (
|
||||
QWidget,
|
||||
QMainWindow,
|
||||
QApplication,
|
||||
QSystemTrayIcon,
|
||||
QMenu,
|
||||
QInputDialog,
|
||||
QFileDialog,
|
||||
QMessageBox,
|
||||
QLineEdit,
|
||||
QTabWidget,
|
||||
QToolBox,
|
||||
QTableWidget,
|
||||
QTableWidgetItem,
|
||||
QComboBox,
|
||||
QPushButton,
|
||||
QHeaderView,
|
||||
QSpinBox,
|
||||
QTimeEdit,
|
||||
QCheckBox,
|
||||
QTextBrowser,
|
||||
QWidget, #
|
||||
QMainWindow, #
|
||||
QApplication, #
|
||||
QSystemTrayIcon, #
|
||||
QFileDialog, #
|
||||
QTabWidget, #
|
||||
QToolBox, #
|
||||
QComboBox, #
|
||||
QTableWidgetItem, #
|
||||
QHeaderView, #
|
||||
)
|
||||
from qfluentwidgets import (
|
||||
Action,
|
||||
PushButton,
|
||||
LineEdit,
|
||||
PasswordLineEdit,
|
||||
TextBrowser,
|
||||
TableWidget,
|
||||
TimePicker,
|
||||
ComboBox,
|
||||
CheckBox,
|
||||
SpinBox,
|
||||
FluentIcon,
|
||||
RoundMenu,
|
||||
MessageBox,
|
||||
MessageBoxBase,
|
||||
HeaderCardWidget,
|
||||
BodyLabel,
|
||||
SubtitleLabel,
|
||||
)
|
||||
from PySide6.QtUiTools import QUiLoader
|
||||
from PySide6.QtGui import QIcon, QCloseEvent
|
||||
@@ -149,32 +158,22 @@ class Main(QWidget):
|
||||
"-",
|
||||
]
|
||||
|
||||
uiLoader.registerCustomWidget(PushButton)
|
||||
uiLoader.registerCustomWidget(LineEdit)
|
||||
uiLoader.registerCustomWidget(TextBrowser)
|
||||
uiLoader.registerCustomWidget(TableWidget)
|
||||
uiLoader.registerCustomWidget(TimePicker)
|
||||
uiLoader.registerCustomWidget(SpinBox)
|
||||
uiLoader.registerCustomWidget(CheckBox)
|
||||
uiLoader.registerCustomWidget(HeaderCardWidget)
|
||||
uiLoader.registerCustomWidget(BodyLabel)
|
||||
|
||||
# 导入ui配置
|
||||
self.ui = uiLoader.load(self.config.app_path / "resources/gui/main.ui")
|
||||
self.ui.setWindowIcon(
|
||||
QIcon(str(self.config.app_path / "resources/icons/AUTO_MAA.ico"))
|
||||
)
|
||||
|
||||
# 生成管理密钥
|
||||
if not self.config.key_path.exists():
|
||||
while True:
|
||||
self.PASSWORD, ok_pressed = QInputDialog.getText(
|
||||
self.ui,
|
||||
"请设置管理密钥",
|
||||
"未检测到管理密钥,请设置您的管理密钥:",
|
||||
QLineEdit.Password,
|
||||
"",
|
||||
)
|
||||
if ok_pressed and self.PASSWORD != "":
|
||||
self.crypto.get_PASSWORD(self.PASSWORD)
|
||||
break
|
||||
else:
|
||||
choice = QMessageBox.question(
|
||||
self.ui, "确认", "您没有输入管理密钥,确定要暂时跳过这一步吗?"
|
||||
)
|
||||
if choice == QMessageBox.Yes:
|
||||
break
|
||||
|
||||
# 初始化控件
|
||||
self.main_tab: QTabWidget = self.ui.findChild(QTabWidget, "tabWidget_main")
|
||||
self.main_tab.currentChanged.connect(self.change_config)
|
||||
@@ -182,141 +181,144 @@ class Main(QWidget):
|
||||
self.user_set: QToolBox = self.ui.findChild(QToolBox, "toolBox_userset")
|
||||
self.user_set.currentChanged.connect(lambda: self.update_user_info("normal"))
|
||||
|
||||
self.user_list_simple: QTableWidget = self.ui.findChild(
|
||||
QTableWidget, "tableWidget_userlist_simple"
|
||||
self.user_list_simple: TableWidget = self.ui.findChild(
|
||||
TableWidget, "tableWidget_userlist_simple"
|
||||
)
|
||||
self.user_list_simple.itemChanged.connect(
|
||||
lambda item: self.change_user_Item(item, "simple")
|
||||
)
|
||||
|
||||
self.user_list_beta: QTableWidget = self.ui.findChild(
|
||||
QTableWidget, "tableWidget_userlist_beta"
|
||||
self.user_list_beta: TableWidget = self.ui.findChild(
|
||||
TableWidget, "tableWidget_userlist_beta"
|
||||
)
|
||||
self.user_list_beta.itemChanged.connect(
|
||||
lambda item: self.change_user_Item(item, "beta")
|
||||
)
|
||||
|
||||
self.user_add: QPushButton = self.ui.findChild(QPushButton, "pushButton_new")
|
||||
self.user_add: PushButton = self.ui.findChild(PushButton, "pushButton_new")
|
||||
self.user_add.setIcon(FluentIcon.ADD_TO)
|
||||
self.user_add.clicked.connect(self.add_user)
|
||||
|
||||
self.user_del: QPushButton = self.ui.findChild(QPushButton, "pushButton_del")
|
||||
self.user_del: PushButton = self.ui.findChild(PushButton, "pushButton_del")
|
||||
self.user_del.setIcon(FluentIcon.REMOVE_FROM)
|
||||
self.user_del.clicked.connect(self.del_user)
|
||||
|
||||
self.user_switch: QPushButton = self.ui.findChild(
|
||||
QPushButton, "pushButton_switch"
|
||||
self.user_switch: PushButton = self.ui.findChild(
|
||||
PushButton, "pushButton_switch"
|
||||
)
|
||||
self.user_switch.setIcon(FluentIcon.MOVE)
|
||||
self.user_switch.clicked.connect(self.switch_user)
|
||||
|
||||
self.read_PASSWORD: QPushButton = self.ui.findChild(
|
||||
QPushButton, "pushButton_password"
|
||||
self.read_PASSWORD: PushButton = self.ui.findChild(
|
||||
PushButton, "pushButton_password"
|
||||
)
|
||||
self.read_PASSWORD.setIcon(FluentIcon.HIDE)
|
||||
self.read_PASSWORD.clicked.connect(lambda: self.read("key"))
|
||||
|
||||
self.refresh: QPushButton = self.ui.findChild(QPushButton, "pushButton_refresh")
|
||||
self.refresh: PushButton = self.ui.findChild(PushButton, "pushButton_refresh")
|
||||
self.refresh.setIcon(FluentIcon.SYNC)
|
||||
self.refresh.clicked.connect(lambda: self.update_user_info("clear"))
|
||||
|
||||
self.run_now: QPushButton = self.ui.findChild(QPushButton, "pushButton_runnow")
|
||||
self.run_now: PushButton = self.ui.findChild(PushButton, "pushButton_runnow")
|
||||
self.run_now.setIcon(FluentIcon.PLAY)
|
||||
self.run_now.clicked.connect(lambda: self.maa_starter("日常代理"))
|
||||
|
||||
self.check_start: QPushButton = self.ui.findChild(
|
||||
QPushButton, "pushButton_checkstart"
|
||||
self.check_start: PushButton = self.ui.findChild(
|
||||
PushButton, "pushButton_checkstart"
|
||||
)
|
||||
self.check_start.setIcon(FluentIcon.PLAY)
|
||||
self.check_start.clicked.connect(lambda: self.maa_starter("人工排查"))
|
||||
|
||||
self.maa_path: QLineEdit = self.ui.findChild(QLineEdit, "lineEdit_MAApath")
|
||||
self.maa_path: LineEdit = self.ui.findChild(LineEdit, "lineEdit_MAApath")
|
||||
self.maa_path.textChanged.connect(self.change_config)
|
||||
self.maa_path.setReadOnly(True)
|
||||
|
||||
self.get_maa_path: QPushButton = self.ui.findChild(
|
||||
QPushButton, "pushButton_getMAApath"
|
||||
self.get_maa_path: PushButton = self.ui.findChild(
|
||||
PushButton, "pushButton_getMAApath"
|
||||
)
|
||||
self.get_maa_path.setIcon(FluentIcon.FOLDER)
|
||||
self.get_maa_path.clicked.connect(lambda: self.read("file_path_maa"))
|
||||
|
||||
self.set_maa: QPushButton = self.ui.findChild(QPushButton, "pushButton_setMAA")
|
||||
self.set_maa: PushButton = self.ui.findChild(PushButton, "pushButton_setMAA")
|
||||
self.set_maa.setIcon(FluentIcon.SETTING)
|
||||
self.set_maa.clicked.connect(lambda: self.maa_starter("设置MAA_全局"))
|
||||
|
||||
self.routine: QSpinBox = self.ui.findChild(QSpinBox, "spinBox_routine")
|
||||
self.routine: SpinBox = self.ui.findChild(SpinBox, "spinBox_routine")
|
||||
self.routine.valueChanged.connect(self.change_config)
|
||||
|
||||
self.annihilation: QSpinBox = self.ui.findChild(
|
||||
QSpinBox, "spinBox_annihilation"
|
||||
)
|
||||
self.annihilation: SpinBox = self.ui.findChild(SpinBox, "spinBox_annihilation")
|
||||
self.annihilation.valueChanged.connect(self.change_config)
|
||||
|
||||
self.num: QSpinBox = self.ui.findChild(QSpinBox, "spinBox_numt")
|
||||
self.num: SpinBox = self.ui.findChild(SpinBox, "spinBox_numt")
|
||||
self.num.valueChanged.connect(self.change_config)
|
||||
|
||||
self.if_self_start: QCheckBox = self.ui.findChild(
|
||||
QCheckBox, "checkBox_ifselfstart"
|
||||
self.if_self_start: CheckBox = self.ui.findChild(
|
||||
CheckBox, "checkBox_ifselfstart"
|
||||
)
|
||||
self.if_self_start.stateChanged.connect(self.change_config)
|
||||
|
||||
self.if_sleep: QCheckBox = self.ui.findChild(QCheckBox, "checkBox_ifsleep")
|
||||
self.if_sleep: CheckBox = self.ui.findChild(CheckBox, "checkBox_ifsleep")
|
||||
self.if_sleep.stateChanged.connect(self.change_config)
|
||||
|
||||
self.if_proxy_directly: QCheckBox = self.ui.findChild(
|
||||
QCheckBox, "checkBox_ifproxydirectly"
|
||||
self.if_proxy_directly: CheckBox = self.ui.findChild(
|
||||
CheckBox, "checkBox_ifproxydirectly"
|
||||
)
|
||||
self.if_proxy_directly.stateChanged.connect(self.change_config)
|
||||
|
||||
self.if_send_mail: QCheckBox = self.ui.findChild(
|
||||
QCheckBox, "checkBox_ifsendmail"
|
||||
)
|
||||
self.if_send_mail: CheckBox = self.ui.findChild(CheckBox, "checkBox_ifsendmail")
|
||||
self.if_send_mail.stateChanged.connect(self.change_config)
|
||||
|
||||
self.mail_address: QLineEdit = self.ui.findChild(
|
||||
QLineEdit, "lineEdit_mailaddress"
|
||||
self.mail_address: LineEdit = self.ui.findChild(
|
||||
LineEdit, "lineEdit_mailaddress"
|
||||
)
|
||||
self.mail_address.textChanged.connect(self.change_config)
|
||||
|
||||
self.if_send_error_only: QCheckBox = self.ui.findChild(
|
||||
QCheckBox, "checkBox_ifonlyerror"
|
||||
self.if_send_error_only: CheckBox = self.ui.findChild(
|
||||
CheckBox, "checkBox_ifonlyerror"
|
||||
)
|
||||
self.if_send_error_only.stateChanged.connect(self.change_config)
|
||||
|
||||
self.if_silence: QCheckBox = self.ui.findChild(QCheckBox, "checkBox_silence")
|
||||
self.if_silence: CheckBox = self.ui.findChild(CheckBox, "checkBox_silence")
|
||||
self.if_silence.stateChanged.connect(self.change_config)
|
||||
|
||||
self.boss_key: QLineEdit = self.ui.findChild(QLineEdit, "lineEdit_boss")
|
||||
self.boss_key: LineEdit = self.ui.findChild(LineEdit, "lineEdit_boss")
|
||||
self.boss_key.textChanged.connect(self.change_config)
|
||||
|
||||
self.if_to_tray: QCheckBox = self.ui.findChild(QCheckBox, "checkBox_iftotray")
|
||||
self.if_to_tray: CheckBox = self.ui.findChild(CheckBox, "checkBox_iftotray")
|
||||
self.if_to_tray.stateChanged.connect(self.change_config)
|
||||
|
||||
self.check_update: QCheckBox = self.ui.findChild(
|
||||
QPushButton, "pushButton_check_update"
|
||||
self.check_update: PushButton = self.ui.findChild(
|
||||
PushButton, "pushButton_check_update"
|
||||
)
|
||||
self.check_update.setIcon(FluentIcon.UPDATE)
|
||||
self.check_update.clicked.connect(self.check_version)
|
||||
|
||||
self.tips: QTextBrowser = self.ui.findChild(QTextBrowser, "textBrowser_tips")
|
||||
self.tips: TextBrowser = self.ui.findChild(TextBrowser, "textBrowser_tips")
|
||||
self.tips.setOpenExternalLinks(True)
|
||||
|
||||
self.run_text: QTextBrowser = self.ui.findChild(QTextBrowser, "textBrowser_run")
|
||||
self.wait_text: QTextBrowser = self.ui.findChild(
|
||||
QTextBrowser, "textBrowser_wait"
|
||||
self.run_text: TextBrowser = self.ui.findChild(TextBrowser, "textBrowser_run")
|
||||
self.wait_text: TextBrowser = self.ui.findChild(TextBrowser, "textBrowser_wait")
|
||||
self.over_text: TextBrowser = self.ui.findChild(TextBrowser, "textBrowser_over")
|
||||
self.error_text: TextBrowser = self.ui.findChild(
|
||||
TextBrowser, "textBrowser_error"
|
||||
)
|
||||
self.over_text: QTextBrowser = self.ui.findChild(
|
||||
QTextBrowser, "textBrowser_over"
|
||||
)
|
||||
self.error_text: QTextBrowser = self.ui.findChild(
|
||||
QTextBrowser, "textBrowser_error"
|
||||
)
|
||||
self.log_text: QTextBrowser = self.ui.findChild(QTextBrowser, "textBrowser_log")
|
||||
self.log_text: TextBrowser = self.ui.findChild(TextBrowser, "textBrowser_log")
|
||||
|
||||
self.start_time: List[Tuple[QCheckBox, QTimeEdit]] = []
|
||||
self.start_time: List[Tuple[CheckBox, TimePicker]] = []
|
||||
for i in range(10):
|
||||
self.start_time.append(
|
||||
[
|
||||
self.ui.findChild(QCheckBox, f"checkBox_t{i + 1}"),
|
||||
self.ui.findChild(QTimeEdit, f"timeEdit_{i + 1}"),
|
||||
self.ui.findChild(CheckBox, f"checkBox_t{i + 1}"),
|
||||
self.ui.findChild(TimePicker, f"timeEdit_{i + 1}"),
|
||||
]
|
||||
)
|
||||
self.start_time[i][0].stateChanged.connect(self.change_config)
|
||||
self.start_time[i][1].timeChanged.connect(self.change_config)
|
||||
|
||||
self.change_password: QPushButton = self.ui.findChild(
|
||||
QPushButton, "pushButton_changePASSWORD"
|
||||
self.change_password: PushButton = self.ui.findChild(
|
||||
PushButton, "pushButton_changePASSWORD"
|
||||
)
|
||||
self.change_password.setIcon(FluentIcon.VPN)
|
||||
self.change_password.clicked.connect(self.change_PASSWORD)
|
||||
|
||||
# 初始化线程
|
||||
@@ -345,6 +347,24 @@ class Main(QWidget):
|
||||
if self.config.content["Default"]["SelfSet.IfProxyDirectly"] == "True":
|
||||
self.maa_starter("日常代理")
|
||||
|
||||
def check_PASSWORD(self) -> None:
|
||||
"""检查并配置管理密钥"""
|
||||
|
||||
if self.config.key_path.exists():
|
||||
return None
|
||||
|
||||
while True:
|
||||
|
||||
if self.read("setkey"):
|
||||
self.crypto.get_PASSWORD(self.PASSWORD)
|
||||
break
|
||||
else:
|
||||
choice = MessageBox(
|
||||
"确认", "您没有输入管理密钥,确定要暂时跳过这一步吗?", self.ui
|
||||
)
|
||||
if choice.exec():
|
||||
break
|
||||
|
||||
def change_PASSWORD(self) -> None:
|
||||
"""修改管理密钥"""
|
||||
|
||||
@@ -353,24 +373,30 @@ class Main(QWidget):
|
||||
data = self.config.cur.fetchall()
|
||||
|
||||
if len(data) == 0:
|
||||
QMessageBox.information(self.ui, "验证通过", "当前无用户,验证自动通过")
|
||||
choice = MessageBox("验证通过", "当前无用户,验证自动通过", self.ui)
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
# 获取新的管理密钥
|
||||
while True:
|
||||
PASSWORD_new = self.read("newkey")
|
||||
if PASSWORD_new == 0:
|
||||
choice = QMessageBox.question(
|
||||
self.ui,
|
||||
"确认",
|
||||
"您没有输入新的管理密钥,是否取消修改管理密钥?",
|
||||
)
|
||||
if choice == QMessageBox.Yes:
|
||||
break
|
||||
else:
|
||||
# 修改管理密钥
|
||||
self.PASSWORD = PASSWORD_new
|
||||
self.crypto.get_PASSWORD(self.PASSWORD)
|
||||
QMessageBox.information(self.ui, "操作成功", "管理密钥修改成功")
|
||||
break
|
||||
if choice.exec():
|
||||
while True:
|
||||
PASSWORD_new = self.read("newkey")
|
||||
if PASSWORD_new == None:
|
||||
choice = MessageBox(
|
||||
"确认",
|
||||
"您没有输入新的管理密钥,是否取消修改管理密钥?",
|
||||
self.ui,
|
||||
)
|
||||
if choice.exec():
|
||||
break
|
||||
else:
|
||||
# 修改管理密钥
|
||||
self.PASSWORD = PASSWORD_new
|
||||
self.crypto.get_PASSWORD(self.PASSWORD)
|
||||
choice = MessageBox("操作成功", "管理密钥修改成功", self.ui)
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
break
|
||||
else:
|
||||
# 验证管理密钥
|
||||
if_change = True
|
||||
@@ -378,18 +404,22 @@ class Main(QWidget):
|
||||
if self.read("oldkey"):
|
||||
# 验证旧管理密钥
|
||||
if not self.crypto.check_PASSWORD(self.PASSWORD):
|
||||
QMessageBox.critical(self.ui, "错误", "管理密钥错误")
|
||||
choice = MessageBox("错误", "管理密钥错误", self.ui)
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
pass
|
||||
else:
|
||||
# 获取新的管理密钥
|
||||
while True:
|
||||
PASSWORD_new = self.read("newkey")
|
||||
if PASSWORD_new == 0:
|
||||
choice = QMessageBox.question(
|
||||
self.ui,
|
||||
if PASSWORD_new == None:
|
||||
choice = MessageBox(
|
||||
"确认",
|
||||
"您没有输入新的管理密钥,是否取消修改管理密钥?",
|
||||
self.ui,
|
||||
)
|
||||
if choice == QMessageBox.Yes:
|
||||
if choice.exec():
|
||||
if_change = False
|
||||
break
|
||||
# 修改管理密钥
|
||||
@@ -398,16 +428,21 @@ class Main(QWidget):
|
||||
data, self.PASSWORD, PASSWORD_new
|
||||
)
|
||||
self.PASSWORD = PASSWORD_new
|
||||
QMessageBox.information(
|
||||
self.ui, "操作成功", "管理密钥修改成功"
|
||||
choice = MessageBox(
|
||||
"操作成功", "管理密钥修改成功", self.ui
|
||||
)
|
||||
if_change = False
|
||||
break
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
if_change = False
|
||||
break
|
||||
else:
|
||||
choice = QMessageBox.question(
|
||||
self.ui, "确认", "您没有输入管理密钥,是否取消修改管理密钥?"
|
||||
choice = MessageBox(
|
||||
"确认",
|
||||
"您没有输入管理密钥,是否取消修改管理密钥?",
|
||||
self.ui,
|
||||
)
|
||||
if choice == QMessageBox.Yes:
|
||||
if choice.exec():
|
||||
break
|
||||
|
||||
def update_user_info(self, operation: str) -> None:
|
||||
@@ -444,7 +479,7 @@ class Main(QWidget):
|
||||
|
||||
# 生成表格组件
|
||||
if j == 2:
|
||||
item = QComboBox()
|
||||
item = ComboBox()
|
||||
item.addItems(["官服", "B服"])
|
||||
if value == "Official":
|
||||
item.setCurrentIndex(0)
|
||||
@@ -524,7 +559,7 @@ class Main(QWidget):
|
||||
|
||||
# 生成表格组件
|
||||
if j in [4, 9, 10]:
|
||||
item = QComboBox()
|
||||
item = ComboBox()
|
||||
if j == 4:
|
||||
item.addItems(["启用", "禁用"])
|
||||
elif j in [9, 10]:
|
||||
@@ -579,11 +614,11 @@ class Main(QWidget):
|
||||
|
||||
# 设置列表可编辑状态
|
||||
if self.if_user_list_editable:
|
||||
self.user_list_simple.setEditTriggers(QTableWidget.AllEditTriggers)
|
||||
self.user_list_beta.setEditTriggers(QTableWidget.AllEditTriggers)
|
||||
self.user_list_simple.setEditTriggers(TableWidget.AllEditTriggers)
|
||||
self.user_list_beta.setEditTriggers(TableWidget.AllEditTriggers)
|
||||
else:
|
||||
self.user_list_simple.setEditTriggers(QTableWidget.NoEditTriggers)
|
||||
self.user_list_beta.setEditTriggers(QTableWidget.NoEditTriggers)
|
||||
self.user_list_simple.setEditTriggers(TableWidget.NoEditTriggers)
|
||||
self.user_list_beta.setEditTriggers(TableWidget.NoEditTriggers)
|
||||
|
||||
# 允许GUI改变被同步到本地数据库
|
||||
self.if_update_database = True
|
||||
@@ -683,12 +718,15 @@ class Main(QWidget):
|
||||
|
||||
# 判断是否已设置管理密钥
|
||||
if not self.config.key_path.exists():
|
||||
QMessageBox.critical(
|
||||
self.ui,
|
||||
choice = MessageBox(
|
||||
"错误",
|
||||
"请先设置管理密钥再执行添加用户操作",
|
||||
self.ui,
|
||||
)
|
||||
return None
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
return None
|
||||
|
||||
# 插入预设用户数据
|
||||
set_book = [
|
||||
@@ -719,8 +757,11 @@ class Main(QWidget):
|
||||
|
||||
# 判断选择合理性
|
||||
if row == -1:
|
||||
QMessageBox.critical(self.ui, "错误", "请选中一个用户后再执行删除操作")
|
||||
return None
|
||||
choice = MessageBox("错误", "请选中一个用户后再执行删除操作", self.ui)
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
return None
|
||||
|
||||
# 确认待删除用户信息
|
||||
self.config.cur.execute(
|
||||
@@ -731,12 +772,10 @@ class Main(QWidget):
|
||||
),
|
||||
)
|
||||
data = self.config.cur.fetchall()
|
||||
choice = QMessageBox.question(
|
||||
self.ui, "确认", f"确定要删除用户 {data[0][0]} 吗?"
|
||||
)
|
||||
choice = MessageBox("确认", f"确定要删除用户 {data[0][0]} 吗?", self.ui)
|
||||
|
||||
# 删除用户
|
||||
if choice == QMessageBox.Yes:
|
||||
if choice.exec():
|
||||
# 删除所选用户
|
||||
self.config.cur.execute(
|
||||
"DELETE FROM adminx WHERE mode = ? AND uid = ?",
|
||||
@@ -791,8 +830,11 @@ class Main(QWidget):
|
||||
|
||||
# 判断选择合理性
|
||||
if row == -1:
|
||||
QMessageBox.critical(self.ui, "错误", "请选中一个用户后再执行切换操作")
|
||||
return None
|
||||
choice = MessageBox("错误", "请选中一个用户后再执行切换操作", self.ui)
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
return None
|
||||
|
||||
# 确认待切换用户信息
|
||||
self.config.cur.execute(
|
||||
@@ -805,14 +847,14 @@ class Main(QWidget):
|
||||
data = self.config.cur.fetchall()
|
||||
|
||||
mode_list = ["简洁", "高级"]
|
||||
choice = QMessageBox.question(
|
||||
self.ui,
|
||||
choice = MessageBox(
|
||||
"确认",
|
||||
f"确定要将用户 {data[0][0]} 转为{mode_list[1 - self.user_set.currentIndex()]}配置模式吗?",
|
||||
self.ui,
|
||||
)
|
||||
|
||||
# 切换用户
|
||||
if choice == QMessageBox.Yes:
|
||||
if choice.exec():
|
||||
self.config.cur.execute("SELECT * FROM adminx WHERE True")
|
||||
data = self.config.cur.fetchall()
|
||||
if self.user_set.currentIndex() == 0:
|
||||
@@ -886,12 +928,15 @@ class Main(QWidget):
|
||||
)
|
||||
return True
|
||||
else:
|
||||
QMessageBox.critical(
|
||||
self.ui,
|
||||
choice = MessageBox(
|
||||
"错误",
|
||||
"未选择自定义基建文件",
|
||||
self.ui,
|
||||
)
|
||||
return False
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
return False
|
||||
# 获取高级用户MAA配置文件
|
||||
elif info[2] in ["routine", "annihilation"]:
|
||||
(
|
||||
@@ -904,7 +949,7 @@ class Main(QWidget):
|
||||
/ f"data/MAAconfig/{self.user_mode_list[info[0]]}/{info[1]}/{info[2]}",
|
||||
)
|
||||
|
||||
def change_user_Item(self, item: QTableWidget, mode):
|
||||
def change_user_Item(self, item: TableWidget, mode):
|
||||
"""将GUI中发生修改的用户配置表中的一般信息同步至本地数据库"""
|
||||
|
||||
# 验证能否写入本地数据库
|
||||
@@ -1078,11 +1123,13 @@ class Main(QWidget):
|
||||
)
|
||||
self.get_maa_config(["Default"])
|
||||
else:
|
||||
QMessageBox.critical(
|
||||
self.ui,
|
||||
choice = MessageBox(
|
||||
"错误",
|
||||
"该路径下未找到MAA.exe或MAA配置文件,请重新设置MAA路径!",
|
||||
self.ui,
|
||||
)
|
||||
if choice.exec():
|
||||
pass
|
||||
|
||||
self.config.content["Default"][
|
||||
"SelfSet.MainIndex"
|
||||
@@ -1135,7 +1182,7 @@ class Main(QWidget):
|
||||
self.config.content["Default"][f"TimeSet.set{i + 1}"] = "True"
|
||||
else:
|
||||
self.config.content["Default"][f"TimeSet.set{i + 1}"] = "False"
|
||||
time = self.start_time[i][1].time().toString("HH:mm")
|
||||
time = self.start_time[i][1].getTime().toString("HH:mm")
|
||||
self.config.content["Default"][f"TimeSet.run{i + 1}"] = time
|
||||
|
||||
# 将配置信息同步至本地JSON文件
|
||||
@@ -1153,40 +1200,78 @@ class Main(QWidget):
|
||||
def read(self, operation):
|
||||
"""弹出对话框组件进行读入"""
|
||||
|
||||
class InputMessageBox(MessageBoxBase):
|
||||
"""输入对话框"""
|
||||
|
||||
def __init__(self, parent, title: str, content: str, mode: str):
|
||||
super().__init__(parent)
|
||||
self.title = SubtitleLabel(title)
|
||||
|
||||
if mode == "明文":
|
||||
self.input = LineEdit()
|
||||
elif mode == "密码":
|
||||
self.input = PasswordLineEdit()
|
||||
|
||||
self.input.setPlaceholderText(content)
|
||||
self.input.setClearButtonEnabled(True)
|
||||
|
||||
# 将组件添加到布局中
|
||||
self.viewLayout.addWidget(self.title)
|
||||
self.viewLayout.addWidget(self.input)
|
||||
|
||||
# 读入PASSWORD
|
||||
if operation == "key":
|
||||
self.PASSWORD, ok_pressed = QInputDialog.getText(
|
||||
self.ui, "请输入管理密钥", "管理密钥:", QLineEdit.Password, ""
|
||||
)
|
||||
if ok_pressed and self.PASSWORD != "":
|
||||
|
||||
choice = InputMessageBox(self.ui, "请输入管理密钥", "管理密钥", "密码")
|
||||
if choice.exec() and choice.input.text() != "":
|
||||
self.PASSWORD = choice.input.text()
|
||||
self.update_user_info("normal")
|
||||
|
||||
elif operation == "oldkey":
|
||||
self.PASSWORD, ok_pressed = QInputDialog.getText(
|
||||
self.ui, "请输入旧的管理密钥", "旧管理密钥:", QLineEdit.Password, ""
|
||||
|
||||
choice = InputMessageBox(
|
||||
self.ui, "请输入旧的管理密钥", "旧管理密钥", "密码"
|
||||
)
|
||||
if ok_pressed and self.PASSWORD != "":
|
||||
if choice.exec() and choice.input.text() != "":
|
||||
self.PASSWORD = choice.input.text()
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
elif operation == "newkey":
|
||||
new_PASSWORD, ok_pressed = QInputDialog.getText(
|
||||
self.ui, "请输入新的管理密钥", "新管理密钥:", QLineEdit.Password, ""
|
||||
|
||||
choice = InputMessageBox(
|
||||
self.ui, "请输入新的管理密钥", "新管理密钥", "密码"
|
||||
)
|
||||
if ok_pressed and new_PASSWORD != "":
|
||||
return new_PASSWORD
|
||||
if choice.exec() and choice.input.text() != "":
|
||||
return choice.input.text()
|
||||
else:
|
||||
return None
|
||||
|
||||
elif operation == "setkey":
|
||||
|
||||
choice = InputMessageBox(
|
||||
self.ui,
|
||||
"未检测到管理密钥,请设置您的管理密钥",
|
||||
"管理密钥",
|
||||
"密码",
|
||||
)
|
||||
if choice.exec() and choice.input.text() != "":
|
||||
self.PASSWORD = choice.input.text()
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
# 读入选择
|
||||
elif operation == "question_runner":
|
||||
choice = QMessageBox.question(
|
||||
self.ui,
|
||||
choice = MessageBox(
|
||||
self.MaaManager.question_title,
|
||||
self.MaaManager.question_info,
|
||||
None,
|
||||
)
|
||||
if choice == QMessageBox.Yes:
|
||||
if choice.exec():
|
||||
self.MaaManager.question_choice = "Yes"
|
||||
elif choice == QMessageBox.No:
|
||||
else:
|
||||
self.MaaManager.question_choice = "No"
|
||||
|
||||
# 读入MAA文件目录
|
||||
@@ -1334,8 +1419,11 @@ class Main(QWidget):
|
||||
Path(self.config.content["Default"]["MaaSet.path"]) / "config/gui.json"
|
||||
).exists()
|
||||
):
|
||||
QMessageBox.critical(self.ui, "错误", "您还未正确配置MAA路径!")
|
||||
return None
|
||||
choice = MessageBox("错误", "您还未正确配置MAA路径!", self.ui)
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
return None
|
||||
|
||||
self.maa_running_set(f"{mode}_开始")
|
||||
|
||||
@@ -1458,12 +1546,15 @@ class Main(QWidget):
|
||||
err = e
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
QMessageBox.critical(
|
||||
self.ui,
|
||||
choice = MessageBox(
|
||||
"错误",
|
||||
f"获取版本信息时出错:\n{err}",
|
||||
self.ui,
|
||||
)
|
||||
return None
|
||||
choice.cancelButton.hide()
|
||||
choice.buttonLayout.insertStretch(1)
|
||||
if choice.exec():
|
||||
return None
|
||||
|
||||
main_version_remote = list(map(int, version_remote["main_version"].split(".")))
|
||||
updater_version_remote = list(
|
||||
@@ -1490,12 +1581,12 @@ class Main(QWidget):
|
||||
)
|
||||
|
||||
# 询问是否开始版本更新
|
||||
choice = QMessageBox.question(
|
||||
self.ui,
|
||||
choice = MessageBox(
|
||||
"版本更新",
|
||||
f"发现新版本:\n{main_version_info}{updater_version_info} 更新说明:\n{version_remote['announcement'].replace("\n# ","\n !").replace("\n## ","\n - ").replace("\n- ","\n · ")}\n\n是否开始更新?\n\n 注意:主程序更新时AUTO_MAA将自动关闭",
|
||||
self.ui,
|
||||
)
|
||||
if choice == QMessageBox.No:
|
||||
if not choice.exec():
|
||||
return None
|
||||
|
||||
# 更新更新器
|
||||
@@ -1567,25 +1658,36 @@ class AUTO_MAA(QMainWindow):
|
||||
self,
|
||||
)
|
||||
self.tray.setToolTip("AUTO_MAA")
|
||||
self.tray_menu = QMenu()
|
||||
self.tray_menu = RoundMenu()
|
||||
|
||||
# 显示主界面菜单项
|
||||
show_main = self.tray_menu.addAction("显示主界面")
|
||||
show_main.triggered.connect(self.show_main)
|
||||
self.tray_menu.addAction(
|
||||
Action(FluentIcon.CAFE, "显示主界面", triggered=self.show_main)
|
||||
)
|
||||
self.tray_menu.addSeparator()
|
||||
|
||||
# 开始任务菜单项
|
||||
start_task_1 = self.tray_menu.addAction("运行日常代理")
|
||||
start_task_1.triggered.connect(lambda: self.start_task("日常代理"))
|
||||
|
||||
start_task_2 = self.tray_menu.addAction("运行人工排查")
|
||||
start_task_2.triggered.connect(lambda: self.start_task("人工排查"))
|
||||
|
||||
stop_task = self.tray_menu.addAction("中止当前任务")
|
||||
stop_task.triggered.connect(self.stop_task)
|
||||
self.tray_menu.addActions(
|
||||
[
|
||||
Action(
|
||||
FluentIcon.PLAY,
|
||||
"运行日常代理",
|
||||
triggered=lambda: self.start_task("日常代理"),
|
||||
),
|
||||
# Action(
|
||||
# FluentIcon.PLAY,
|
||||
# "运行人工排查",
|
||||
# triggered=lambda: self.start_task("人工排查"),
|
||||
# ),
|
||||
Action(FluentIcon.PAUSE, "中止当前任务", triggered=self.stop_task),
|
||||
]
|
||||
)
|
||||
self.tray_menu.addSeparator()
|
||||
|
||||
# 退出主程序菜单项
|
||||
kill = self.tray_menu.addAction("退出主程序")
|
||||
kill.triggered.connect(self.kill_main)
|
||||
self.tray_menu.addAction(
|
||||
Action(FluentIcon.POWER_BUTTON, "退出主程序", triggered=self.kill_main)
|
||||
)
|
||||
|
||||
# 设置托盘菜单
|
||||
self.tray.setContextMenu(self.tray_menu)
|
||||
|
||||
@@ -38,9 +38,8 @@ from PySide6.QtWidgets import (
|
||||
QApplication,
|
||||
QDialog,
|
||||
QVBoxLayout,
|
||||
QLabel,
|
||||
QProgressBar,
|
||||
)
|
||||
from qfluentwidgets import ProgressBar, BodyLabel
|
||||
from PySide6.QtGui import QIcon
|
||||
from PySide6.QtCore import QObject, QThread, Signal
|
||||
|
||||
@@ -265,10 +264,10 @@ class Updater(QObject):
|
||||
# 创建垂直布局
|
||||
self.Layout_v = QVBoxLayout(self.ui)
|
||||
|
||||
self.info = QLabel("正在初始化", self.ui)
|
||||
self.info = BodyLabel("正在初始化", self.ui)
|
||||
self.Layout_v.addWidget(self.info)
|
||||
|
||||
self.progress = QProgressBar(self.ui)
|
||||
self.progress = ProgressBar(self.ui)
|
||||
self.progress.setRange(0, 0)
|
||||
self.Layout_v.addWidget(self.progress)
|
||||
|
||||
|
||||
1
main.py
1
main.py
@@ -38,4 +38,5 @@ if __name__ == "__main__":
|
||||
|
||||
application = QApplication(sys.argv)
|
||||
window = AUTO_MAA(config=config, notify=notify, crypto=crypto)
|
||||
window.main.check_PASSWORD()
|
||||
sys.exit(application.exec())
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plyer
|
||||
PySide6
|
||||
PySide6-Fluent-Widgets[full]
|
||||
psutil
|
||||
pywin32
|
||||
pyautogui
|
||||
|
||||
@@ -39,21 +39,21 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_new">
|
||||
<widget class="PushButton" name="pushButton_new">
|
||||
<property name="text">
|
||||
<string>新建</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_del">
|
||||
<widget class="PushButton" name="pushButton_del">
|
||||
<property name="text">
|
||||
<string>删除</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_switch">
|
||||
<widget class="PushButton" name="pushButton_switch">
|
||||
<property name="text">
|
||||
<string>转为</string>
|
||||
</property>
|
||||
@@ -73,14 +73,14 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_password">
|
||||
<widget class="PushButton" name="pushButton_password">
|
||||
<property name="text">
|
||||
<string>显示密码</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_refresh">
|
||||
<widget class="PushButton" name="pushButton_refresh">
|
||||
<property name="text">
|
||||
<string>刷新</string>
|
||||
</property>
|
||||
@@ -107,7 +107,7 @@
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget_userlist_simple">
|
||||
<widget class="TableWidget" name="tableWidget_userlist_simple">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
@@ -191,7 +191,7 @@
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget_userlist_beta">
|
||||
<widget class="TableWidget" name="tableWidget_userlist_beta">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
@@ -253,7 +253,7 @@
|
||||
<property name="title">
|
||||
<string>定时执行</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_27">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0">
|
||||
@@ -266,7 +266,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,0">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t1">
|
||||
<widget class="CheckBox" name="checkBox_t1">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -288,7 +288,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_1"/>
|
||||
<widget class="TimePicker" name="timeEdit_1"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -303,7 +303,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t10">
|
||||
<widget class="CheckBox" name="checkBox_t10">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -325,7 +325,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_10"/>
|
||||
<widget class="TimePicker" name="timeEdit_10"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -340,7 +340,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t3">
|
||||
<widget class="CheckBox" name="checkBox_t3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -362,7 +362,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_3"/>
|
||||
<widget class="TimePicker" name="timeEdit_3"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -377,7 +377,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t2">
|
||||
<widget class="CheckBox" name="checkBox_t2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -399,7 +399,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_2"/>
|
||||
<widget class="TimePicker" name="timeEdit_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -414,7 +414,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t9">
|
||||
<widget class="CheckBox" name="checkBox_t9">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -436,7 +436,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_9"/>
|
||||
<widget class="TimePicker" name="timeEdit_9"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -451,7 +451,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t4">
|
||||
<widget class="CheckBox" name="checkBox_t4">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -473,7 +473,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_4"/>
|
||||
<widget class="TimePicker" name="timeEdit_4"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -488,7 +488,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t6">
|
||||
<widget class="CheckBox" name="checkBox_t6">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -510,7 +510,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_6"/>
|
||||
<widget class="TimePicker" name="timeEdit_6"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -525,7 +525,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t5">
|
||||
<widget class="CheckBox" name="checkBox_t5">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -547,7 +547,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_5"/>
|
||||
<widget class="TimePicker" name="timeEdit_5"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -562,7 +562,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t8">
|
||||
<widget class="CheckBox" name="checkBox_t8">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -584,7 +584,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_7"/>
|
||||
<widget class="TimePicker" name="timeEdit_7"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -599,7 +599,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_t7">
|
||||
<widget class="CheckBox" name="checkBox_t7">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -621,7 +621,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="timeEdit_8"/>
|
||||
<widget class="TimePicker" name="timeEdit_8"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -651,7 +651,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_main">
|
||||
<widget class="BodyLabel" name="label_main">
|
||||
<property name="text">
|
||||
<string>调度器</string>
|
||||
</property>
|
||||
@@ -671,14 +671,14 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_checkstart">
|
||||
<widget class="PushButton" name="pushButton_checkstart">
|
||||
<property name="text">
|
||||
<string>开始排查</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_runnow">
|
||||
<widget class="PushButton" name="pushButton_runnow">
|
||||
<property name="text">
|
||||
<string>立即执行</string>
|
||||
</property>
|
||||
@@ -706,7 +706,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser_run"/>
|
||||
<widget class="TextBrowser" name="textBrowser_run"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -728,7 +728,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser_wait"/>
|
||||
<widget class="TextBrowser" name="textBrowser_wait"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -750,7 +750,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser_over"/>
|
||||
<widget class="TextBrowser" name="textBrowser_over"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -772,7 +772,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser_error"/>
|
||||
<widget class="TextBrowser" name="textBrowser_error"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -796,7 +796,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser_log"/>
|
||||
<widget class="TextBrowser" name="textBrowser_log"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -816,7 +816,7 @@
|
||||
<property name="title">
|
||||
<string>MAA设置</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_maaset">
|
||||
<property name="frameShape">
|
||||
@@ -827,17 +827,17 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,20,2,1,2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="BodyLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>MAA路径</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_MAApath"/>
|
||||
<widget class="LineEdit" name="lineEdit_MAApath"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_getMAApath">
|
||||
<widget class="PushButton" name="pushButton_getMAApath">
|
||||
<property name="text">
|
||||
<string>浏览</string>
|
||||
</property>
|
||||
@@ -857,7 +857,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_setMAA">
|
||||
<widget class="PushButton" name="pushButton_setMAA">
|
||||
<property name="text">
|
||||
<string>设置MAA</string>
|
||||
</property>
|
||||
@@ -874,8 +874,8 @@
|
||||
<property name="title">
|
||||
<string>执行限制</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_routine">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
@@ -885,7 +885,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_routine">
|
||||
<widget class="BodyLabel" name="label_routine">
|
||||
<property name="text">
|
||||
<string>日常限制</string>
|
||||
</property>
|
||||
@@ -905,11 +905,11 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_routine">
|
||||
<widget class="SpinBox" name="spinBox_routine">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
<width>140</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
@@ -930,7 +930,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_annihilation">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
@@ -940,7 +940,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_annihilation">
|
||||
<widget class="BodyLabel" name="label_annihilation">
|
||||
<property name="text">
|
||||
<string>剿灭限制</string>
|
||||
</property>
|
||||
@@ -960,11 +960,11 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_annihilation">
|
||||
<widget class="SpinBox" name="spinBox_annihilation">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
<width>140</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
@@ -985,7 +985,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_annihilation_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
@@ -995,7 +995,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_17">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_num">
|
||||
<widget class="BodyLabel" name="label_num">
|
||||
<property name="text">
|
||||
<string>运行失败重试次数上限</string>
|
||||
</property>
|
||||
@@ -1015,11 +1015,11 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_numt">
|
||||
<widget class="SpinBox" name="spinBox_numt">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
<width>140</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
@@ -1072,7 +1072,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_22" stretch="0,1,3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_silence">
|
||||
<widget class="CheckBox" name="checkBox_silence">
|
||||
<property name="text">
|
||||
<string>后台静默代理</string>
|
||||
</property>
|
||||
@@ -1092,7 +1092,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_boss">
|
||||
<widget class="LineEdit" name="lineEdit_boss">
|
||||
<property name="placeholderText">
|
||||
<string>安卓模拟器老板键</string>
|
||||
</property>
|
||||
@@ -1124,7 +1124,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_26" stretch="0,1,3,0">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ifsendmail">
|
||||
<widget class="CheckBox" name="checkBox_ifsendmail">
|
||||
<property name="text">
|
||||
<string>通过邮件通知结果</string>
|
||||
</property>
|
||||
@@ -1144,14 +1144,14 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_mailaddress">
|
||||
<widget class="LineEdit" name="lineEdit_mailaddress">
|
||||
<property name="placeholderText">
|
||||
<string>收信邮箱地址</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ifonlyerror">
|
||||
<widget class="CheckBox" name="checkBox_ifonlyerror">
|
||||
<property name="text">
|
||||
<string>仅推送异常信息</string>
|
||||
</property>
|
||||
@@ -1170,7 +1170,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_iftotray">
|
||||
<widget class="CheckBox" name="checkBox_iftotray">
|
||||
<property name="text">
|
||||
<string>最小化到托盘</string>
|
||||
</property>
|
||||
@@ -1202,7 +1202,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ifproxydirectly">
|
||||
<widget class="CheckBox" name="checkBox_ifproxydirectly">
|
||||
<property name="text">
|
||||
<string>启动AUTO_MAA后直接代理</string>
|
||||
</property>
|
||||
@@ -1247,7 +1247,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_19">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ifselfstart">
|
||||
<widget class="CheckBox" name="checkBox_ifselfstart">
|
||||
<property name="text">
|
||||
<string>开机自动启动AUTO_MAA</string>
|
||||
</property>
|
||||
@@ -1279,7 +1279,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_18">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ifsleep">
|
||||
<widget class="CheckBox" name="checkBox_ifsleep">
|
||||
<property name="text">
|
||||
<string>AUTO_MAA启动时禁止电脑休眠</string>
|
||||
</property>
|
||||
@@ -1350,7 +1350,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_changePASSWORD">
|
||||
<widget class="PushButton" name="pushButton_changePASSWORD">
|
||||
<property name="text">
|
||||
<string>修改管理密钥</string>
|
||||
</property>
|
||||
@@ -1408,7 +1408,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_check_update">
|
||||
<widget class="PushButton" name="pushButton_check_update">
|
||||
<property name="text">
|
||||
<string> 检查版本更新 </string>
|
||||
</property>
|
||||
@@ -1440,7 +1440,7 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_15">
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser_tips">
|
||||
<widget class="TextBrowser" name="textBrowser_tips">
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
|
||||
@@ -1451,6 +1451,8 @@ li.checked::marker { content: "\2612"; }
|
||||
</style></head><body style=" font-family:'Microsoft YaHei UI'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">致用户:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 这是AUTO_MAA_v4.2.0-beta.1,项目初步进行界面美化。希望大家喜欢这个新年礼物!</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 使用本程序前,请先仔细阅读README.md。</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 对于B服用户,由于我们无权替您同意用户协议,若出现用户协议弹窗,您需要自行完成确认,否则可能造成MAA卡死,代理任务失败。</p>
|
||||
@@ -1468,7 +1470,7 @@ li.checked::marker { content: "\2612"; }
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_notice">
|
||||
<widget class="BodyLabel" name="label_notice">
|
||||
<property name="text">
|
||||
<string>注意:在设置页执行的所有更改,不会对正在执行的任务生效;正在执行任务时,用户管理页无法编辑。</string>
|
||||
</property>
|
||||
@@ -1496,6 +1498,48 @@ li.checked::marker { content: "\2612"; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>PushButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TimePicker</class>
|
||||
<extends>QTimeEdit</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TableWidget</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>CheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TextBrowser</class>
|
||||
<extends>QTextBrowser</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BodyLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header location="global">qfluentwidgets</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"main_version": "4.2.0.0",
|
||||
"updater_version": "1.1.0.0",
|
||||
"announcement": "\n## 新增功能\n- 提供完整打包代码\n## 修复BUG\n- 同步MAA`v5.11.1`的字段修改\n- 清除自动化中无效的整合流程\n## 程序优化\n- 调整项目结构,模块化各功能组件\n- 改用`nuitka`编译,压缩软件体积,提升运行速度",
|
||||
"main_version": "4.2.0.1",
|
||||
"updater_version": "1.1.0.1",
|
||||
"announcement": "\n## 新增功能\n- 初步引入`qfluentwidgets`,UI界面美化",
|
||||
"proxy_list":[
|
||||
"",
|
||||
"https://gitproxy.click/",
|
||||
|
||||
Reference in New Issue
Block a user