feat: vendor gitea 1.16.2
This commit is contained in:
@@ -4,7 +4,7 @@ import {showErrorToast} from '../modules/toast.ts';
|
||||
import {queryElemChildren} from '../utils/dom.ts';
|
||||
|
||||
export function initRepoSettingsBranchesDrag() {
|
||||
const protectedBranchesList = document.querySelector('#protected-branches-list');
|
||||
const protectedBranchesList = document.querySelector<HTMLElement>('#protected-branches-list');
|
||||
if (!protectedBranchesList) return;
|
||||
|
||||
createSortable(protectedBranchesList, {
|
||||
@@ -14,10 +14,10 @@ export function initRepoSettingsBranchesDrag() {
|
||||
onEnd: () => {
|
||||
(async () => {
|
||||
const itemElems = queryElemChildren(protectedBranchesList, '.item[data-id]');
|
||||
const itemIds = Array.from(itemElems, (el) => parseInt(el.getAttribute('data-id')));
|
||||
const itemIds = Array.from(itemElems, (el) => parseInt(el.getAttribute('data-id')!));
|
||||
|
||||
try {
|
||||
await POST(protectedBranchesList.getAttribute('data-update-priority-url'), {
|
||||
await POST(protectedBranchesList.getAttribute('data-update-priority-url')!, {
|
||||
data: {
|
||||
ids: itemIds,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user