feat(ui): 用户仪表盘支持直接控制用户状态
优化仪表盘排版
This commit is contained in:
@@ -563,7 +563,7 @@ class MaaPlanConfig(LQConfig):
|
|||||||
|
|
||||||
class AppConfig(GlobalConfig):
|
class AppConfig(GlobalConfig):
|
||||||
|
|
||||||
VERSION = "4.3.8.2"
|
VERSION = "4.3.8.3"
|
||||||
|
|
||||||
gameid_refreshed = Signal()
|
gameid_refreshed = Signal()
|
||||||
PASSWORD_refreshed = Signal()
|
PASSWORD_refreshed = Signal()
|
||||||
|
|||||||
@@ -933,6 +933,38 @@ class TimeEditSettingCard(SettingCard):
|
|||||||
self.TimeEdit.setTime(QTime.fromString(value, "HH:mm"))
|
self.TimeEdit.setTime(QTime.fromString(value, "HH:mm"))
|
||||||
|
|
||||||
|
|
||||||
|
class StatusSwitchSetting(SwitchButton):
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
qconfig: QConfig,
|
||||||
|
configItem_check: ConfigItem,
|
||||||
|
configItem_enable: ConfigItem,
|
||||||
|
parent=None,
|
||||||
|
):
|
||||||
|
super().__init__(parent)
|
||||||
|
self.qconfig = qconfig
|
||||||
|
self.configItem_check = configItem_check
|
||||||
|
self.configItem_enable = configItem_enable
|
||||||
|
self.setOffText("")
|
||||||
|
self.setOnText("")
|
||||||
|
|
||||||
|
if configItem_check:
|
||||||
|
self.setValue(self.qconfig.get(configItem_check))
|
||||||
|
configItem_check.valueChanged.connect(self.setValue)
|
||||||
|
if configItem_enable:
|
||||||
|
self.setEnabled(self.qconfig.get(configItem_enable))
|
||||||
|
configItem_enable.valueChanged.connect(self.setEnabled)
|
||||||
|
|
||||||
|
self.checkedChanged.connect(self.setValue)
|
||||||
|
|
||||||
|
def setValue(self, isChecked: bool):
|
||||||
|
if self.configItem_check:
|
||||||
|
self.qconfig.set(self.configItem_check, isChecked)
|
||||||
|
|
||||||
|
self.setChecked(isChecked)
|
||||||
|
|
||||||
|
|
||||||
class HistoryCard(HeaderCardWidget):
|
class HistoryCard(HeaderCardWidget):
|
||||||
|
|
||||||
def __init__(self, qconfig: QConfig, configItem: ConfigItem, parent=None):
|
def __init__(self, qconfig: QConfig, configItem: ConfigItem, parent=None):
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ from .Widget import (
|
|||||||
SwitchSettingCard,
|
SwitchSettingCard,
|
||||||
PushAndSwitchButtonSettingCard,
|
PushAndSwitchButtonSettingCard,
|
||||||
PushAndComboBoxSettingCard,
|
PushAndComboBoxSettingCard,
|
||||||
|
StatusSwitchSetting,
|
||||||
PivotArea,
|
PivotArea,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1230,14 +1231,14 @@ class MemberManager(QWidget):
|
|||||||
else "******"
|
else "******"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
self.dashboard.setItem(
|
self.dashboard.setCellWidget(
|
||||||
int(name[3:]) - 1,
|
int(name[3:]) - 1,
|
||||||
3,
|
3,
|
||||||
QTableWidgetItem(
|
StatusSwitchSetting(
|
||||||
"启用"
|
qconfig=config,
|
||||||
if config.get(config.Info_Status)
|
configItem_check=config.Info_Status,
|
||||||
and config.get(config.Info_RemainedDay) != 0
|
configItem_enable=config.Info_RemainedDay,
|
||||||
else "禁用"
|
parent=self,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
self.dashboard.setItem(
|
self.dashboard.setItem(
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
{
|
{
|
||||||
"main_version": "4.3.8.2",
|
"main_version": "4.3.8.3",
|
||||||
"version_info": {
|
"version_info": {
|
||||||
|
"4.3.8.3": {
|
||||||
|
"新增功能": [
|
||||||
|
"用户仪表盘支持直接控制用户状态"
|
||||||
|
]
|
||||||
|
},
|
||||||
"4.3.8.2": {
|
"4.3.8.2": {
|
||||||
"新增功能": [
|
"新增功能": [
|
||||||
"添加ADB端口号宽幅适配能力"
|
"添加ADB端口号宽幅适配能力"
|
||||||
|
|||||||
Reference in New Issue
Block a user