mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-30 06:23:13 +08:00
Refactor branch/tag selector to Vue SFC (#23421)
Follow #23394
There were many bad smells in old code. This PR only moves the code into
Vue SFC, doesn't touch the unrelated logic.
update: after
5f23218c85
, there should be no usage of the vue-rumtime-compiler anymore
(hopefully), so I think this PR could close #19851
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@ -11,7 +11,7 @@ import {
|
||||
import {initUnicodeEscapeButton} from './repo-unicode-escape.js';
|
||||
import {svg} from '../svg.js';
|
||||
import {htmlEscape} from 'escape-goat';
|
||||
import {initRepoBranchTagDropdown} from '../components/RepoBranchTagDropdown.js';
|
||||
import {initRepoBranchTagSelector} from '../components/RepoBranchTagSelector.vue';
|
||||
import {
|
||||
initRepoCloneLink, initRepoCommonBranchOrTagDropdown, initRepoCommonFilterSearchDropdown,
|
||||
initRepoCommonLanguageStats,
|
||||
@ -486,7 +486,7 @@ export function initRepository() {
|
||||
// File list and commits
|
||||
if ($('.repository.file.list').length > 0 || $('.branch-dropdown').length > 0 ||
|
||||
$('.repository.commits').length > 0 || $('.repository.release').length > 0) {
|
||||
initRepoBranchTagDropdown('.choose.reference .ui.dropdown');
|
||||
initRepoBranchTagSelector('.js-branch-tag-selector');
|
||||
}
|
||||
|
||||
// Wiki
|
||||
|
Reference in New Issue
Block a user