diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-09-13 00:44:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-12 16:44:48 +0000 |
commit | 739e47cd80db34f2ab0a63da76adc235f1f2ab06 (patch) | |
tree | 241e0a9e59977700e378cc5c2bedb0a3fa83b1cd /web_src | |
parent | e6b68c579b75e818f6a3a80ef9811f739bcb4f86 (diff) | |
download | gitea-739e47cd80db34f2ab0a63da76adc235f1f2ab06.tar.gz gitea-739e47cd80db34f2ab0a63da76adc235f1f2ab06.zip |
Improve repo/user/org search (#27030)
* Fix a regression from #26809 (the `data-org` is missing)
* Remove unnecessary style
Screenshots:
![image](https://github.com/go-gitea/gitea/assets/2114189/3f5cf628-db7f-4705-898a-7a4a1fbfbba8)
![image](https://github.com/go-gitea/gitea/assets/2114189/453d1fad-1090-4524-bf45-6c5da2465f04)
![image](https://github.com/go-gitea/gitea/assets/2114189/f14d9808-7596-42c8-84b4-0d57a0bf2278)
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/css/repo.css | 10 | ||||
-rw-r--r-- | web_src/js/features/repo-settings.js | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 0693840c31..8ec9908f73 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -2154,21 +2154,15 @@ margin-top: 5px; } -#search-repo-box .results .result img, -#search-user-box .results .result img { +#search-user-box .results .result .image { float: left; margin-right: 8px; width: 2em; height: 2em; } -#search-repo-box .results .result .content, #search-user-box .results .result .content { - margin: 6px 0; -} - -#search-team-box .results .result .content { - margin: 6px 0; + margin: 6px 0; /* this trick is used to align with the sibling avatar image */ } .ui.menu .item > img:not(.ui) { diff --git a/web_src/js/features/repo-settings.js b/web_src/js/features/repo-settings.js index 8cc016fdc2..dc2240c7c5 100644 --- a/web_src/js/features/repo-settings.js +++ b/web_src/js/features/repo-settings.js @@ -47,7 +47,7 @@ export function initRepoSettingSearchTeamBox() { $searchTeamBox.search({ minCharacters: 2, apiSettings: { - url: `${appSubUrl}/org/${$searchTeamBox.data('org')}/teams/-/search?q={query}`, + url: `${appSubUrl}/org/${$searchTeamBox.attr('data-org-name')}/teams/-/search?q={query}`, headers: {'X-Csrf-Token': csrfToken}, onResponse(response) { const items = []; |