0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-21 18:51:45 +01:00

toasty error messages

This commit is contained in:
m.huber 2024-11-11 18:10:45 +01:00
parent 63ccf82237
commit ffff47d635
2 changed files with 4 additions and 2 deletions

View file

@ -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}}

View file

@ -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}`);
}
},
});