feat: 接入远程订阅策略门禁 T-705
Tests / Python 3.11 / Windows (push) Has been cancelled

This commit is contained in:
chengma
2026-07-28 15:42:19 +08:00
parent 593c6f77cb
commit df9da63841
15 changed files with 925 additions and 73 deletions
+30 -2
View File
@@ -283,6 +283,7 @@ class SettingsTab(QWidget):
self.subscription_check_button = QPushButton("重新检测会员状态")
self.subscription_check_button.setObjectName("subscriptionCheckButton")
self.subscription_check_button.setToolTip("重新查询当前 cmhub 账号的会员套餐状态")
self._subscription_policy_enabled = True
self.unsaved_changes_label = QLabel("● 未保存更改")
self.unsaved_changes_label.setObjectName("settingsUnsavedChangesLabel")
self.unsaved_changes_label.setStyleSheet("color: #bc4c00; font-weight: 600;")
@@ -557,13 +558,40 @@ class SettingsTab(QWidget):
_emit_status(self.status_callback, message, level=level)
def _request_subscription_check(self, checked=False):
if not self._subscription_policy_enabled:
return
self.subscriptionCheckRequested.emit()
def set_subscription_policy_enabled(self, enabled):
self._subscription_policy_enabled = bool(enabled)
self.subscription_check_button.setVisible(True)
self.subscription_check_button.setEnabled(self._subscription_policy_enabled)
if self._subscription_policy_enabled:
self.subscription_check_button.setText("重新检测会员状态")
self.subscription_check_button.setToolTip(
"重新查询当前 cmhub 账号的会员套餐状态"
)
return
self.subscription_check_button.setText("会员检测暂未启用")
self.subscription_check_button.setToolTip(
"服务端当前未启用客户端会员检测,本次运行无需手动检测"
)
def set_subscription_check_running(self, running):
running = bool(running)
self.subscription_check_button.setEnabled(not running)
self.subscription_check_button.setEnabled(
self._subscription_policy_enabled and not running
)
self.subscription_check_button.setText(
"正在检测会员状态..." if running else "重新检测会员状态"
(
"正在检测会员状态..."
if running
else (
"重新检测会员状态"
if self._subscription_policy_enabled
else "会员检测暂未启用"
)
)
)
def refresh_default_gateway_credentials(self):