mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-21 17:34:24 +01:00
Compare commits
2 commits
c023e6d23f
...
05bc80633d
Author | SHA1 | Date | |
---|---|---|---|
05bc80633d | |||
424a745c4a |
2
web_src/js/bootstrap.js
vendored
2
web_src/js/bootstrap.js
vendored
|
@ -8,6 +8,8 @@ __webpack_public_path__ = `${window.config?.assetUrlPrefix ?? '/assets'}/`;
|
|||
export function showGlobalErrorMessage(msg) {
|
||||
const pageContent = document.querySelector('.page-content');
|
||||
if (!pageContent) return;
|
||||
// Prevent a wall of errors being presented to the user.
|
||||
if (document.querySelectorAll('.js-global-error').length >= 3) return;
|
||||
const el = document.createElement('div');
|
||||
el.innerHTML = `<div class="ui container negative message center aligned js-global-error" style="white-space: pre-line;"></div>`;
|
||||
el.childNodes[0].textContent = msg;
|
||||
|
|
Loading…
Reference in a new issue