diff options
author | yp05327 <576951401@qq.com> | 2024-04-26 11:22:45 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-26 02:22:45 +0000 |
commit | 2a3906d75532ba8689338247d794f21dceb4d359 (patch) | |
tree | 900cf3500a02b798aef5e9e3efe47491dc8974af /web_src/js/components/RepoActionView.vue | |
parent | 2a6418abb1e227f7d0401761a5f68d59a1cea9b2 (diff) | |
download | gitea-2a3906d75532ba8689338247d794f21dceb4d359.tar.gz gitea-2a3906d75532ba8689338247d794f21dceb4d359.zip |
Improve job commit description (#30579)
Fix https://github.com/go-gitea/gitea/issues/30567
When job is a schedule:
![image](https://github.com/go-gitea/gitea/assets/18380374/b07e9d43-e8b7-4ee2-87b3-a7050c3a8ca5)
When it is a normal one:
![image](https://github.com/go-gitea/gitea/assets/18380374/0d58dab9-74bb-421b-8952-0578cdf21a52)
also add a 'space' behind `:`
![image](https://github.com/go-gitea/gitea/assets/18380374/4cebece0-bfe6-4ad9-b806-e5c49bb9be43)
![image](https://github.com/go-gitea/gitea/assets/18380374/02da7681-474b-4c0f-9dad-b6558f6cb484)
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js/components/RepoActionView.vue')
-rw-r--r-- | web_src/js/components/RepoActionView.vue | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 16ce3fc80d..8b39d0504b 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -44,6 +44,9 @@ const sfc = { canApprove: false, canRerun: false, done: false, + workflowID: '', + workflowLink: '', + isSchedule: false, jobs: [ // { // id: 0, @@ -338,10 +341,13 @@ export function initRepositoryActionView() { approve: el.getAttribute('data-locale-approve'), cancel: el.getAttribute('data-locale-cancel'), rerun: el.getAttribute('data-locale-rerun'), + rerun_all: el.getAttribute('data-locale-rerun-all'), + scheduled: el.getAttribute('data-locale-runs-scheduled'), + commit: el.getAttribute('data-locale-runs-commit'), + pushedBy: el.getAttribute('data-locale-runs-pushed-by'), artifactsTitle: el.getAttribute('data-locale-artifacts-title'), areYouSure: el.getAttribute('data-locale-are-you-sure'), confirmDeleteArtifact: el.getAttribute('data-locale-confirm-delete-artifact'), - rerun_all: el.getAttribute('data-locale-rerun-all'), showTimeStamps: el.getAttribute('data-locale-show-timestamps'), showLogSeconds: el.getAttribute('data-locale-show-log-seconds'), showFullScreen: el.getAttribute('data-locale-show-full-screen'), @@ -382,10 +388,16 @@ export function initRepositoryActionView() { </button> </div> <div class="action-commit-summary"> - {{ run.commit.localeCommit }} - <a class="muted" :href="run.commit.link">{{ run.commit.shortSHA }}</a> - {{ run.commit.localePushedBy }} - <a class="muted" :href="run.commit.pusher.link">{{ run.commit.pusher.displayName }}</a> + <span><a class="muted" :href="run.workflowLink"><b>{{ run.workflowID }}</b></a>:</span> + <template v-if="run.isSchedule"> + {{ locale.scheduled }} + </template> + <template v-else> + {{ locale.commit }} + <a class="muted" :href="run.commit.link">{{ run.commit.shortSHA }}</a> + {{ locale.pushedBy }} + <a class="muted" :href="run.commit.pusher.link">{{ run.commit.pusher.displayName }}</a> + </template> <span class="ui label tw-max-w-full" v-if="run.commit.shortSHA"> <a class="gt-ellipsis" :href="run.commit.branch.link">{{ run.commit.branch.name }}</a> </span> |