feat(onboarding): add first-run membership activation
This commit is contained in:
@@ -566,6 +566,19 @@ class SettingsTab(QWidget):
|
||||
"正在检测会员状态..." if running else "重新检测会员状态"
|
||||
)
|
||||
|
||||
def refresh_default_gateway_credentials(self):
|
||||
"""Refresh default gateway fields after first-run membership activation."""
|
||||
|
||||
with self._dirty_tracking_suspended():
|
||||
cmhub_cfg = appconfig.cmhub_config(self.config)
|
||||
self.cmhub_base_url_edit.setText(
|
||||
appconfig.normalize_cmhub_base_url(cmhub_cfg.get("base_url", ""))
|
||||
)
|
||||
self._loaded_cmhub_api_key = appconfig.get_cmhub_api_key(
|
||||
path=self.cmhub_config_path
|
||||
)
|
||||
self.cmhub_api_key_edit.setText(self._loaded_cmhub_api_key)
|
||||
|
||||
@contextmanager
|
||||
def _dirty_tracking_suspended(self):
|
||||
self._suspend_dirty += 1
|
||||
|
||||
Reference in New Issue
Block a user