fix(gui): 修复高级MAA配置序号错位;修复高级用户无法配置问题
This commit is contained in:
@@ -113,13 +113,15 @@ class MaaManager(QObject):
|
||||
return None
|
||||
|
||||
# 整理用户数据,筛选需代理的用户
|
||||
self.data = sorted(self.data, key=lambda x: (-len(x[15]), x[16]))
|
||||
user_list: List[List[str, str, int]] = [
|
||||
[_[0], "等待", index]
|
||||
for index, _ in enumerate(self.data)
|
||||
if (_[3] != 0 and _[4] == "y")
|
||||
]
|
||||
self.create_user_list.emit(user_list)
|
||||
if "设置MAA" not in self.mode:
|
||||
|
||||
self.data = sorted(self.data, key=lambda x: (-len(x[15]), x[16]))
|
||||
user_list: List[List[str, str, int]] = [
|
||||
[_[0], "等待", index]
|
||||
for index, _ in enumerate(self.data)
|
||||
if (_[3] != 0 and _[4] == "y")
|
||||
]
|
||||
self.create_user_list.emit(user_list)
|
||||
|
||||
# 自动代理模式
|
||||
if self.mode == "自动代理":
|
||||
|
||||
@@ -683,6 +683,7 @@ class MaaSettingBox(QWidget):
|
||||
|
||||
Config.cur.execute("SELECT * FROM adminx WHERE True")
|
||||
data = Config.cur.fetchall()
|
||||
data = sorted(data, key=lambda x: (-len(x[15]), x[16]))
|
||||
|
||||
if self.user_list.pivot.currentRouteKey() == f"{self.name}_简洁用户列表":
|
||||
|
||||
@@ -876,6 +877,9 @@ class MaaSettingBox(QWidget):
|
||||
self.user_list_simple.itemChanged.connect(
|
||||
lambda item: self.change_user_Item(item, "simple")
|
||||
)
|
||||
self.user_list_beta.itemChanged.connect(
|
||||
lambda item: self.change_user_Item(item, "beta")
|
||||
)
|
||||
|
||||
self.stackedWidget.addWidget(self.user_list_simple)
|
||||
self.pivot.addItem(
|
||||
@@ -1353,6 +1357,10 @@ class MaaSettingBox(QWidget):
|
||||
return None
|
||||
|
||||
if row == 0:
|
||||
logger.warning("向上移动用户时已到达最上端")
|
||||
MainInfoBar.push_info_bar(
|
||||
"warning", "已经是第一个用户", "无法向上移动", 5000
|
||||
)
|
||||
return None
|
||||
|
||||
Config.cur.execute(
|
||||
@@ -1450,6 +1458,10 @@ class MaaSettingBox(QWidget):
|
||||
return None
|
||||
|
||||
if row == current_numb - 1:
|
||||
logger.warning("向下移动用户时已到达最下端")
|
||||
MainInfoBar.push_info_bar(
|
||||
"warning", "已经是最后一个用户", "无法向下移动", 5000
|
||||
)
|
||||
return None
|
||||
|
||||
Config.cur.execute(
|
||||
|
||||
Reference in New Issue
Block a user