refactor: avoid runtime config object (#8202)

This commit is contained in:
forehalo
2024-09-13 07:27:11 +00:00
parent c76b4d70b0
commit 25969a34e8
45 changed files with 117 additions and 156 deletions

View File

@@ -1,8 +1,8 @@
export function popupWindow(target: string) {
const url = new URL(runtimeConfig.serverUrlPrefix + '/redirect-proxy');
const url = new URL(BUILD_CONFIG.serverUrlPrefix + '/redirect-proxy');
target = /^https?:\/\//.test(target)
? target
: runtimeConfig.serverUrlPrefix + target;
: BUILD_CONFIG.serverUrlPrefix + target;
url.searchParams.set('redirect_uri', target);
return window.open(url, '_blank', `noreferrer noopener`);
}