feat: 更新贡献模式相关URL,优化上传页面和官网页面的链接
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user