Skip to content

Commit f729e8e

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: [skip ci] Updated translations via Crowdin File header tweaks (go-gitea#21175) Keep path when creating a new branch (go-gitea#21153)
2 parents 46e0597 + bdc4c4c commit f729e8e

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

options/locale/locale_pt-PT.ini

+1
Original file line numberDiff line numberDiff line change
@@ -3092,6 +3092,7 @@ container.details.platform=Plataforma
30923092
container.details.repository_site=Página web do repositório
30933093
container.details.documentation_site=Página web da documentação
30943094
container.pull=Puxar a imagem usando a linha de comandos:
3095+
container.digest=Resumo:
30953096
container.documentation=Para obter mais informações sobre o registo do Container, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/container/">a documentação</a>.
30963097
container.multi_arch=S.O. / Arquit.
30973098
container.layers=Camadas de imagem

routers/web/repo/branch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,5 +427,5 @@ func CreateBranch(ctx *context.Context) {
427427
}
428428

429429
ctx.Flash.Success(ctx.Tr("repo.branch.create_success", form.NewBranchName))
430-
ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(form.NewBranchName))
430+
ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(form.NewBranchName) + "/" + util.PathEscapeSegments(form.CurrentPath))
431431
}

services/forms/repo_branch_form.go

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
// NewBranchForm form for creating a new branch
1717
type NewBranchForm struct {
1818
NewBranchName string `binding:"Required;MaxSize(100);GitRefName"`
19+
CurrentPath string
1920
CreateTag bool
2021
}
2122

templates/repo/branch_dropdown.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
{{.root.CsrfTokenHtml}}
9595
<input type="hidden" name="new_branch_name" v-model="searchTerm">
9696
<input type="hidden" name="create_tag" v-model="createTag">
97+
{{if $.root.TreePath}}
98+
<input type="hidden" name="current_path" value="{{.root.TreePath}}">
99+
{{end}}
97100
</form>
98101
</div>
99102
</div>

web_src/less/_repository.less

+2-5
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,6 @@
409409
font-size: .5em;
410410
}
411411

412-
.file-info {
413-
font-size: 13px;
414-
}
415-
416412
.file-actions {
417413
.btn-octicon {
418414
line-height: 1;
@@ -3051,7 +3047,8 @@ td.blob-excerpt {
30513047
display: flex;
30523048
justify-content: space-between;
30533049
overflow-x: auto;
3054-
padding: 8px 12px !important;
3050+
padding: 6px 12px !important;
3051+
font-size: 13px !important;
30553052
}
30563053

30573054
.file-info {

0 commit comments

Comments
 (0)