From bf325d44120c4a6fc7f67ff1dc25db770247c9a7 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Thu, 15 Sep 2022 15:25:16 +0200 Subject: [PATCH 1/3] Keep path when creating a new branch (#21153) If you are create a new new branch while viewing file or directory, you get redirected to the root of the repo. With this PR, you keep your current path instead of getting redirected to the repo root. --- routers/web/repo/branch.go | 2 +- services/forms/repo_branch_form.go | 1 + templates/repo/branch_dropdown.tmpl | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/web/repo/branch.go b/routers/web/repo/branch.go index d14ba6cbe9a4..d1f1255db465 100644 --- a/routers/web/repo/branch.go +++ b/routers/web/repo/branch.go @@ -427,5 +427,5 @@ func CreateBranch(ctx *context.Context) { } ctx.Flash.Success(ctx.Tr("repo.branch.create_success", form.NewBranchName)) - ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(form.NewBranchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(form.NewBranchName) + "/" + util.PathEscapeSegments(form.CurrentPath)) } diff --git a/services/forms/repo_branch_form.go b/services/forms/repo_branch_form.go index f9262aaede77..011926092fd7 100644 --- a/services/forms/repo_branch_form.go +++ b/services/forms/repo_branch_form.go @@ -16,6 +16,7 @@ import ( // NewBranchForm form for creating a new branch type NewBranchForm struct { NewBranchName string `binding:"Required;MaxSize(100);GitRefName"` + CurrentPath string CreateTag bool } diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index 9d1ec10d3cec..2010fe261e15 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -94,6 +94,9 @@ {{.root.CsrfTokenHtml}} + {{if $.root.TreePath}} + + {{end}} From d3050e0d01b63fb99bb7656e1b86dc542c7e4873 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 15 Sep 2022 22:57:42 +0200 Subject: [PATCH 2/3] File header tweaks (#21175) - Remove non-matching selector - Set font-size on parent so `.mono` can correctly reduce it Before (font subjectively too big): Screenshot 2022-09-15 at 19 03 56 After: image --- web_src/less/_repository.less | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index f5be0b34e627..57d54a08f632 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -409,10 +409,6 @@ font-size: .5em; } - .file-info { - font-size: 13px; - } - .file-actions { .btn-octicon { line-height: 1; @@ -3051,7 +3047,8 @@ td.blob-excerpt { display: flex; justify-content: space-between; overflow-x: auto; - padding: 8px 12px !important; + padding: 6px 12px !important; + font-size: 13px !important; } .file-info { From bdc4c4c379df517ff24177f948b22906787faf6a Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 16 Sep 2022 00:20:55 +0000 Subject: [PATCH 3/3] [skip ci] Updated translations via Crowdin --- options/locale/locale_pt-PT.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini index d0b72fb3ac11..34595baa995c 100644 --- a/options/locale/locale_pt-PT.ini +++ b/options/locale/locale_pt-PT.ini @@ -3092,6 +3092,7 @@ container.details.platform=Plataforma container.details.repository_site=Página web do repositório container.details.documentation_site=Página web da documentação container.pull=Puxar a imagem usando a linha de comandos: +container.digest=Resumo: container.documentation=Para obter mais informações sobre o registo do Container, consulte a documentação. container.multi_arch=S.O. / Arquit. container.layers=Camadas de imagem