Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-03 21:19:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-03 21:19:46 +0300
commit1e28c9498f80fa09b3061ef0903cf99e5142c2f2 (patch)
treeac4f4f84967332d5975b2ec6096f8ad1643d4822 /app/assets/javascripts/webpack_non_compiled_placeholder.js
parent42afc4d656c20b2b9f909579097000c162eaf3a6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/webpack_non_compiled_placeholder.js')
-rw-r--r--app/assets/javascripts/webpack_non_compiled_placeholder.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/webpack_non_compiled_placeholder.js b/app/assets/javascripts/webpack_non_compiled_placeholder.js
index 55ac2f0be6a..af671e72129 100644
--- a/app/assets/javascripts/webpack_non_compiled_placeholder.js
+++ b/app/assets/javascripts/webpack_non_compiled_placeholder.js
@@ -1,3 +1,4 @@
+/* globals LIVE_RELOAD */
const div = document.createElement('div');
Object.assign(div.style, {
@@ -15,6 +16,10 @@ Object.assign(div.style, {
'text-align': 'center',
});
+const reloadMessage = LIVE_RELOAD
+ ? 'You have live_reload enabled, the page will reload automatically when complete.'
+ : 'You have live_reload disabled, the page will reload automatically in a few seconds.';
+
div.innerHTML = `
<!-- https://github.com/webpack/media/blob/master/logo/icon-square-big.svg -->
<svg height="50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200">
@@ -30,9 +35,15 @@ div.innerHTML = `
Learn more <a href="https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/configuration.md#webpack-settings">here</a>.
</p>
<p>
- If you have live_reload enabled, the page will reload automatically when complete.<br />
- Otherwise, please <a href="">reload the page manually in a few seconds</a>
+ ${reloadMessage}<br />
+ If it doesn't, please <a href="">reload the page manually</a>.
</p>
`;
document.body.append(div);
+
+if (!LIVE_RELOAD) {
+ setTimeout(() => {
+ window.location.reload();
+ }, 5000);
+}