Compare commits

..

5 Commits

Author SHA1 Message Date
Denys Konovalov
917ca5ded9
Several fixes for mobile UI (#25634) (#25689)
Backport #25634 

Resolves https://github.com/go-gitea/gitea/issues/25622

<details>
<summary>Screenshots</summary>

![Bildschirmfoto vom 2023-07-02

20-47-34](https://github.com/go-gitea/gitea/assets/47871822/a8a0bff6-9ae3-48f3-b008-00c196a3f8fd)
![Bildschirmfoto vom 2023-07-02

20-47-45](https://github.com/go-gitea/gitea/assets/47871822/172a0021-af74-4690-aa67-0e66688ce733)
![Bildschirmfoto vom 2023-07-02

20-48-37](https://github.com/go-gitea/gitea/assets/47871822/14572ebd-0106-4c8a-ba27-b6b631375ee6)
![Bildschirmfoto vom 2023-07-02

20-49-08](https://github.com/go-gitea/gitea/assets/47871822/7c0ba3aa-1712-482c-aae9-13394dbdaf8a)
![Bildschirmfoto vom 2023-07-02

20-50-28](https://github.com/go-gitea/gitea/assets/47871822/8bd68e26-099a-4abd-8817-16d52af13167)
![Bildschirmfoto vom 2023-07-02

20-51-46](https://github.com/go-gitea/gitea/assets/47871822/3beab8c6-3747-4829-be50-bafaed11000c)
![Bildschirmfoto vom 2023-07-02

20-54-12](https://github.com/go-gitea/gitea/assets/47871822/51f82ef3-a32c-4c27-9056-e8711ed469cc)

</details>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-07 00:34:00 +02:00
Giteabot
e595dfeec7
Allow/fix review (approve/reject) of empty PRs (#25690) (#25732)
Backport #25690 by @sebastian-sauer

gitea allows to create empty PRs.

Currently when you need approvals for a merge, you have to manually add
/files to the url to get to the files tab to approve / reject the PR.

This PR allows to open the files tab via the normal tab / link and then
fixes the layout of the files tab.

**Screenshots:**

Before:

![image](https://github.com/go-gitea/gitea/assets/1135157/b5082e5e-8c32-4412-993e-b854905e96d3)

After:

![image](https://github.com/go-gitea/gitea/assets/1135157/1f5e056e-396f-4dfb-8d14-e17a2f6495d9)

Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2023-07-06 19:34:41 +00:00
Giteabot
03cacf971e
Check ctx.Written() for GetActionIssue (#25698) (#25711)
Backport #25698 by @wolfogre

Fix #25697.

Just avoid panic, maybe there's another bug to trigger this case.

Co-authored-by: Jason Song <i@wolfogre.com>
2023-07-06 21:04:26 +02:00
Giteabot
68e0c802f7
Show correct naming for 1 comment (#25704) (#25712)
Backport #25704 by @earl-warren

- Resolves https://codeberg.org/forgejo/forgejo/issues/948

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
2023-07-06 16:04:13 +00:00
Giteabot
09668b2e2e
Correct permissions for .ssh and authorized_keys (#25721) (#25730)
Backport #25721 by @wolfogre

Set the correct permissions on the .ssh directory and authorized_keys
file, or sshd will refuse to use them and lead to clone/push/pull
failures.

It could happen when users have copied their data to a new volume and
changed the file permission by accident, and it would be very hard to
troubleshoot unless users know how to check the logs of sshd which is
started by s6.

Co-authored-by: Jason Song <i@wolfogre.com>
2023-07-06 11:02:56 -04:00
21 changed files with 274 additions and 241 deletions

View File

@ -2,7 +2,15 @@
if [ ! -d /data/git/.ssh ]; then if [ ! -d /data/git/.ssh ]; then
mkdir -p /data/git/.ssh mkdir -p /data/git/.ssh
chmod 700 /data/git/.ssh fi
# Set the correct permissions on the .ssh directory and authorized_keys file,
# or sshd will refuse to use them and lead to clone/push/pull failures.
# It could happen when users have copied their data to a new volume and changed the file permission by accident,
# and it would be very hard to troubleshoot unless users know how to check the logs of sshd which is started by s6.
chmod 700 /data/git/.ssh
if [ -f /data/git/.ssh/authorized_keys ]; then
chmod 600 /data/git/.ssh/authorized_keys
fi fi
if [ ! -f /data/git/.ssh/environment ]; then if [ ! -f /data/git/.ssh/environment ]; then

View File

@ -1430,6 +1430,7 @@ issues.next = Next
issues.open_title = Open issues.open_title = Open
issues.closed_title = Closed issues.closed_title = Closed
issues.draft_title = Draft issues.draft_title = Draft
issues.num_comments_1 = %d comment
issues.num_comments = %d comments issues.num_comments = %d comments
issues.commented_at = `commented <a href="#%s">%s</a>` issues.commented_at = `commented <a href="#%s">%s</a>`
issues.delete_comment_confirm = Are you sure you want to delete this comment? issues.delete_comment_confirm = Are you sure you want to delete this comment?

View File

@ -1958,7 +1958,7 @@ func GetActionIssue(ctx *context.Context) *issues_model.Issue {
return nil return nil
} }
if err = issue.LoadAttributes(ctx); err != nil { if err = issue.LoadAttributes(ctx); err != nil {
ctx.ServerError("LoadAttributes", nil) ctx.ServerError("LoadAttributes", err)
return nil return nil
} }
return issue return issue
@ -3258,6 +3258,9 @@ func filterXRefComments(ctx *context.Context, issue *issues_model.Issue) error {
// GetIssueAttachments returns attachments for the issue // GetIssueAttachments returns attachments for the issue
func GetIssueAttachments(ctx *context.Context) { func GetIssueAttachments(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if ctx.Written() {
return
}
attachments := make([]*api.Attachment, len(issue.Attachments)) attachments := make([]*api.Attachment, len(issue.Attachments))
for i := 0; i < len(issue.Attachments); i++ { for i := 0; i < len(issue.Attachments); i++ {
attachments[i] = convert.ToAttachment(issue.Attachments[i]) attachments[i] = convert.ToAttachment(issue.Attachments[i])

View File

@ -24,7 +24,7 @@ import (
// GetContentHistoryOverview get overview // GetContentHistoryOverview get overview
func GetContentHistoryOverview(ctx *context.Context) { func GetContentHistoryOverview(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if issue == nil { if ctx.Written() {
return return
} }
@ -43,11 +43,11 @@ func GetContentHistoryOverview(ctx *context.Context) {
// GetContentHistoryList get list // GetContentHistoryList get list
func GetContentHistoryList(ctx *context.Context) { func GetContentHistoryList(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
commentID := ctx.FormInt64("comment_id") if ctx.Written() {
if issue == nil {
return return
} }
commentID := ctx.FormInt64("comment_id")
items, _ := issues_model.FetchIssueContentHistoryList(ctx, issue.ID, commentID) items, _ := issues_model.FetchIssueContentHistoryList(ctx, issue.ID, commentID)
// render history list to HTML for frontend dropdown items: (name, value) // render history list to HTML for frontend dropdown items: (name, value)
@ -113,7 +113,7 @@ func canSoftDeleteContentHistory(ctx *context.Context, issue *issues_model.Issue
// GetContentHistoryDetail get detail // GetContentHistoryDetail get detail
func GetContentHistoryDetail(ctx *context.Context) { func GetContentHistoryDetail(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if issue == nil { if ctx.Written() {
return return
} }
@ -179,7 +179,7 @@ func GetContentHistoryDetail(ctx *context.Context) {
// SoftDeleteContentHistory soft delete // SoftDeleteContentHistory soft delete
func SoftDeleteContentHistory(ctx *context.Context) { func SoftDeleteContentHistory(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if issue == nil { if ctx.Written() {
return return
} }

View File

@ -15,6 +15,9 @@ import (
// IssuePinOrUnpin pin or unpin a Issue // IssuePinOrUnpin pin or unpin a Issue
func IssuePinOrUnpin(ctx *context.Context) { func IssuePinOrUnpin(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if ctx.Written() {
return
}
// If we don't do this, it will crash when trying to add the pin event to the comment history // If we don't do this, it will crash when trying to add the pin event to the comment history
err := issue.LoadRepo(ctx) err := issue.LoadRepo(ctx)

View File

@ -1470,10 +1470,10 @@ func DownloadPullDiffOrPatch(ctx *context.Context, patch bool) {
// UpdatePullRequestTarget change pull request's target branch // UpdatePullRequestTarget change pull request's target branch
func UpdatePullRequestTarget(ctx *context.Context) { func UpdatePullRequestTarget(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
pr := issue.PullRequest
if ctx.Written() { if ctx.Written() {
return return
} }
pr := issue.PullRequest
if !issue.IsPull { if !issue.IsPull {
ctx.Error(http.StatusNotFound) ctx.Error(http.StatusNotFound)
return return

View File

@ -28,6 +28,9 @@ const (
// RenderNewCodeCommentForm will render the form for creating a new review comment // RenderNewCodeCommentForm will render the form for creating a new review comment
func RenderNewCodeCommentForm(ctx *context.Context) { func RenderNewCodeCommentForm(ctx *context.Context) {
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if ctx.Written() {
return
}
if !issue.IsPull { if !issue.IsPull {
return return
} }
@ -52,10 +55,10 @@ func RenderNewCodeCommentForm(ctx *context.Context) {
func CreateCodeComment(ctx *context.Context) { func CreateCodeComment(ctx *context.Context) {
form := web.GetForm(ctx).(*forms.CodeCommentForm) form := web.GetForm(ctx).(*forms.CodeCommentForm)
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if !issue.IsPull { if ctx.Written() {
return return
} }
if ctx.Written() { if !issue.IsPull {
return return
} }
@ -185,10 +188,10 @@ func renderConversation(ctx *context.Context, comment *issues_model.Comment) {
func SubmitReview(ctx *context.Context) { func SubmitReview(ctx *context.Context) {
form := web.GetForm(ctx).(*forms.SubmitReviewForm) form := web.GetForm(ctx).(*forms.SubmitReviewForm)
issue := GetActionIssue(ctx) issue := GetActionIssue(ctx)
if !issue.IsPull { if ctx.Written() {
return return
} }
if ctx.Written() { if !issue.IsPull {
return return
} }
if ctx.HasError() { if ctx.HasError() {

View File

@ -25,7 +25,7 @@
<a href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranch}}">{{.DefaultBranch}}</a> <a href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranch}}">{{.DefaultBranch}}</a>
<p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.Commit.ID.String}}">{{ShortSha .DefaultBranchBranch.Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.Commit.CommitMessage .RepoLink .Repository.ComposeMetas}}</span> · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.Commit.Committer.When .locale}}</p> <p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.Commit.ID.String}}">{{ShortSha .DefaultBranchBranch.Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.Commit.CommitMessage .RepoLink .Repository.ComposeMetas}}</span> · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.Commit.Committer.When .locale}}</p>
</td> </td>
<td class="right aligned overflow-visible"> <td class="right aligned middle aligned overflow-visible">
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
<button class="btn interact-bg show-create-branch-modal gt-p-3" <button class="btn interact-bg show-create-branch-modal gt-p-3"
data-modal="#create-branch-modal" data-modal="#create-branch-modal"

View File

@ -1,5 +1,5 @@
<div class="ui attached table segment commit-table"> <div class="ui attached table segment commit-table">
<table class="ui very basic striped table unstackable fixed" id="commits-table"> <table class="ui very basic striped table unstackable" id="commits-table">
<thead> <thead>
<tr> <tr>
<th class="three wide">{{.locale.Tr "repo.commits.author"}}</th> <th class="three wide">{{.locale.Tr "repo.commits.author"}}</th>

View File

@ -8,23 +8,23 @@
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}} {{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
{{end}} {{end}}
</div> </div>
<div class="commits-table-right gt-df gt-ac"> <div class="commits-table-right">
{{if .PageIsCommits}} {{if .PageIsCommits}}
<form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search"> <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
<div class="ui tiny search input"> <div class="ui tiny search input">
<input name="q" placeholder="{{.locale.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> <input name="q" placeholder="{{.locale.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
</div> </div>
&nbsp;
<div class="ui checkbox"> <div class="ui tiny checkbox">
<input type="checkbox" name="all" id="all" value="true" {{.All}}> <input type="checkbox" name="all" value="true" {{.All}}>
<label for="all">{{.locale.Tr "repo.commits.search_all"}} &nbsp;&nbsp;</label> <label>{{.locale.Tr "repo.commits.search_all"}}</label>
</div> </div>
<button class="ui primary tiny button gt-mr-0" data-panel="#add-deploy-key-panel" data-tooltip-content={{.locale.Tr "repo.commits.search.tooltip"}}>{{.locale.Tr "repo.commits.find"}}</button> <button class="ui primary tiny button gt-mr-0" data-panel="#add-deploy-key-panel" data-tooltip-content={{.locale.Tr "repo.commits.search.tooltip"}}>{{.locale.Tr "repo.commits.find"}}</button>
</form> </form>
{{else if .IsDiffCompare}} {{else if .IsDiffCompare}}
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID | PathEscape}}" class="ui green sha label">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a> <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID | PathEscape}}" class="ui green sha label gt-mx-0">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a>
... ...
<a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID | PathEscape}}" class="ui green sha label">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a> <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID | PathEscape}}" class="ui green sha label gt-mx-0">{{if not .HeadIsCommit}}{{if .HeadIsBranch}}{{svg "octicon-git-branch"}}{{else if .HeadIsTag}}{{svg "octicon-tag"}}{{end}}{{.HeadBranch}}{{else}}{{ShortSha .HeadBranch}}{{end}}</a>
{{end}} {{end}}
</div> </div>
</h4> </h4>

View File

@ -1,20 +1,7 @@
{{if .DiffNotAvailable}} <div>
<div> <div class="diff-detail-box diff-box sticky gt-df gt-sb gt-ac gt-fw">
<div class="diff-detail-box diff-box sticky"> <div class="gt-df gt-ac gt-fw">
<div class="ui right"> {{if not .DiffNotAvailable}}
{{template "repo/diff/whitespace_dropdown" .}}
{{template "repo/diff/options_dropdown" .}}
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}}
{{template "repo/diff/new_review" .}}
{{end}}
</div>
</div>
</div>
<h4>{{.locale.Tr "repo.diff.data_not_available"}}</h4>
{{else}}
<div>
<div class="diff-detail-box diff-box sticky gt-df gt-sb gt-ac gt-fw">
<div class="gt-df gt-ac gt-fw">
<button class="diff-toggle-file-tree-button gt-df gt-ac not-mobile" data-show-text="{{.locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{.locale.Tr "repo.diff.hide_file_tree"}}"> <button class="diff-toggle-file-tree-button gt-df gt-ac not-mobile" data-show-text="{{.locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{.locale.Tr "repo.diff.hide_file_tree"}}">
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}} {{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
{{svg "octicon-sidebar-collapse" 20 "icon gt-hidden"}} {{svg "octicon-sidebar-collapse" 20 "icon gt-hidden"}}
@ -31,23 +18,25 @@
<div class="diff-detail-stats gt-df gt-ac gt-fw"> <div class="diff-detail-stats gt-df gt-ac gt-fw">
{{svg "octicon-diff" 16 "gt-mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} {{svg "octicon-diff" 16 "gt-mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
</div> </div>
</div> {{end}}
<div class="diff-detail-actions gt-df gt-ac gt-gap-2 gt-fw">
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}}
<div class="gt-df gt-ac gt-fc gt-whitespace-nowrap gt-mr-2">
<label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}">
{{.locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}}
</label>
<progress id="viewed-files-summary" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress>
</div>
{{end}}
{{template "repo/diff/whitespace_dropdown" .}}
{{template "repo/diff/options_dropdown" .}}
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}}
{{template "repo/diff/new_review" .}}
{{end}}
</div>
</div> </div>
<div class="diff-detail-actions gt-df gt-ac gt-gap-2 gt-fw">
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}}
<div class="gt-df gt-ac gt-fc gt-whitespace-nowrap gt-mr-2">
<label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}">
{{.locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}}
</label>
<progress id="viewed-files-summary" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress>
</div>
{{end}}
{{template "repo/diff/whitespace_dropdown" .}}
{{template "repo/diff/options_dropdown" .}}
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}}
{{template "repo/diff/new_review" .}}
{{end}}
</div>
</div>
{{if not .DiffNotAvailable}}
<script id="diff-data-script" type="module"> <script id="diff-data-script" type="module">
const diffDataFiles = [{{range $i, $file := .Diff.Files}}{Name:"{{$file.Name}}",NameHash:"{{$file.NameHash}}",Type:{{$file.Type}},IsBin:{{$file.IsBin}},Addition:{{$file.Addition}},Deletion:{{$file.Deletion}}},{{end}}]; const diffDataFiles = [{{range $i, $file := .Diff.Files}}{Name:"{{$file.Name}}",NameHash:"{{$file.NameHash}}",Type:{{$file.Type}},IsBin:{{$file.IsBin}},Addition:{{$file.Addition}},Deletion:{{$file.Deletion}}},{{end}}];
const diffData = { const diffData = {
@ -74,155 +63,160 @@
window.config.pageData.diffFileInfo = diffFileInfo; window.config.pageData.diffFileInfo = diffFileInfo;
</script> </script>
<div id="diff-file-list"></div> <div id="diff-file-list"></div>
<div id="diff-container"> {{end}}
<div id="diff-file-tree" class="gt-hidden"></div> <div id="diff-container">
<script> {{if .DiffNotAvailable}}
if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('gt-hidden'); <h4>{{.locale.Tr "repo.diff.data_not_available"}}</h4>
</script> {{else}}
<div id="diff-file-boxes" class="sixteen wide column"> <div id="diff-file-tree" class="gt-hidden"></div>
{{range $i, $file := .Diff.Files}} <script>
{{/*notice: the index of Diff.Files should not be used for element ID, because the index will be restarted from 0 when doing load-more for PRs with a lot of files*/}} if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('gt-hidden');
{{$blobBase := call $.GetBlobByPathForCommit $.BeforeCommit $file.OldName}} </script>
{{$blobHead := call $.GetBlobByPathForCommit $.HeadCommit $file.Name}} <div id="diff-file-boxes" class="sixteen wide column">
{{$isImage := or (call $.IsBlobAnImage $blobBase) (call $.IsBlobAnImage $blobHead)}} {{range $i, $file := .Diff.Files}}
{{$isCsv := (call $.IsCsvFile $file)}} {{/*notice: the index of Diff.Files should not be used for element ID, because the index will be restarted from 0 when doing load-more for PRs with a lot of files*/}}
{{$showFileViewToggle := or $isImage (and (not $file.IsIncomplete) $isCsv)}} {{$blobBase := call $.GetBlobByPathForCommit $.BeforeCommit $file.OldName}}
{{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}} {{$blobHead := call $.GetBlobByPathForCommit $.HeadCommit $file.Name}}
{{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived)}} {{$isImage := or (call $.IsBlobAnImage $blobBase) (call $.IsBlobAnImage $blobHead)}}
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-3" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}> {{$isCsv := (call $.IsCsvFile $file)}}
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header gt-df gt-ac gt-sb gt-fw"> {{$showFileViewToggle := or $isImage (and (not $file.IsIncomplete) $isCsv)}}
<div class="diff-file-name gt-df gt-ac gt-gap-2 gt-fw"> {{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}}
<button class="fold-file btn interact-bg gt-p-2{{if not $isExpandable}} gt-invisible{{end}}"> {{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived)}}
{{if $file.ShouldBeHidden}} <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-3" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}>
{{svg "octicon-chevron-right" 18}} <h4 class="diff-file-header sticky-2nd-row ui top attached normal header gt-df gt-ac gt-sb gt-fw">
{{else}} <div class="diff-file-name gt-df gt-ac gt-gap-2 gt-fw">
{{svg "octicon-chevron-down" 18}} <button class="fold-file btn interact-bg gt-p-2{{if not $isExpandable}} gt-invisible{{end}}">
{{end}} {{if $file.ShouldBeHidden}}
</button> {{svg "octicon-chevron-right" 18}}
<div class="gt-font-semibold gt-df gt-ac gt-mono">
{{if $file.IsBin}}
<span class="gt-ml-1 gt-mr-3">
{{$.locale.Tr "repo.diff.bin"}}
</span>
{{else}}
{{template "repo/diff/stats" dict "file" . "root" $}}
{{end}}
</div>
<span class="file gt-mono"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
<button class="btn interact-fg gt-p-3" data-clipboard-text="{{$file.Name}}">{{svg "octicon-copy" 14}}</button>
{{if $file.IsGenerated}}
<span class="ui label">{{$.locale.Tr "repo.diff.generated"}}</span>
{{end}}
{{if $file.IsVendored}}
<span class="ui label">{{$.locale.Tr "repo.diff.vendored"}}</span>
{{end}}
{{if and $file.Mode $file.OldMode}}
<span class="gt-ml-4 gt-mono">{{$file.OldMode}} &rarr; {{$file.Mode}}</span>
{{else if $file.Mode}}
<span class="gt-ml-4 gt-mono">{{$file.Mode}}</span>
{{end}}
</div>
<div class="diff-file-header-actions gt-df gt-ac gt-gap-2 gt-fw">
{{if $showFileViewToggle}}
<div class="ui compact icon buttons">
<button class="ui tiny basic button file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-tooltip-content="{{$.locale.Tr "repo.file_view_source"}}">{{svg "octicon-code"}}</button>
<button class="ui tiny basic button file-view-toggle active" data-toggle-selector="#diff-rendered-{{$file.NameHash}}" data-tooltip-content="{{$.locale.Tr "repo.file_view_rendered"}}">{{svg "octicon-file"}}</button>
</div>
{{end}}
{{if $file.IsProtected}}
<span class="ui basic label">{{$.locale.Tr "repo.diff.protected"}}</span>
{{end}}
{{if and $isReviewFile $file.HasChangedSinceLastReview}}
<span class="changed-since-last-review unselectable not-mobile">{{$.locale.Tr "repo.pulls.has_changed_since_last_review"}}</span>
{{end}}
{{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
<button class="ui basic tiny button unescape-button not-mobile">{{$.locale.Tr "repo.unescape_control_characters"}}</button>
<button class="ui basic tiny button escape-button gt-hidden">{{$.locale.Tr "repo.escape_control_characters"}}</button>
{{end}}
{{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
{{if $file.IsDeleted}}
<a class="ui basic tiny button" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{$.locale.Tr "repo.diff.view_file"}}</a>
{{else}}
<a class="ui basic tiny button" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{$.locale.Tr "repo.diff.view_file"}}</a>
{{end}}
{{end}}
{{if $isReviewFile}}
<label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.AfterCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
<input type="checkbox" name="{{$file.GetDiffFileName}}" autocomplete="off"{{if $file.IsViewed}} checked{{end}}> {{$.locale.Tr "repo.pulls.has_viewed_file"}}
</label>
{{end}}
</div>
</h4>
<div class="diff-file-body ui attached unstackable table segment" {{if $file.IsViewed}}data-folded="true"{{end}}>
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} gt-hidden{{end}}">
{{if or $file.IsIncomplete $file.IsBin}}
<div class="diff-file-body binary" style="padding: 5px 10px;">
{{if $file.IsIncomplete}}
{{if $file.IsIncompleteLineTooLong}}
{{$.locale.Tr "repo.diff.file_suppressed_line_too_long"}}
{{else}}
{{$.locale.Tr "repo.diff.file_suppressed"}}
<a class="ui basic tiny button diff-load-button" data-href="{{$.Link}}?file-only=true&files={{$file.Name}}&files={{$file.OldName}}">{{$.locale.Tr "repo.diff.load"}}</a>
{{end}}
{{else}}
{{$.locale.Tr "repo.diff.bin_not_shown"}}
{{end}}
</div>
{{else}} {{else}}
<table class="chroma" data-new-comment-url="{{$.Issue.Link}}/files/reviews/new_comment" data-path="{{$file.Name}}"> {{svg "octicon-chevron-down" 18}}
{{if $.IsSplitStyle}} {{end}}
{{template "repo/diff/section_split" dict "file" . "root" $}} </button>
{{else}} <div class="gt-font-semibold gt-df gt-ac gt-mono">
{{template "repo/diff/section_unified" dict "file" . "root" $}} {{if $file.IsBin}}
{{end}} <span class="gt-ml-1 gt-mr-3">
</table> {{$.locale.Tr "repo.diff.bin"}}
</span>
{{else}}
{{template "repo/diff/stats" dict "file" . "root" $}}
{{end}} {{end}}
</div> </div>
{{if $showFileViewToggle}} <span class="file gt-mono"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
{{/* for image or CSV, it can have a horizontal scroll bar, there won't be review comment context menu (position absolute) which would be clipped by "overflow" */}} <button class="btn interact-fg gt-p-3" data-clipboard-text="{{$file.Name}}">{{svg "octicon-copy" 14}}</button>
<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}} gt-overflow-x-scroll"> {{if $file.IsGenerated}}
<table class="chroma gt-w-100"> <span class="ui label">{{$.locale.Tr "repo.diff.generated"}}</span>
{{if $isImage}} {{end}}
{{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead}} {{if $file.IsVendored}}
{{else}} <span class="ui label">{{$.locale.Tr "repo.diff.vendored"}}</span>
{{template "repo/diff/csv_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead}} {{end}}
{{end}} {{if and $file.Mode $file.OldMode}}
</table> <span class="gt-ml-4 gt-mono">{{$file.OldMode}} &rarr; {{$file.Mode}}</span>
</div> {{else if $file.Mode}}
<span class="gt-ml-4 gt-mono">{{$file.Mode}}</span>
{{end}} {{end}}
</div> </div>
<div class="diff-file-header-actions gt-df gt-ac gt-gap-2 gt-fw">
{{if $showFileViewToggle}}
<div class="ui compact icon buttons">
<button class="ui tiny basic button file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-tooltip-content="{{$.locale.Tr "repo.file_view_source"}}">{{svg "octicon-code"}}</button>
<button class="ui tiny basic button file-view-toggle active" data-toggle-selector="#diff-rendered-{{$file.NameHash}}" data-tooltip-content="{{$.locale.Tr "repo.file_view_rendered"}}">{{svg "octicon-file"}}</button>
</div>
{{end}}
{{if $file.IsProtected}}
<span class="ui basic label">{{$.locale.Tr "repo.diff.protected"}}</span>
{{end}}
{{if and $isReviewFile $file.HasChangedSinceLastReview}}
<span class="changed-since-last-review unselectable not-mobile">{{$.locale.Tr "repo.pulls.has_changed_since_last_review"}}</span>
{{end}}
{{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
<button class="ui basic tiny button unescape-button not-mobile">{{$.locale.Tr "repo.unescape_control_characters"}}</button>
<button class="ui basic tiny button escape-button gt-hidden">{{$.locale.Tr "repo.escape_control_characters"}}</button>
{{end}}
{{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
{{if $file.IsDeleted}}
<a class="ui basic tiny button" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{$.locale.Tr "repo.diff.view_file"}}</a>
{{else}}
<a class="ui basic tiny button" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{$.locale.Tr "repo.diff.view_file"}}</a>
{{end}}
{{end}}
{{if $isReviewFile}}
<label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.AfterCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
<input type="checkbox" name="{{$file.GetDiffFileName}}" autocomplete="off"{{if $file.IsViewed}} checked{{end}}> {{$.locale.Tr "repo.pulls.has_viewed_file"}}
</label>
{{end}}
</div>
</h4>
<div class="diff-file-body ui attached unstackable table segment" {{if $file.IsViewed}}data-folded="true"{{end}}>
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} gt-hidden{{end}}">
{{if or $file.IsIncomplete $file.IsBin}}
<div class="diff-file-body binary" style="padding: 5px 10px;">
{{if $file.IsIncomplete}}
{{if $file.IsIncompleteLineTooLong}}
{{$.locale.Tr "repo.diff.file_suppressed_line_too_long"}}
{{else}}
{{$.locale.Tr "repo.diff.file_suppressed"}}
<a class="ui basic tiny button diff-load-button" data-href="{{$.Link}}?file-only=true&files={{$file.Name}}&files={{$file.OldName}}">{{$.locale.Tr "repo.diff.load"}}</a>
{{end}}
{{else}}
{{$.locale.Tr "repo.diff.bin_not_shown"}}
{{end}}
</div>
{{else}}
<table class="chroma" data-new-comment-url="{{$.Issue.Link}}/files/reviews/new_comment" data-path="{{$file.Name}}">
{{if $.IsSplitStyle}}
{{template "repo/diff/section_split" dict "file" . "root" $}}
{{else}}
{{template "repo/diff/section_unified" dict "file" . "root" $}}
{{end}}
</table>
{{end}}
</div>
{{if $showFileViewToggle}}
{{/* for image or CSV, it can have a horizontal scroll bar, there won't be review comment context menu (position absolute) which would be clipped by "overflow" */}}
<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}} gt-overflow-x-scroll">
<table class="chroma gt-w-100">
{{if $isImage}}
{{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead}}
{{else}}
{{template "repo/diff/csv_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead}}
{{end}}
</table>
</div>
{{end}}
</div> </div>
{{end}}
{{if .Diff.IsIncomplete}}
<div class="diff-file-box diff-box file-content gt-mt-3" id="diff-incomplete">
<h4 class="ui top attached normal header gt-df gt-ac gt-sb">
{{$.locale.Tr "repo.diff.too_many_files"}}
<a class="ui basic tiny button" id="diff-show-more-files" data-href="{{$.Link}}?skip-to={{.Diff.End}}&file-only=true">{{.locale.Tr "repo.diff.show_more"}}</a>
</h4>
</div>
{{end}}
</div>
</div>
{{if not $.Repository.IsArchived}}
<template id="issue-comment-editor-template">
<div class="ui comment form">
{{template "shared/combomarkdowneditor" (dict
"locale" $.locale
"MarkdownPreviewUrl" (print $.Repository.Link "/markup")
"MarkdownPreviewContext" $.RepoLink
"TextareaName" "content"
"DropzoneParentContainer" ".ui.form"
)}}
<div class="text right edit buttons">
<button class="ui basic primary cancel button" tabindex="3">{{.locale.Tr "repo.issues.cancel"}}</button>
<button class="ui green save button" tabindex="2">{{.locale.Tr "repo.issues.save"}}</button>
</div> </div>
</div> {{end}}
</template>
{{end}}
{{template "repo/issue/view_content/reference_issue_dialog" .}} {{if .Diff.IsIncomplete}}
<div class="diff-file-box diff-box file-content gt-mt-3" id="diff-incomplete">
<h4 class="ui top attached normal header gt-df gt-ac gt-sb">
{{$.locale.Tr "repo.diff.too_many_files"}}
<a class="ui basic tiny button" id="diff-show-more-files" data-href="{{$.Link}}?skip-to={{.Diff.End}}&file-only=true">{{.locale.Tr "repo.diff.show_more"}}</a>
</h4>
</div>
{{end}}
</div>
{{end}}
</div> </div>
{{end}}
{{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}}
<template id="issue-comment-editor-template">
<div class="ui comment form">
{{template "shared/combomarkdowneditor" (dict
"locale" $.locale
"MarkdownPreviewUrl" (print $.Repository.Link "/markup")
"MarkdownPreviewContext" $.RepoLink
"TextareaName" "content"
"DropzoneParentContainer" ".ui.form"
)}}
<div class="text right edit buttons">
<button class="ui basic primary cancel button" tabindex="3">{{.locale.Tr "repo.issues.cancel"}}</button>
<button class="ui green save button" tabindex="2">{{.locale.Tr "repo.issues.save"}}</button>
</div>
</div>
</template>
{{end}}
{{if (not .DiffNotAvailable)}}
{{template "repo/issue/view_content/reference_issue_dialog" .}}
{{end}}
</div>

View File

@ -1,5 +1,5 @@
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown"> <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown">
<span class="text gt-df gt-ac muted"> <span class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.labels"}}</strong> <strong>{{.locale.Tr "repo.issues.new.labels"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}} {{svg "octicon-gear" 16 "gt-ml-2"}}

View File

@ -59,10 +59,10 @@
<input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}"> <input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown"> <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown">
<span class="text"> <span class="text flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong>
{{if .HasIssuesOrPullsWritePermission}} {{if .HasIssuesOrPullsWritePermission}}
{{svg "octicon-gear"}} {{svg "octicon-gear" 16 "gt-ml-2"}}
{{end}} {{end}}
</span> </span>
<div class="menu"> <div class="menu">
@ -86,10 +86,10 @@
<input id="project_id" name="project_id" type="hidden" value="{{.project_id}}"> <input id="project_id" name="project_id" type="hidden" value="{{.project_id}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown"> <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown">
<span class="text"> <span class="text flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong>
{{if .HasIssuesOrPullsWritePermission}} {{if .HasIssuesOrPullsWritePermission}}
{{svg "octicon-gear"}} {{svg "octicon-gear" 16 "gt-ml-2"}}
{{end}} {{end}}
</span> </span>
<div class="menu"> <div class="menu">
@ -144,10 +144,10 @@
<div class="ui divider"></div> <div class="ui divider"></div>
<input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}"> <input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown"> <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown">
<span class="text"> <span class="text flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong>
{{if .HasIssuesOrPullsWritePermission}} {{if .HasIssuesOrPullsWritePermission}}
{{svg "octicon-gear"}} {{svg "octicon-gear" 16 "gt-ml-2"}}
{{end}} {{end}}
</span> </span>
<div class="filter menu" data-id="#assignee_ids"> <div class="filter menu" data-id="#assignee_ids">

View File

@ -127,7 +127,7 @@
<div class="ui divider"></div> <div class="ui divider"></div>
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown"> <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
<a class="text gt-df gt-ac muted"> <a class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}} {{svg "octicon-gear" 16 "gt-ml-2"}}
@ -153,7 +153,7 @@
<div class="ui divider"></div> <div class="ui divider"></div>
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown"> <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
<a class="text gt-df gt-ac muted"> <a class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}} {{svg "octicon-gear" 16 "gt-ml-2"}}
@ -207,7 +207,7 @@
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}"> <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown"> <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
<a class="text gt-df gt-ac muted"> <a class="text muted flex-text-block">
<strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{svg "octicon-gear" 16 "gt-ml-2"}} {{svg "octicon-gear" 16 "gt-ml-2"}}

View File

@ -111,7 +111,7 @@
{{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}} {{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}}
{{end}} {{end}}
· ·
{{$.locale.Tr "repo.issues.num_comments" .Issue.NumComments}} {{$.locale.TrN .Issue.NumComments "repo.issues.num_comments_1" "repo.issues.num_comments" .Issue.NumComments}}
</span> </span>
{{end}} {{end}}
</div> </div>

View File

@ -9,7 +9,7 @@
{{$.locale.Tr "repo.pulls.tab_commits"}} {{$.locale.Tr "repo.pulls.tab_commits"}}
<span class="ui small label">{{if .NumCommits}}{{.NumCommits}}{{else}}-{{end}}</span> <span class="ui small label">{{if .NumCommits}}{{.NumCommits}}{{else}}-{{end}}</span>
</a> </a>
<a class="item {{if .PageIsPullFiles}}active{{end}}" {{if .NumFiles}}href="{{.Issue.Link}}/files"{{end}}> <a class="item {{if .PageIsPullFiles}}active{{end}}" href="{{.Issue.Link}}/files">
{{svg "octicon-diff"}} {{svg "octicon-diff"}}
{{$.locale.Tr "repo.pulls.tab_files"}} {{$.locale.Tr "repo.pulls.tab_files"}}
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span> <span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>

View File

@ -19,7 +19,7 @@ Template Attributes:
</div> </div>
{{end}} {{end}}
<div class="ui tab active" data-tab-panel="markdown-writer"> <div class="ui tab active" data-tab-panel="markdown-writer">
<markdown-toolbar class="gt-gap-3"> <markdown-toolbar>
<div class="markdown-toolbar-group"> <div class="markdown-toolbar-group">
<md-header class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header> <md-header class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
<md-bold class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.bold.tooltip"}}">{{svg "octicon-bold"}}</md-bold> <md-bold class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.bold.tooltip"}}">{{svg "octicon-bold"}}</md-bold>

View File

@ -47,3 +47,7 @@
.admin .ui.table.segment { .admin .ui.table.segment {
overflow-x: auto; /* if the screen width is small, many wide tables (eg: user list) need scroll bars */ overflow-x: auto; /* if the screen width is small, many wide tables (eg: user list) need scroll bars */
} }
.admin .table th {
white-space: nowrap;
}

View File

@ -7,6 +7,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
padding-bottom: 10px; padding-bottom: 10px;
gap: .5rem;
flex-wrap: wrap;
} }
.combo-markdown-editor .markdown-toolbar-group { .combo-markdown-editor .markdown-toolbar-group {

View File

@ -657,9 +657,26 @@
.repository.view.issue .issue-title { .repository.view.issue .issue-title {
flex-direction: column; flex-direction: column;
} }
.repository.view.issue .issue-title-buttons,
.repository.view.issue .edit-buttons {
width: 100%;
justify-content: space-between;
}
.repository.view.issue .edit-buttons { .repository.view.issue .edit-buttons {
margin-top: .5rem; margin-top: .5rem;
} }
.comment.form .issue-content-left .avatar {
display: none;
}
.comment.form .issue-content-left .content {
margin-left: 0 !important;
}
.comment.form .issue-content-left .content::before,
.comment.form .issue-content-left .content::after,
.comment.form .content .form::before,
.comment.form .content .form::after {
display: none;
}
} }
.repository.view.issue .issue-title { .repository.view.issue .issue-title {
@ -1199,7 +1216,14 @@
text-align: left; text-align: left;
} }
.repository.compare.pull .choose.branch .svg { .repository .choose.branch {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.repository .choose.branch .svg {
margin-right: 10px; margin-right: 10px;
} }
@ -1291,10 +1315,9 @@
padding: 5px 10px; padding: 5px 10px;
} }
.repository #commits-table thead th:first-of-type { .repository #commits-table td:not(.message) {
padding-left: 15px; white-space: nowrap;
} }
.repository #commits-table thead .sha { .repository #commits-table thead .sha {
width: 200px; width: 200px;
} }
@ -2043,12 +2066,15 @@
.repository .ui.segment.sub-menu .list { .repository .ui.segment.sub-menu .list {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: stretch;
} }
.repository .ui.segment.sub-menu .list .item { .repository .ui.segment.sub-menu .list .item {
width: 100%; width: 100%;
color: var(--color-text); color: var(--color-text);
display: flex;
align-items: center;
justify-content: center;
} }
.repository .ui.segment.sub-menu .list .item:first-of-type { .repository .ui.segment.sub-menu .list .item:first-of-type {
@ -2664,6 +2690,7 @@ tbody.commit-list {
/* in the commit list, messages can wrap so we can use inline */ /* in the commit list, messages can wrap so we can use inline */
.commit-list .message-wrapper { .commit-list .message-wrapper {
display: inline; display: inline;
overflow-wrap: anywhere;
} }
/* but in the repo-files-table we cannot */ /* but in the repo-files-table we cannot */
@ -3112,6 +3139,14 @@ tbody.commit-list {
box-shadow: 0 0.5rem 1rem var(--color-shadow) !important; box-shadow: 0 0.5rem 1rem var(--color-shadow) !important;
} }
.commits-table .commits-table-right form {
display: flex;
align-items: center;
gap: 0.75em;
justify-content: center;
flex-wrap: wrap;
}
@media (max-width: 767.98px) { @media (max-width: 767.98px) {
.repository.file.list #repo-files-table .entry, .repository.file.list #repo-files-table .entry,
.repository.file.list #repo-files-table .commit-list { .repository.file.list #repo-files-table .commit-list {
@ -3181,21 +3216,14 @@ tbody.commit-list {
align-items: initial !important; align-items: initial !important;
margin-bottom: 6px; margin-bottom: 6px;
} }
.commits-table .commits-table-right form {
display: flex;
flex-wrap: wrap;
}
.commits-table .commits-table-right form > div:nth-child(1) { .commits-table .commits-table-right form > div:nth-child(1) {
order: 1; order: 1; /* the "commit search" input */
} }
.commits-table .commits-table-right form > div:nth-child(2) { .commits-table .commits-table-right form > div:nth-child(2) {
order: 3; order: 3; /* the "search all" checkbox */
margin-left: 0.5rem;
margin-top: 0.5rem;
} }
.commits-table .commits-table-right form > button:nth-child(3) { .commits-table .commits-table-right form > button:nth-child(3) {
order: 2; order: 2; /* the "search" button */
margin-left: 0.25rem;
} }
.commit-table { .commit-table {
overflow-x: auto; overflow-x: auto;
@ -3204,17 +3232,6 @@ tbody.commit-list {
.commit-table th.sha { .commit-table th.sha {
display: none !important; display: none !important;
} }
.commit-table .commit-list span.message-wrapper {
max-width: none;
}
.commit-table .commit-list tr td:last-child {
display: block;
width: max-content;
}
.commit-table .commit-list td.author {
display: block;
width: calc(100% + 0.5rem);
}
.commit-table .commit-list .copy-commit-sha { .commit-table .commit-list .copy-commit-sha {
display: none !important; display: none !important;
} }

View File

@ -516,6 +516,8 @@ export function ansiLogToHTML(line) {
<style scoped> <style scoped>
.action-view-body { .action-view-body {
padding-top: 12px;
padding-bottom: 12px;
display: flex; display: flex;
gap: 12px; gap: 12px;
} }
@ -549,11 +551,6 @@ export function ansiLogToHTML(line) {
margin: 0 0 0 28px; margin: 0 0 0 28px;
} }
.action-view-left, .action-view-right {
padding-top: 12px;
padding-bottom: 12px;
}
/* ================ */ /* ================ */
/* action view left */ /* action view left */
@ -767,6 +764,7 @@ export function ansiLogToHTML(line) {
background-color: var(--color-console-bg); background-color: var(--color-console-bg);
max-height: 100%; max-height: 100%;
border-radius: 0 0 var(--border-radius) var(--border-radius); border-radius: 0 0 var(--border-radius) var(--border-radius);
z-index: 0;
} }
.job-step-container .job-step-summary { .job-step-container .job-step-summary {