diff --git a/sidepanel/contribution-mode.js b/sidepanel/contribution-mode.js index c54081c..d6331b5 100644 --- a/sidepanel/contribution-mode.js +++ b/sidepanel/contribution-mode.js @@ -12,7 +12,8 @@ constants = {}, } = context; - const contributionUploadUrl = constants.contributionUploadUrl || 'https://apikey.qzz.io'; + const contributionPortalUrl = constants.contributionPortalUrl || 'https://apikey.qzz.io'; + const contributionUploadUrl = constants.contributionUploadUrl || 'https://apikey.qzz.io/upload'; const pollIntervalMs = Math.max(1500, Math.floor(Number(constants.pollIntervalMs) || 2500)); const hiddenRows = [ @@ -175,10 +176,22 @@ return normalizeString(currentState.contributionStatusMessage) || DEFAULT_COPY; } + function getContributionPortalPageUrl() { + return normalizeString(contributionPortalUrl); + } + function getContributionUploadPageUrl() { return normalizeString(contributionUploadUrl); } + function openContributionPortalPage() { + const targetUrl = getContributionPortalPageUrl(); + if (!targetUrl) { + return; + } + helpers.openExternalUrl?.(targetUrl); + } + function openContributionUploadPage() { const targetUrl = getContributionUploadPageUrl(); if (!targetUrl) { @@ -375,9 +388,9 @@ } actionInFlight = true; try { - openContributionUploadPage(); + openContributionPortalPage(); } catch (error) { - helpers.showToast?.(`打开上传页面失败:${error.message}`, 'error'); + helpers.showToast?.(`打开官网页面失败:${error.message}`, 'error'); } render(); try { diff --git a/sidepanel/sidepanel.html b/sidepanel/sidepanel.html index 63f7ab0..b400c81 100644 --- a/sidepanel/sidepanel.html +++ b/sidepanel/sidepanel.html @@ -16,8 +16,7 @@
- + aria-pressed="false" title="进入贡献模式并打开官网页">贡献/使用教程 @@ -120,14 +119,16 @@ CPA
-

当前账号将用于支持项目维护。扩展会自动申请贡献登录地址并持续跟踪授权状态;如检测到回调地址,会自动提交,无需手动复制。

+

+ 当前账号将用于支持项目维护。扩展会自动申请贡献登录地址并持续跟踪授权状态;如检测到回调地址,会自动提交,无需手动复制。

贡献昵称
QQ - +
@@ -190,8 +191,7 @@