Compare commits

...

10 Commits

Author SHA1 Message Date
853
4f4ddcf3c5
Add link to members and repositories at teams page (#27744)
![image](https://github.com/go-gitea/gitea/assets/8389962/123e4ca7-dd10-44e7-9702-4b8e9e0882a7)
The members and repositories text now can be click.

like Org home page:

cab7b7f59c/templates/org/home.tmpl (L81-L82)
2023-10-26 02:50:43 +00:00
silverwind
05aa91e6da
Add dedicated class for empty placeholders (#27788)
Fixes: https://github.com/go-gitea/gitea/issues/27784

<img width="1033" alt="Screenshot 2023-10-25 at 19 07 15"
src="https://github.com/go-gitea/gitea/assets/115237/1a363851-1a86-48cb-99ec-0a573371bb6e">
<img width="1051" alt="Screenshot 2023-10-25 at 19 07 41"
src="https://github.com/go-gitea/gitea/assets/115237/add4b606-2264-430a-af35-249ef005817f">

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2023-10-25 23:42:14 +02:00
KN4CK3R
ab3f6c1bac
Close all hashed buffers (#27787)
Add missing `.Close()` calls. The current code does not delete the
temporary files if the data grows over 32mb.
2023-10-25 21:24:24 +02:00
Joel Wetzell
46dd02702d
Fix typo when updating email address (#27789)
- correct text that is shown when attempting to change an email address
2023-10-25 19:21:23 +02:00
Brecht Van Lommel
7a286e4753
Improve pull request command line instructions (#27778)
* Show checkout instructions also when there is no permission to push,
for anyone who wants to locally test the changes.
* First checkout the branch exactly as is, without immediately having to
solve merge conflicts. Leave this to the merge step, since it's often
convenient to test a change without worrying about this.
* Use `git fetch -u`, so an existing local branch is updated when
re-testing the same pull request. But not the more risky `git fetch -f`
in to handle force pushes, as we don't want to accidentally overwrite
important local changes.
* Show different merge command depending on the chosen merge style,
interactively updated.
2023-10-25 15:01:31 +00:00
Nanguan Lin
1eae2aadae
Fix issue not showing on default board and add test (#27720)
See https://github.com/go-gitea/gitea/pull/27718#issuecomment-1773743014
. Add a test to ensure its behavior.
Why this test uses `ProjectBoardID=0`? Because in `SearchOptions`,
`ProjectBoardID=0` means what it is. But in `IssueOptions`,
`ProjectBoardID=0` means there is no condition, and
`ProjectBoardID=db.NoConditionID` means the board ID = 0.
It's really confusing. Probably it's better to separate the db search
engine and the other issue search code. It's really two different
systems. As far as I can see, `IssueOptions` is not necessary for most
of the code, which has very simple issue search conditions.
2023-10-25 11:51:49 +00:00
Gerd Katzenbeisser
31f8880bc2
Show placeholder email in privacy popup (#27770)
This PR will show the _noreply_ address in the privacy popup
_keep_email_private_popup_.

I had to look into the source code to figure out which E-Mail Adress I
had to use on gitea.com to hide it from public access.

According to the contribution guidelines I only updated the en-US
translation file.

Co-authored-by: Hakito <hakito@git.example.com>
2023-10-25 11:12:36 +00:00
yp05327
f39256f035
Add word-break to organization name and description (#26624)
Fix #24318

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/38282e5e-0b4d-4568-a853-59352798e826)

![image](https://github.com/go-gitea/gitea/assets/18380374/79d89ee6-61f6-45a7-af0b-d1c23fead25a)

![image](https://github.com/go-gitea/gitea/assets/18380374/39b45fae-52e2-4697-b83a-7cd10f76ac43)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/09e8cfcf-0150-494e-9f63-0868f529da65)

![image](https://github.com/go-gitea/gitea/assets/18380374/d2c348d3-fe03-466a-a5f4-878b7a93a318)

![image](https://github.com/go-gitea/gitea/assets/18380374/7f75b807-300c-42d5-b2c3-bae9e45e3c08)

![image](https://github.com/go-gitea/gitea/assets/18380374/06eca901-f5cf-4100-bb65-92457ad106e3)
2023-10-25 10:40:39 +00:00
Nanguan Lin
3602a1987d
Add border to file tree 'sub-items' and add padding to 'item-file' (#27593)
## Add border to file tree 'sub-items'
close #24766 
view in `gitea-light` 
<img width="275" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/f1bf8736-2db3-454f-86f5-d050a2fae3eb">
view in `gitea-dark`
<img width="296" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/053e2e6e-28f7-41d2-a139-1dae4df45929">
## Change the 'item-file' padding 
Before that the 'item-file' only have padding when they in
'item-directory', which is too compact when 'item-file' after
'item-directory'
<details>

![)RW`SDJ_UQL@$}0
PL(3DS7](https://github.com/go-gitea/gitea/assets/70063547/5fa523a4-44c3-4cb9-a882-a3ea6d944673)

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-10-25 18:00:53 +08:00
853
e544a277fe
Fix the missing repo count in new team page and edit team page (#27743)
Follow #26942
Before:

![image](https://github.com/go-gitea/gitea/assets/8389962/ffe3e914-c71c-493f-965b-369f27c70b4b)


![image](https://github.com/go-gitea/gitea/assets/8389962/eaad4f07-b8ce-4564-b883-97938de5ed79)

After:


![image](https://github.com/go-gitea/gitea/assets/8389962/353aeabe-caf4-4449-8330-d3a29f9bd326)


![image](https://github.com/go-gitea/gitea/assets/8389962/baf59bb6-2c74-4a56-a28c-1519bc3d2594)
2023-10-25 13:55:56 +08:00
22 changed files with 102 additions and 35 deletions

View File

@ -186,7 +186,7 @@ func applyProjectBoardCondition(sess *xorm.Session, opts *IssuesOptions) *xorm.S
if opts.ProjectBoardID > 0 { if opts.ProjectBoardID > 0 {
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": opts.ProjectBoardID})) sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": opts.ProjectBoardID}))
} else if opts.ProjectBoardID == db.NoConditionID { } else if opts.ProjectBoardID == db.NoConditionID {
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Neq{"project_board_id": 0})) sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": 0}))
} }
return sess return sess
} }

View File

@ -382,6 +382,12 @@ func searchIssueInProject(t *testing.T) {
}, },
[]int64{1}, []int64{1},
}, },
{
SearchOptions{
ProjectBoardID: int64Pointer(0), // issue with in default board
},
[]int64{2},
},
} }
for _, test := range tests { for _, test := range tests {
issueIDs, _, err := SearchIssues(context.TODO(), &test.opts) issueIDs, _, err := SearchIssues(context.TODO(), &test.opts)

View File

@ -32,7 +32,7 @@ func NewHashedBuffer() (*HashedBuffer, error) {
return NewHashedBufferWithSize(DefaultMemorySize) return NewHashedBufferWithSize(DefaultMemorySize)
} }
// NewHashedBuffer creates a hashed buffer with a specific memory size // NewHashedBufferWithSize creates a hashed buffer with a specific memory size
func NewHashedBufferWithSize(maxMemorySize int) (*HashedBuffer, error) { func NewHashedBufferWithSize(maxMemorySize int) (*HashedBuffer, error) {
b, err := filebuffer.New(maxMemorySize) b, err := filebuffer.New(maxMemorySize)
if err != nil { if err != nil {

View File

@ -110,9 +110,6 @@ write = Write
preview = Preview preview = Preview
loading = Loading… loading = Loading…
step1 = Step 1:
step2 = Step 2:
error = Error error = Error
error404 = The page you are trying to reach either <strong>does not exist</strong> or <strong>you are not authorized</strong> to view it. error404 = The page you are trying to reach either <strong>does not exist</strong> or <strong>you are not authorized</strong> to view it.
go_back = Go Back go_back = Go Back
@ -729,7 +726,7 @@ add_email_success = The new email address has been added.
email_preference_set_success = Email preference has been set successfully. email_preference_set_success = Email preference has been set successfully.
add_openid_success = The new OpenID address has been added. add_openid_success = The new OpenID address has been added.
keep_email_private = Hide Email Address keep_email_private = Hide Email Address
keep_email_private_popup = This will hide your email address from your profile, as well as when you make a pull request or edit a file using the web interface. Pushed commits will not be modified. keep_email_private_popup = This will hide your email address from your profile, as well as when you make a pull request or edit a file using the web interface. Pushed commits will not be modified. Use %s in commits to associate them with your account.
openid_desc = OpenID lets you delegate authentication to an external provider. openid_desc = OpenID lets you delegate authentication to an external provider.
manage_ssh_keys = Manage SSH Keys manage_ssh_keys = Manage SSH Keys
@ -1797,9 +1794,11 @@ pulls.outdated_with_base_branch = This branch is out-of-date with the base branc
pulls.close = Close Pull Request pulls.close = Close Pull Request
pulls.closed_at = `closed this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>` pulls.closed_at = `closed this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
pulls.reopened_at = `reopened this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>` pulls.reopened_at = `reopened this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
pulls.merge_instruction_hint = `You can also view <a class="show-instruction">command line instructions</a>.` pulls.cmd_instruction_hint = `View <a class="show-instruction">command line instructions</a>.`
pulls.merge_instruction_step1_desc = From your project repository, check out a new branch and test the changes. pulls.cmd_instruction_checkout_title = Checkout
pulls.merge_instruction_step2_desc = Merge the changes and update on Gitea. pulls.cmd_instruction_checkout_desc = From your project repository, check out a new branch and test the changes.
pulls.cmd_instruction_merge_title = Merge
pulls.cmd_instruction_merge_desc = Merge the changes and update on Gitea.
pulls.clear_merge_message = Clear merge message pulls.clear_merge_message = Clear merge message
pulls.clear_merge_message_hint = Clearing the merge message will only remove the commit message content and keep generated git trailers such as "Co-Authored-By …". pulls.clear_merge_message_hint = Clearing the merge message will only remove the commit message content and keep generated git trailers such as "Co-Authored-By …".
@ -2857,7 +2856,7 @@ emails.updated = Email updated
emails.not_updated = Failed to update the requested email address: %v emails.not_updated = Failed to update the requested email address: %v
emails.duplicate_active = This email address is already active for a different user. emails.duplicate_active = This email address is already active for a different user.
emails.change_email_header = Update Email Properties emails.change_email_header = Update Email Properties
emails.change_email_text = Are your sure you want to update this email address? emails.change_email_text = Are you sure you want to update this email address?
orgs.org_manage_panel = Organization Management orgs.org_manage_panel = Organization Management
orgs.name = Name orgs.name = Name

View File

@ -276,6 +276,10 @@ func NewTeam(ctx *context.Context) {
ctx.Data["PageIsOrgTeamsNew"] = true ctx.Data["PageIsOrgTeamsNew"] = true
ctx.Data["Team"] = &org_model.Team{} ctx.Data["Team"] = &org_model.Team{}
ctx.Data["Units"] = unit_model.Units ctx.Data["Units"] = unit_model.Units
if err := shared_user.LoadHeaderCount(ctx); err != nil {
ctx.ServerError("LoadHeaderCount", err)
return
}
ctx.HTML(http.StatusOK, tplTeamNew) ctx.HTML(http.StatusOK, tplTeamNew)
} }
@ -463,6 +467,10 @@ func EditTeam(ctx *context.Context) {
ctx.ServerError("LoadUnits", err) ctx.ServerError("LoadUnits", err)
return return
} }
if err := shared_user.LoadHeaderCount(ctx); err != nil {
ctx.ServerError("LoadHeaderCount", err)
return
}
ctx.Data["Team"] = ctx.Org.Team ctx.Data["Team"] = ctx.Org.Team
ctx.Data["Units"] = unit_model.Units ctx.Data["Units"] = unit_model.Units
ctx.HTML(http.StatusOK, tplTeamNew) ctx.HTML(http.StatusOK, tplTeamNew)

View File

@ -238,6 +238,8 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
} }
unsignedIndexContent, _ := packages_module.NewHashedBuffer() unsignedIndexContent, _ := packages_module.NewHashedBuffer()
defer unsignedIndexContent.Close()
h := sha1.New() h := sha1.New()
if err := writeGzipStream(io.MultiWriter(unsignedIndexContent, h), "APKINDEX", buf.Bytes(), true); err != nil { if err := writeGzipStream(io.MultiWriter(unsignedIndexContent, h), "APKINDEX", buf.Bytes(), true); err != nil {
@ -275,6 +277,7 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
} }
signedIndexContent, _ := packages_module.NewHashedBuffer() signedIndexContent, _ := packages_module.NewHashedBuffer()
defer signedIndexContent.Close()
if err := writeGzipStream( if err := writeGzipStream(
signedIndexContent, signedIndexContent,

View File

@ -196,11 +196,16 @@ func buildPackagesIndices(ctx context.Context, ownerID int64, repoVersion *packa
} }
packagesContent, _ := packages_module.NewHashedBuffer() packagesContent, _ := packages_module.NewHashedBuffer()
defer packagesContent.Close()
packagesGzipContent, _ := packages_module.NewHashedBuffer() packagesGzipContent, _ := packages_module.NewHashedBuffer()
defer packagesGzipContent.Close()
gzw := gzip.NewWriter(packagesGzipContent) gzw := gzip.NewWriter(packagesGzipContent)
packagesXzContent, _ := packages_module.NewHashedBuffer() packagesXzContent, _ := packages_module.NewHashedBuffer()
defer packagesXzContent.Close()
xzw, _ := xz.NewWriter(packagesXzContent) xzw, _ := xz.NewWriter(packagesXzContent)
w := io.MultiWriter(packagesContent, gzw, xzw) w := io.MultiWriter(packagesContent, gzw, xzw)
@ -323,6 +328,8 @@ func buildReleaseFiles(ctx context.Context, ownerID int64, repoVersion *packages
} }
inReleaseContent, _ := packages_module.NewHashedBuffer() inReleaseContent, _ := packages_module.NewHashedBuffer()
defer inReleaseContent.Close()
sw, err := clearsign.Encode(inReleaseContent, e.PrivateKey, nil) sw, err := clearsign.Encode(inReleaseContent, e.PrivateKey, nil)
if err != nil { if err != nil {
return err return err
@ -367,11 +374,14 @@ func buildReleaseFiles(ctx context.Context, ownerID int64, repoVersion *packages
sw.Close() sw.Close()
releaseGpgContent, _ := packages_module.NewHashedBuffer() releaseGpgContent, _ := packages_module.NewHashedBuffer()
defer releaseGpgContent.Close()
if err := openpgp.ArmoredDetachSign(releaseGpgContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil { if err := openpgp.ArmoredDetachSign(releaseGpgContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil {
return err return err
} }
releaseContent, _ := packages_module.CreateHashedBufferFromReader(&buf) releaseContent, _ := packages_module.CreateHashedBufferFromReader(&buf)
defer releaseContent.Close()
for _, file := range []struct { for _, file := range []struct {
Name string Name string

View File

@ -258,11 +258,14 @@ func buildRepomd(ctx context.Context, pv *packages_model.PackageVersion, ownerID
} }
repomdAscContent, _ := packages_module.NewHashedBuffer() repomdAscContent, _ := packages_module.NewHashedBuffer()
defer repomdAscContent.Close()
if err := openpgp.ArmoredDetachSign(repomdAscContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil { if err := openpgp.ArmoredDetachSign(repomdAscContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil {
return err return err
} }
repomdContent, _ := packages_module.CreateHashedBufferFromReader(&buf) repomdContent, _ := packages_module.CreateHashedBufferFromReader(&buf)
defer repomdContent.Close()
for _, file := range []struct { for _, file := range []struct {
Name string Name string
@ -548,6 +551,8 @@ func (wc *writtenCounter) Written() int64 {
func addDataAsFileToRepo(ctx context.Context, pv *packages_model.PackageVersion, filetype string, obj any) (*repoData, error) { func addDataAsFileToRepo(ctx context.Context, pv *packages_model.PackageVersion, filetype string, obj any) (*repoData, error) {
content, _ := packages_module.NewHashedBuffer() content, _ := packages_module.NewHashedBuffer()
defer content.Close()
gzw := gzip.NewWriter(content) gzw := gzip.NewWriter(content)
wc := &writtenCounter{} wc := &writtenCounter{}
h := sha256.New() h := sha256.New()

View File

@ -2,7 +2,7 @@
<div class="ui container"> <div class="ui container">
<div class="ui vertically grid head"> <div class="ui vertically grid head">
<div class="column"> <div class="column">
<div class="ui header"> <div class="ui header gt-df gt-ac gt-word-break">
{{ctx.AvatarUtils.Avatar . 100}} {{ctx.AvatarUtils.Avatar . 100}}
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> <span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
<span class="org-visibility"> <span class="org-visibility">

View File

@ -3,7 +3,7 @@
<div class="ui container gt-df"> <div class="ui container gt-df">
{{ctx.AvatarUtils.Avatar .Org 140 "org-avatar"}} {{ctx.AvatarUtils.Avatar .Org 140 "org-avatar"}}
<div id="org-info"> <div id="org-info">
<div class="ui header gt-df gt-fw"> <div class="ui header">
{{.Org.DisplayName}} {{.Org.DisplayName}}
<span class="org-visibility"> <span class="org-visibility">
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}} {{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}

View File

@ -37,7 +37,7 @@
{{end}} {{end}}
</div> </div>
<div class="ui bottom attached header"> <div class="ui bottom attached header">
<p class="team-meta">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}} · {{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</p> <p class="team-meta"><a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}}</a> · <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories">{{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</a></p>
</div> </div>
</div> </div>
{{end}} {{end}}

View File

@ -38,7 +38,7 @@
</div> </div>
{{else}} {{else}}
{{if not .HasPackages}} {{if not .HasPackages}}
<div class="empty center"> <div class="empty-placeholder">
{{svg "octicon-package" 48}} {{svg "octicon-package" 48}}
<h2>{{ctx.Locale.Tr "packages.empty"}}</h2> <h2>{{ctx.Locale.Tr "packages.empty"}}</h2>
{{if and .Repository .CanWritePackages}} {{if and .Repository .CanWritePackages}}

View File

@ -1,6 +1,6 @@
<div class="flex-list"> <div class="flex-list">
{{if eq (len .Runs) 0}} {{if eq (len .Runs) 0}}
<div class="empty center"> <div class="empty-placeholder">
{{svg "octicon-no-entry" 48}} {{svg "octicon-no-entry" 48}}
<h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2> <h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
</div> </div>

View File

@ -372,8 +372,8 @@
</div> </div>
{{end}} {{end}}
{{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}} {{if and .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}}
{{template "repo/issue/view_content/pull_merge_instruction" .Issue.PullRequest}} {{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions}}
{{end}} {{end}}
</div> </div>
</div> </div>

View File

@ -1,19 +1,45 @@
<div class="divider"></div> <div class="divider"></div>
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div> <div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint" | Safe}} </div>
<div class="instruct-content gt-mt-3 gt-hidden"> <div class="instruct-content gt-mt-3 gt-hidden">
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step1"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div> <div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div>
{{$localBranch := .PullRequest.HeadBranch}}
{{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}
{{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}}
{{end}}
<div class="ui secondary segment"> <div class="ui secondary segment">
{{if eq .Flow 0}} {{if eq .PullRequest.Flow 0}}
<div>git checkout -b {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}} {{.BaseBranch}}</div> <div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}<gitea-origin-url data-url="{{.PullRequest.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div>
<div>git pull {{if ne .HeadRepo.ID .BaseRepo.ID}}<gitea-origin-url data-url="{{.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.HeadBranch}}</div> <div>git checkout {{$localBranch}}</div>
{{else}} {{else}}
<div>git fetch origin {{.GetGitRefName}}:{{.HeadBranch}}</div> <div>git fetch -u origin {{.GetGitRefName}}:{{$localBranch}}</div>
{{end}} {{end}}
</div> </div>
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step2"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</div> {{if .ShowMergeInstructions}}
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}}</div>
<div class="ui secondary segment"> <div class="ui secondary segment">
<div>git checkout {{.BaseBranch}}</div> <div data-pull-merge-style="merge">
<div>git merge --no-ff {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}}</div> <div>git checkout {{.PullRequest.BaseBranch}}</div>
<div>git push origin {{.BaseBranch}}</div> <div>git merge --no-ff {{$localBranch}}</div>
</div> </div>
<div class="gt-hidden" data-pull-merge-style="rebase">
<div>git checkout {{.PullRequest.BaseBranch}}</div>
<div>git merge --ff-only {{$localBranch}}</div>
</div>
<div class="gt-hidden" data-pull-merge-style="rebase-merge">
<div>git checkout {{$localBranch}}</div>
<div>git rebase {{.PullRequest.BaseBranch}}</div>
<div>git checkout {{.PullRequest.BaseBranch}}</div>
<div>git merge --no-ff {{$localBranch}}</div>
</div>
<div class="gt-hidden" data-pull-merge-style="squash">
<div>git checkout {{.PullRequest.BaseBranch}}</div>
<div>git merge --squash {{$localBranch}}</div>
</div>
<div class="gt-hidden" data-pull-merge-style="manually-merged">
<div>git checkout {{.PullRequest.BaseBranch}}</div>
<div>git merge {{$localBranch}}</div>
</div>
<div>git push origin {{.PullRequest.BaseBranch}}</div>
</div>
{{end}}
</div> </div>

View File

@ -2,7 +2,7 @@
<div class="ui container"> <div class="ui container">
<div class="ui vertically grid head"> <div class="ui vertically grid head">
<div class="column"> <div class="column">
<div class="ui header"> <div class="ui header gt-df gt-ac gt-word-break">
{{ctx.AvatarUtils.Avatar . 100}} {{ctx.AvatarUtils.Avatar . 100}}
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> <span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
<span class="org-visibility"> <span class="org-visibility">

View File

@ -73,7 +73,7 @@
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup"}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label> <label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup" .SignedUser.GetPlaceholderEmail}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}> <input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
</div> </div>
</div> </div>

View File

@ -1411,6 +1411,7 @@ img.ui.avatar,
.ui.label { .ui.label {
padding: 0.3em 0.5em; padding: 0.3em 0.5em;
transition: none; transition: none;
white-space: nowrap;
} }
.ui.label, .ui.label,

View File

@ -102,6 +102,7 @@
.organization.profile #org-info { .organization.profile #org-info {
overflow-wrap: anywhere; overflow-wrap: anywhere;
flex: 1; flex: 1;
word-break: break-all;
} }
.organization.profile #org-info .ui.header { .organization.profile #org-info .ui.header {

View File

@ -1798,10 +1798,12 @@
flex: 1 flex: 1
} }
.repository.packages .empty, .empty-placeholder {
.repository.actions .empty { display: flex;
padding-top: 70px; flex-direction: column;
padding-bottom: 100px; align-items: center;
padding-top: 40px;
padding-bottom: 40px;
} }
.repository.packages .file-size { .repository.packages .file-size {
@ -2606,6 +2608,7 @@ tbody.commit-list {
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
word-break: break-word; word-break: break-word;
gap: 0.5rem;
} }
@media (max-width: 767.98px) { @media (max-width: 767.98px) {

View File

@ -61,11 +61,12 @@ a, a:hover {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1px; gap: 1px;
padding-left: 8px; margin-left: 13px;
border-left: 1px solid var(--color-secondary);
} }
.sub-items .item-file { .sub-items .item-file {
padding-left: 24px; padding-left: 18px;
} }
.item-file.selected { .item-file.selected {

View File

@ -1,5 +1,6 @@
<script> <script>
import {SvgIcon} from '../svg.js'; import {SvgIcon} from '../svg.js';
import {toggleElem} from '../utils/dom.js';
const {csrfToken, pageData} = window.config; const {csrfToken, pageData} = window.config;
@ -39,6 +40,9 @@ export default {
watch: { watch: {
mergeStyle(val) { mergeStyle(val) {
this.mergeStyleDetail = this.mergeForm.mergeStyles.find((e) => e.name === val); this.mergeStyleDetail = this.mergeForm.mergeStyles.find((e) => e.name === val);
for (const elem of document.querySelectorAll('[data-pull-merge-style]')) {
toggleElem(elem, elem.getAttribute('data-pull-merge-style') === val);
}
} }
}, },
created() { created() {