Skip to content

Commit 5884e1e

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: Show new pull request button also on subdirectories and files (go-gitea#24842) Improvements for action detail page (go-gitea#24718)
2 parents b05d1a0 + 32ec254 commit 5884e1e

File tree

7 files changed

+134
-58
lines changed

7 files changed

+134
-58
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ milestones = Milestones
8080
ok = OK
8181
cancel = Cancel
8282
rerun = Re-run
83+
rerun_all = Re-run all jobs
8384
save = Save
8485
add = Add
8586
add_all = Add All

templates/repo/actions/status.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!-- This template should be kept the same as web_src/js/components/ActionRunStatus.vue
22
Please also update the vue file above if this template is modified.
3+
action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
34
-->
45
{{- $size := 16 -}}
56
{{- if .size -}}
@@ -11,7 +12,7 @@
1112
{{- $className = .className -}}
1213
{{- end -}}
1314

14-
<span data-tooltip-content="{{.locale.Tr (printf "actions.status.%s" .status)}}">
15+
<span class="gt-df gt-ac" data-tooltip-content="{{.locale.Tr (printf "actions.status.%s" .status)}}">
1516
{{if eq .status "success"}}
1617
{{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}}
1718
{{else if eq .status "skipped"}}
@@ -22,7 +23,7 @@
2223
{{svg "octicon-blocked" $size (printf "text yellow %s" $className)}}
2324
{{else if eq .status "running"}}
2425
{{svg "octicon-meter" $size (printf "text yellow job-status-rotate %s" $className)}}
25-
{{else}}
26+
{{else if or (eq .status "failure") or (eq .status "cancelled") or (eq .status "unknown")}}
2627
{{svg "octicon-x-circle-fill" $size (printf "text red %s" $className)}}
2728
{{end}}
2829
</span>

templates/repo/actions/view.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
data-locale-approve="{{.locale.Tr "repo.diff.review.approve"}}"
1010
data-locale-cancel="{{.locale.Tr "cancel"}}"
1111
data-locale-rerun="{{.locale.Tr "rerun"}}"
12+
data-locale-rerun-all="{{.locale.Tr "rerun_all"}}"
1213
data-locale-status-unknown="{{.locale.Tr "actions.status.unknown"}}"
1314
data-locale-status-waiting="{{.locale.Tr "actions.status.waiting"}}"
1415
data-locale-status-running="{{.locale.Tr "actions.status.running"}}"

templates/repo/home.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@
6464
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw">
6565
<div class="gt-df gt-ac gt-fw gt-gap-y-3">
6666
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
67-
{{$n := len .TreeNames}}
68-
{{$l := Eval $n "-" 1}}
69-
<!-- If home page, show new pr. If not, show breadcrumb -->
70-
{{if and (eq $n 0) .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
67+
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
7168
{{$cmpBranch := ""}}
7269
{{if ne .Repository.ID .BaseRepo.ID}}
7370
{{$cmpBranch = printf "%s/%s:" (.Repository.OwnerName|PathEscape) (.Repository.Name|PathEscape)}}
@@ -79,6 +76,9 @@
7976
{{svg "octicon-git-pull-request"}}
8077
</a>
8178
{{end}}
79+
<!-- Show go to file and breadcrumbs if not on home page -->
80+
{{$n := len .TreeNames}}
81+
{{$l := Eval $n "-" 1}}
8282
{{if eq $n 0}}
8383
<a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button">{{.locale.Tr "repo.find_file.go_to_file"}}</a>
8484
{{end}}

web_src/css/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
/* console colors */
7171
--color-console-fg: #ffffff;
7272
--color-console-bg: #171717;
73+
--color-console-hover-bg: #ffffff16;
7374
/* named colors */
7475
--color-red: #db2828;
7576
--color-orange: #f2711c;

web_src/js/components/ActionRunStatus.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<!-- This vue should be kept the same as templates/repo/actions/status.tmpl
22
Please also update the template file above if this vue is modified.
3+
action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
34
-->
45
<template>
5-
<span :data-tooltip-content="localeStatus" v-if="status">
6+
<span class="gt-df gt-ac" :data-tooltip-content="localeStatus" v-if="status">
67
<SvgIcon name="octicon-check-circle-fill" class="text green" :size="size" :class-name="className" v-if="status === 'success'"/>
78
<SvgIcon name="octicon-skip" class="text grey" :size="size" :class-name="className" v-else-if="status === 'skipped'"/>
89
<SvgIcon name="octicon-clock" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'waiting'"/>
910
<SvgIcon name="octicon-blocked" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'blocked'"/>
1011
<SvgIcon name="octicon-meter" class="text yellow" :size="size" :class-name="'job-status-rotate ' + className" v-else-if="status === 'running'"/>
11-
<SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else/>
12+
<SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else-if="['failure', 'cancelled', 'unknown'].includes(status)" />
1213
</span>
1314
</template>
1415

0 commit comments

Comments
 (0)