Add toasts to UI (#25449)
Fixes https://github.com/go-gitea/gitea/issues/24353 In some case like async success/error, it is useful to show toasts in UI.
This commit is contained in:
parent
72c60f94c1
commit
c71e8abbc3
15 changed files with 220 additions and 20 deletions
|
@ -4,6 +4,7 @@ import {toggleElem} from '../utils/dom.js';
|
|||
import {htmlEscape} from 'escape-goat';
|
||||
import {Sortable} from 'sortablejs';
|
||||
import {confirmModal} from './comp/ConfirmModal.js';
|
||||
import {showErrorToast} from '../modules/toast.js';
|
||||
|
||||
function initRepoIssueListCheckboxes() {
|
||||
const $issueSelectAll = $('.issue-checkbox-all');
|
||||
|
@ -75,7 +76,7 @@ function initRepoIssueListCheckboxes() {
|
|||
).then(() => {
|
||||
window.location.reload();
|
||||
}).catch((reason) => {
|
||||
window.alert(reason.responseJSON.error);
|
||||
showErrorToast(reason.responseJSON.error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue