Initial commit, source code of Gitea 1.23.1
This commit is contained in:
8
web_src/js/markup/common.ts
Normal file
8
web_src/js/markup/common.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export function displayError(el: Element, err: Error): void {
|
||||
el.classList.remove('is-loading');
|
||||
const errorNode = document.createElement('pre');
|
||||
errorNode.setAttribute('class', 'ui message error markup-block-error');
|
||||
errorNode.textContent = err.message || String(err);
|
||||
el.before(errorNode);
|
||||
el.setAttribute('data-render-done', 'true');
|
||||
}
|
Reference in New Issue
Block a user