summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-08-21 16:26:10 +0900
committerGitHub <noreply@github.com>2023-08-21 15:26:10 +0800
commitf6e7798405ef9eb7b2936b112fd2a4ea1bab4082 (patch)
treee4197e509e5b3f0f7a7f87f0385a6e18b76fbc4a /web_src
parent3be80a863b6ef3671605a20800d8e2122d758ec5 (diff)
downloadgitea-f6e7798405ef9eb7b2936b112fd2a4ea1bab4082.tar.gz
gitea-f6e7798405ef9eb7b2936b112fd2a4ea1bab4082.zip
Add link to job details and tooltip to commit status in repo list in dashboard (#26326)
Tooltip: ![image](https://github.com/go-gitea/gitea/assets/18380374/237cb545-7844-424b-b995-1008eaaaedec) Link to the target job: ![image](https://github.com/go-gitea/gitea/assets/18380374/0c11a97f-6517-47f2-8773-f381488c084e)
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/components/DashboardRepoList.vue21
1 files changed, 14 insertions, 7 deletions
diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue
index d68ee45ee3..008149ca60 100644
--- a/web_src/js/components/DashboardRepoList.vue
+++ b/web_src/js/components/DashboardRepoList.vue
@@ -69,16 +69,18 @@
</div>
<div v-if="repos.length" class="ui attached table segment gt-rounded-bottom">
<ul class="repo-owner-name-list">
- <li class="gt-df gt-ac" v-for="repo, index in repos" :class="{'active': index === activeIndex}" :key="repo.id">
- <a class="repo-list-link muted gt-df gt-ac gt-f1" :href="repo.link">
+ <li class="gt-df gt-ac gt-py-3" v-for="repo, index in repos" :class="{'active': index === activeIndex}" :key="repo.id">
+ <a class="repo-list-link muted gt-df gt-ac gt-f1 gt-gap-3" :href="repo.link">
<svg-icon :name="repoIcon(repo)" :size="16" class-name="repo-list-icon"/>
<div class="text truncate">{{ repo.full_name }}</div>
<div v-if="repo.archived">
<svg-icon name="octicon-archive" :size="16"/>
</div>
</a>
- <!-- the commit status icon logic is taken from templates/repo/commit_status.tmpl -->
- <svg-icon v-if="repo.latest_commit_status_state" :name="statusIcon(repo.latest_commit_status_state)" :class-name="'gt-ml-3 commit-status icon text ' + statusColor(repo.latest_commit_status_state)" :size="16"/>
+ <a class="gt-df gt-ac" v-if="repo.latest_commit_status_state" :href="repo.latest_commit_status_state_link" :data-tooltip-content="repo.locale_latest_commit_status_state">
+ <!-- the commit status icon logic is taken from templates/repo/commit_status.tmpl -->
+ <svg-icon :name="statusIcon(repo.latest_commit_status_state)" :class-name="'gt-ml-3 commit-status icon text ' + statusColor(repo.latest_commit_status_state)" :size="16"/>
+ </a>
</li>
</ul>
<div v-if="showMoreReposLink" class="center gt-py-3 gt-border-secondary-top">
@@ -394,7 +396,14 @@ const sfc = {
}
if (searchedURL === this.searchURL) {
- this.repos = json.data.map((webSearchRepo) => {return {...webSearchRepo.repository, latest_commit_status_state: webSearchRepo.latest_commit_status.State}});
+ this.repos = json.data.map((webSearchRepo) => {
+ return {
+ ...webSearchRepo.repository,
+ latest_commit_status_state: webSearchRepo.latest_commit_status.State,
+ locale_latest_commit_status_state: webSearchRepo.locale_latest_commit_status,
+ latest_commit_status_state_link: webSearchRepo.latest_commit_status.TargetURL
+ };
+ });
const count = response.headers.get('X-Total-Count');
if (searchedQuery === '' && searchedMode === '' && this.archivedFilter === 'both') {
this.reposTotalCount = count;
@@ -494,8 +503,6 @@ ul li:not(:last-child) {
}
.repo-list-link {
- padding: 6px 0;
- gap: 6px;
min-width: 0; /* for text truncation */
}