feat(onboarding): add first-run membership activation

This commit is contained in:
chengma
2026-07-23 17:29:16 +08:00
parent a0862dacbd
commit 7dabeb9971
15 changed files with 855 additions and 36 deletions
+12 -1
View File
@@ -38,15 +38,26 @@ _USER_LOG_PATH_RE = re.compile(
class SubscriptionCheckWorker(BaseWorker):
"""Fetch the current cmshopee account subscription away from the GUI thread."""
def __init__(self, *, config=None, cmhub_config_path=None):
def __init__(
self,
*,
config=None,
cmhub_config_path=None,
base_url=None,
api_key=None,
):
super().__init__()
self.config = config
self.cmhub_config_path = cmhub_config_path
self.base_url = base_url
self.api_key = api_key
def execute(self):
result = subscription.check_status(
self.config,
cmhub_config_path=self.cmhub_config_path,
base_url=self.base_url,
api_key=self.api_key,
)
return {"subscription": result}