mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-24 02:48:31 +00:00
Fix package link setting can only list limited repositories (#35394)
Fix #24801 <img width="1123" height="503" alt="image" src="https://github.com/user-attachments/assets/823f4214-e08a-4506-9018-057c50e7fc52" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
import {queryElems, toggleElem} from '../utils/dom.ts';
|
||||
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
||||
|
||||
const {appSubUrl} = window.config;
|
||||
|
||||
function initOrgTeamSettings() {
|
||||
// on the page "page-content organization new team"
|
||||
@@ -14,31 +11,7 @@ function initOrgTeamSettings() {
|
||||
}));
|
||||
}
|
||||
|
||||
function initOrgTeamSearchRepoBox() {
|
||||
// on the page "page-content organization teams"
|
||||
const $searchRepoBox = fomanticQuery('#search-repo-box');
|
||||
$searchRepoBox.search({
|
||||
minCharacters: 2,
|
||||
apiSettings: {
|
||||
url: `${appSubUrl}/repo/search?q={query}&uid=${$searchRepoBox.data('uid')}`,
|
||||
onResponse(response: any) {
|
||||
const items = [];
|
||||
for (const item of response.data) {
|
||||
items.push({
|
||||
title: item.repository.full_name.split('/')[1],
|
||||
description: item.repository.full_name,
|
||||
});
|
||||
}
|
||||
return {results: items};
|
||||
},
|
||||
},
|
||||
searchFields: ['full_name'],
|
||||
showNoResults: false,
|
||||
});
|
||||
}
|
||||
|
||||
export function initOrgTeam() {
|
||||
if (!document.querySelector('.page-content.organization')) return;
|
||||
initOrgTeamSettings();
|
||||
initOrgTeamSearchRepoBox();
|
||||
}
|
||||
|
Reference in New Issue
Block a user