mirror of
https://github.com/go-gitea/gitea
synced 2024-11-09 19:42:09 +01:00
c71e8abbc3
Fixes https://github.com/go-gitea/gitea/issues/24353 In some case like async success/error, it is useful to show toasts in UI.
11 lines
419 B
JavaScript
11 lines
419 B
JavaScript
import {showInfoToast, showWarningToast, showErrorToast} from '../modules/toast.js';
|
|
|
|
document.getElementById('info-toast').addEventListener('click', () => {
|
|
showInfoToast('success 😀');
|
|
});
|
|
document.getElementById('warning-toast').addEventListener('click', () => {
|
|
showWarningToast('warning 😐');
|
|
});
|
|
document.getElementById('error-toast').addEventListener('click', () => {
|
|
showErrorToast('error 🙁');
|
|
});
|