mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-01-11 20:56:29 +00:00
chore(ui): cleanup PR checks area (#10768)
Some checks are pending
/ release (push) Waiting to run
testing-integration / test-unit (push) Waiting to run
testing-integration / test-sqlite (push) Waiting to run
testing-integration / test-mariadb (v10.6) (push) Waiting to run
testing-integration / test-mariadb (v11.8) (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Some checks are pending
/ release (push) Waiting to run
testing-integration / test-unit (push) Waiting to run
testing-integration / test-sqlite (push) Waiting to run
testing-integration / test-mariadb (v10.6) (push) Waiting to run
testing-integration / test-mariadb (v11.8) (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Mostly a UI followup to https://codeberg.org/forgejo/forgejo/pulls/9397 with a few fixes. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10768 Reviewed-by: Beowulf <beowulf@beocode.eu> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
270317a3ad
commit
581227f20a
3 changed files with 26 additions and 34 deletions
|
|
@ -36,7 +36,7 @@
|
|||
{{if .Issue.PullRequest.HasMerged}}
|
||||
{{if .IsPullBranchDeletable}}
|
||||
<div class="item item-section text tw-flex-1">
|
||||
<div class="item-section-left">
|
||||
<div>
|
||||
<h3 class="tw-mb-2">
|
||||
{{ctx.Locale.Tr "repo.pulls.merged_success"}}
|
||||
</h3>
|
||||
|
|
@ -44,14 +44,14 @@
|
|||
{{ctx.Locale.Tr "repo.pulls.merged_info_text" (HTMLFormat "<code>%s</code>" .HeadTarget)}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-section-right">
|
||||
<div>
|
||||
<button class="delete-button ui button" data-url="{{.DeleteBranchLink}}" data-modal-id="delete-branch">{{ctx.Locale.Tr "repo.branch.delete_html"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else if .Issue.IsClosed}}
|
||||
<div class="item item-section text tw-flex-1">
|
||||
<div class="item-section-left">
|
||||
<div>
|
||||
<h3 class="tw-mb-2">{{ctx.Locale.Tr "repo.pulls.closed"}}</h3>
|
||||
<div class="merge-section-info">
|
||||
{{if .IsPullRequestBroken}}
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{if and .IsPullBranchDeletable (not .IsPullRequestBroken)}}
|
||||
<div class="item-section-right">
|
||||
<div>
|
||||
<button class="delete-button ui button" data-url="{{.DeleteBranchLink}}" data-modal-id="delete-branch">{{ctx.Locale.Tr "repo.branch.delete_html"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
</div>
|
||||
{{else if .IsPullWorkInProgress}}
|
||||
<div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}" data-update-url="{{.Issue.Link}}/title">
|
||||
<div class="item-section-left flex-text-inline tw-flex-1">
|
||||
<div class="flex-text-inline tw-flex-1">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}}
|
||||
<div class="divider"></div>
|
||||
<div class="item item-section">
|
||||
<div class="item-section-left flex-text-inline">
|
||||
<div class="flex-text-inline">
|
||||
{{svg "octicon-alert"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.outdated_with_base_branch"}}
|
||||
</div>
|
||||
<div class="item-section-right">
|
||||
<div>
|
||||
{{if and $.UpdateAllowed $.UpdateByRebaseAllowed}}
|
||||
<div class="tw-inline-block">
|
||||
<div class="ui buttons update-button">
|
||||
|
|
|
|||
|
|
@ -14,45 +14,37 @@ Template Attributes:
|
|||
<div class="pull-request-trust-panel" id="pull-request-trust-panel">
|
||||
<div class="divider"></div>
|
||||
<div class="item item-section">
|
||||
<div class="item-section-left flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_is_trusted.tooltip"}}">
|
||||
<div data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_is_trusted.tooltip"}}">
|
||||
{{ctx.Locale.Tr "repo.pulls.poster_is_trusted" "https://forgejo.org/docs/latest/user/actions/security-pull-request/"}}
|
||||
</div>
|
||||
<div class="item-section-right">
|
||||
<form id="pull-request-trust-panel-revoke" class="ui form" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="revoke">
|
||||
<button class="ui primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_revoke.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_revoke"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
<form id="pull-request-trust-panel-revoke" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="revoke">
|
||||
<button class="primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_revoke.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_revoke"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{else if and .PullRequestPosterIsNotTrustedWithActions .SomePullRequestRunsNeedApproval}}
|
||||
<div class="pull-request-trust-panel" id="pull-request-trust-panel">
|
||||
<div class="divider"></div>
|
||||
<div class="item item-section">
|
||||
<div class="item-section-left flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_requires_approval.tooltip"}}">
|
||||
<div data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_requires_approval.tooltip"}}">
|
||||
{{svg "octicon-alert" 16 "text red"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.poster_requires_approval" "https://forgejo.org/docs/latest/user/actions/security-pull-request/"}}
|
||||
</div>
|
||||
{{if .UserCanDelegateTrustWithPullRequest}}
|
||||
<div class="item-section-right">
|
||||
<div class="tw-inline-block">
|
||||
<form id="pull-request-trust-panel-deny" class="ui form" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="deny">
|
||||
<button class="ui primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_deny.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_deny"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tw-inline-block">
|
||||
<form id="pull-request-trust-panel-once" class="ui form" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="once">
|
||||
<button class="ui primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_once.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_once"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tw-inline-block">
|
||||
<form id="pull-request-trust-panel-always" class="ui form" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="always">
|
||||
<button class="ui primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_always.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_always"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="button-sequence">
|
||||
<form id="pull-request-trust-panel-deny" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="deny">
|
||||
<button class="primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_deny.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_deny"}}</button>
|
||||
</form>
|
||||
<form id="pull-request-trust-panel-once" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="once">
|
||||
<button class="primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_once.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_once"}}</button>
|
||||
</form>
|
||||
<form id="pull-request-trust-panel-always" method="post" action="{{.Link}}/action-user-trust">
|
||||
<input type="hidden" name="trust" value="always">
|
||||
<button class="primary button" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.poster_trust_always.tooltip"}}">{{ctx.Locale.Tr "repo.pulls.poster_trust_always"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue