diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-04-01 16:00:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 16:00:26 +0800 |
commit | 5b7466053d993685939da8623fb78e94e4ee0797 (patch) | |
tree | 896d786c4dc8b692dc1fbba61ee70173593dd1b9 /web_src/js | |
parent | 89b9d42f083b1f83ee8fc3ba0feaaa7cf04ec05b (diff) | |
download | gitea-5b7466053d993685939da8623fb78e94e4ee0797.tar.gz gitea-5b7466053d993685939da8623fb78e94e4ee0797.zip |
Skip frontend ROOT_URL check on installation page, remove unnecessary global var (#19291)
Skip `checkAppUrl` message on installation page because the ROOT_URL is not determined yet
Move global var `supportedDbTypeNames` into `install.Init` as a local var
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/features/common-global.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js index 60af4d0d67..dda803ae8d 100644 --- a/web_src/js/features/common-global.js +++ b/web_src/js/features/common-global.js @@ -358,6 +358,9 @@ export function checkAppUrl() { if (curUrl.startsWith(appUrl)) { return; } + if (document.querySelector('.page-content.install')) { + return; // no need to show the message on the installation page + } showGlobalErrorMessage(`Your ROOT_URL in app.ini is ${appUrl} but you are visiting ${curUrl} You should set ROOT_URL correctly, otherwise the web may not work correctly.`); } |