mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-15 07:16:47 +01:00
9 lines
340 B
TypeScript
9 lines
340 B
TypeScript
|
export function displayError(el, err) {
|
||
|
el.classList.remove('is-loading');
|
||
|
const errorNode = document.createElement('pre');
|
||
|
errorNode.setAttribute('class', 'ui message error markup-block-error');
|
||
|
errorNode.textContent = err.str || err.message || String(err);
|
||
|
el.before(errorNode);
|
||
|
el.setAttribute('data-render-done', 'true');
|
||
|
}
|