aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-common.js
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-09-10 18:27:23 +0800
committerGitHub <noreply@github.com>2023-09-10 18:27:23 +0800
commitdd6e8ab57bedf94cacec176b28420d5cb25fc0e9 (patch)
tree284bfb6ad6d89dbcd079f1946b327d4e1eaeb7af /web_src/js/features/repo-common.js
parenta20e0affbaa824f55db85c3dec45116397dddd45 (diff)
downloadgitea-dd6e8ab57bedf94cacec176b28420d5cb25fc0e9.tar.gz
gitea-dd6e8ab57bedf94cacec176b28420d5cb25fc0e9.zip
Improve "language stats" UI (#26968)
Before: * The layout is quite complex * The UI flickers when switch the stats (https://try.gitea.io/) After: * Simplify the code * The UI doesn't flicker
Diffstat (limited to 'web_src/js/features/repo-common.js')
-rw-r--r--web_src/js/features/repo-common.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/web_src/js/features/repo-common.js b/web_src/js/features/repo-common.js
index 755f2a0653..3573e4d50b 100644
--- a/web_src/js/features/repo-common.js
+++ b/web_src/js/features/repo-common.js
@@ -1,5 +1,5 @@
import $ from 'jquery';
-import {hideElem, showElem, toggleElem} from '../utils/dom.js';
+import {hideElem, showElem} from '../utils/dom.js';
const {csrfToken} = window.config;
@@ -91,13 +91,3 @@ export function initRepoCommonFilterSearchDropdown(selector) {
message: {noResults: $dropdown.attr('data-no-results')},
});
}
-
-export function initRepoCommonLanguageStats() {
- // Language stats
- if ($('.language-stats').length > 0) {
- $('.language-stats').on('click', (e) => {
- e.preventDefault();
- toggleElem($('.language-stats-details, .repository-menu'));
- });
- }
-}