mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Add link to job details and tooltip to commit status in repo list in dashboard (#26326)
Tooltip:  Link to the target job: 
This commit is contained in:
		@@ -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 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user