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