mirror of https://github.com/go-gitea/gitea.git
toasty error messages
This commit is contained in:
parent
63ccf82237
commit
ffff47d635
|
@ -39,7 +39,7 @@
|
|||
<div class="ui attached segment">
|
||||
<div class="flex-list" id="protected-branches-list" data-update-priority-url="{{$.Repository.Link}}/settings/branches/priority">
|
||||
{{range .ProtectedBranches}}
|
||||
<div class="item" data-id="{{.ID}}">
|
||||
<div data-id="{{.ID}}">
|
||||
<div class="flex-item tw-items-center">
|
||||
<div class="drag-handle tw-cursor-grab">
|
||||
{{svg "octicon-grabber" 16}}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import {createSortable} from '../modules/sortable.ts';
|
||||
import {POST} from '../modules/fetch.ts';
|
||||
import {showErrorToast} from '../modules/toast.ts';
|
||||
|
||||
export function initRepoBranchesSettings() {
|
||||
const protectedBranchesList = document.querySelector('#protected-branches-list');
|
||||
|
@ -21,7 +22,8 @@ export function initRepoBranchesSettings() {
|
|||
},
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('Failed to update branch protection rule priority:', err);
|
||||
const errorMessage = String(err);
|
||||
showErrorToast(`Failed to update branch protection rule priority:, error: ${errorMessage}`);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue