Skip to content

Commit b10db5d

Browse files
committed
change
1 parent aebde5e commit b10db5d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

templates/shared/actions/owner_general_settings.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
{{ctx.Locale.Tr "actions.general.cross_repo_add"}}
4040
</h5>
4141
<div class="ui form tw-flex tw-gap-2">
42-
<div data-global-init="initSearchRepoBox" data-uid="{{.OwnerID}}" data-collaborate="false" class="ui search tw-flex-1">
42+
<div data-global-init="initSearchRepoBox" data-uid="{{.OwnerID}}" data-collaborate="false" data-exclusive="true" class="ui search tw-flex-1">
4343
<div class="ui input">
4444
<input class="prompt" name="cross_repo_add_target_name" placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off">
4545
</div>

web_src/js/features/comp/SearchRepoBox.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ const {appSubUrl} = window.config;
66
export function initCompSearchRepoBox(el: HTMLElement) {
77
const uid = el.getAttribute('data-uid');
88
const collaborate = el.getAttribute('data-collaborate');
9-
let url = `${appSubUrl}/repo/search?q={query}&uid=${uid}&exclusive=true`;
9+
const exclusive = el.getAttribute('data-exclusive');
10+
let url = `${appSubUrl}/repo/search?q={query}&uid=${uid}`;
1011
if (collaborate !== null) {
1112
url += `&collaborate=${collaborate}`;
1213
}
14+
if (exclusive === 'true') {
15+
url += `&exclusive=true`;
16+
}
1317
fomanticQuery(el).search({
1418
minCharacters: 2,
1519
apiSettings: {

0 commit comments

Comments
 (0)