summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-12-20 04:13:12 +0100
committerGitHub <noreply@github.com>2020-12-20 11:13:12 +0800
commitf3c4baa84b8fa7afb3eab137b4c5e3544bd9e761 (patch)
treeb45be56f4fc8a5d1da04649ab2baa7a6a19eefe9 /web_src
parent029836c34c75a277e1e1309f590905a71e5d312a (diff)
downloadgitea-f3c4baa84b8fa7afb3eab137b4c5e3544bd9e761.tar.gz
gitea-f3c4baa84b8fa7afb3eab137b4c5e3544bd9e761.zip
Show dropdown with all statuses for commit (#13977)
* Show dropdown with all statuses for commit * Use popups * Remove unnecessary change * Style popup * Use divided list * As per @silverwind * Refactor GetLastCommitStatus * Missing dropdown on repo home and commit page * Fix tests * Make status icon be a part of a link on PR list * Fix missing translation call * Indent fix Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/index.js9
-rw-r--r--web_src/less/_base.less6
-rw-r--r--web_src/less/_repository.less4
3 files changed, 18 insertions, 1 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index e55e2febe0..dd7032eb84 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -759,6 +759,15 @@ async function initRepository() {
});
}
+ // Commit statuses
+ $('.commit-statuses-trigger').each(function () {
+ $(this)
+ .popup({
+ on: 'click',
+ position: ($('.repository.file.list').length > 0 ? 'right center' : 'left center'),
+ });
+ });
+
// File list and commits
if ($('.repository.file.list').length > 0 || ('.repository.commits').length > 0) {
initFilterBranchTagDropdown('.choose.reference .dropdown');
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index e49b1c5bbb..7dbbda04de 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -530,6 +530,10 @@ a.ui.card:hover,
border-radius: var(--border-radius);
}
+.ui.divided.list > .item {
+ border-color: var(--color-secondary);
+}
+
.dont-break-out {
overflow-wrap: break-word;
word-wrap: break-word;
@@ -1164,7 +1168,7 @@ footer {
}
}
-.center {
+.center:not(.popup) {
text-align: center;
}
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index 0180a6ec1b..f859737e07 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -1,4 +1,8 @@
.repository {
+ .commit-statuses .list > .item {
+ line-height: 2;
+ }
+
.repo-header {
.ui.compact.menu {
margin-left: 1rem;