forked from forgejo/forgejo
Backport #24123 Close #24077 Manually backported and tested. <img width="330" alt="image" src="https://user-images.githubusercontent.com/2114189/232283645-92cc85dd-ba16-44a9-a7ef-5712b9d285e9.png">
This commit is contained in:
parent
94fbd44bac
commit
2b32f8b95f
3 changed files with 7 additions and 10 deletions
|
@ -39,7 +39,7 @@ export function initRepoTopicBar() {
|
|||
viewDiv.children('.topic').remove();
|
||||
if (topics.length) {
|
||||
const topicArray = topics.split(',');
|
||||
|
||||
topicArray.sort();
|
||||
const last = viewDiv.children('a').last();
|
||||
for (let i = 0; i < topicArray.length; i++) {
|
||||
const link = $('<a class="ui repo-topic large label topic"></a>');
|
||||
|
@ -57,12 +57,12 @@ export function initRepoTopicBar() {
|
|||
topicPrompts.formatPrompt = xhr.responseJSON.message;
|
||||
|
||||
const {invalidTopics} = xhr.responseJSON;
|
||||
const topicLables = topicDropdown.children('a.ui.label');
|
||||
const topicLabels = topicDropdown.children('a.ui.label');
|
||||
|
||||
for (const [index, value] of topics.split(',').entries()) {
|
||||
for (let i = 0; i < invalidTopics.length; i++) {
|
||||
if (invalidTopics[i] === value) {
|
||||
topicLables.eq(index).removeClass('green').addClass('red');
|
||||
topicLabels.eq(index).removeClass('green').addClass('red');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue