File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 145145 {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}}
146146 {{end}}
147147 {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
148- <div class="ui form tw-hidden tw- flex tw-gap-2 tw-my-2" id="topic_edit">
148+ <div class="ui form tw-hidden flex-item-body tw-gap-2 tw-my-2" id="topic_edit">
149149 <div class="ui fluid multiple search selection dropdown tw-flex-wrap tw-flex-1">
150150 <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
151151 {{range .Topics}}
152152 {{/* keep the same layout as Fomantic UI generated labels */}}
153- <a class="ui label transition visible tw-cursor-default tw-inline-block" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
153+ <a class="ui label transition visible tw-cursor-default tw-inline-block repo-topic " data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
154154 {{end}}
155155 <div class="text"></div>
156156 </div>
157157 <div>
158- <button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button>
159158 <button class="ui primary button" id="save_topic" data-link="{{.RepoLink}}/topics">{{ctx.Locale.Tr "save"}}</button>
159+ <button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button>
160160 </div>
161161 </div>
162162 {{end}}
Original file line number Diff line number Diff line change @@ -46,11 +46,12 @@ export function initRepoTopicBar() {
4646 topicArray . sort ( ) ;
4747 for ( const topic of topicArray ) {
4848 // it should match the code in repo/home.tmpl
49+ // TODO: sort items in topicDropdown, or items in edit div will have different order to the items in view div
4950 const link = document . createElement ( 'a' ) ;
5051 link . classList . add ( 'repo-topic' , 'ui' , 'large' , 'label' ) ;
5152 link . href = `${ appSubUrl } /explore/repos?q=${ encodeURIComponent ( topic ) } &topic=1` ;
5253 link . textContent = topic ;
53- viewDiv . append ( link ) ; // insert all new topics before manage button
54+ viewDiv . append ( link ) ;
5455 }
5556 }
5657 hideElem ( editDiv ) ;
You can’t perform that action at this time.
0 commit comments