Some checks failed
Build and Release / Create Release (push) Successful in 1s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 2m53s
Build and Release / Unit Tests (push) Successful in 8m43s
Build and Release / Lint (push) Successful in 9m20s
Build and Release / Build Binaries (arm64, darwin, macos) (push) Failing after 1s
Build and Release / Build Binaries (amd64, darwin, macos) (push) Successful in 4m30s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 4m44s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 9h4m59s
Build and Release / Build Binary (linux/arm64) (push) Failing after 24m13s
Add Comparison and Languages items to pages settings sidebar navigation. Fix sidebar not staying open when on those pages. Remove redundant labels from URL input fields that appear after "or use a URL" dividers (logo, favicon, hero image). Improves navigation consistency and UI clarity.
96 lines
4.7 KiB
Handlebars
96 lines
4.7 KiB
Handlebars
{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings pages")}}
|
|
<div class="user-main-content twelve wide column">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "repo.settings.pages.brand"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<form class="ui form" method="post">
|
|
{{.CsrfTokenHtml}}
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "repo.settings.pages.brand_name"}}</label>
|
|
<input name="brand_name" value="{{.Config.Brand.Name}}" placeholder="{{.Repository.Name}}">
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.pages.brand_name_help"}}</p>
|
|
</div>
|
|
|
|
<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.pages.brand_logo"}}</h5>
|
|
{{if .Config.Brand.UploadedLogo}}
|
|
<div class="field">
|
|
<img src="/repo-avatars/{{.Config.Brand.UploadedLogo}}" style="max-width:200px;max-height:100px;border-radius:8px;border:1px solid var(--color-secondary);">
|
|
<div class="tw-mt-2">
|
|
<button class="ui mini red button" type="submit" form="delete-logo-form">
|
|
{{svg "octicon-trash" 14}} {{ctx.Locale.Tr "repo.settings.pages.brand_delete_logo"}}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "repo.settings.pages.brand_upload_logo"}}</label>
|
|
<div class="tw-flex tw-gap-2 tw-items-center">
|
|
<input type="file" name="brand_logo" accept="image/jpeg,image/png,image/webp,image/gif" form="upload-logo-form">
|
|
<button class="ui primary button" type="submit" form="upload-logo-form">
|
|
{{svg "octicon-upload" 16}} {{ctx.Locale.Tr "repo.settings.pages.brand_upload_btn"}}
|
|
</button>
|
|
</div>
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.pages.brand_upload_help"}}</p>
|
|
</div>
|
|
<div class="ui horizontal divider">{{ctx.Locale.Tr "repo.settings.pages.brand_or"}}</div>
|
|
<div class="field">
|
|
<input name="brand_logo_url" value="{{.Config.Brand.LogoURL}}" placeholder="https://example.com/logo.svg">
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.pages.brand_logo_url_help"}}</p>
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "repo.settings.pages.brand_tagline"}}</label>
|
|
<input name="brand_tagline" value="{{.Config.Brand.Tagline}}" placeholder="Your tagline here">
|
|
</div>
|
|
|
|
<h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.pages.brand_favicon"}}</h5>
|
|
{{if .Config.Brand.UploadedFavicon}}
|
|
<div class="field">
|
|
<img src="/repo-avatars/{{.Config.Brand.UploadedFavicon}}" style="max-width:64px;max-height:64px;border-radius:4px;border:1px solid var(--color-secondary);">
|
|
<div class="tw-mt-2">
|
|
<button class="ui mini red button" type="submit" form="delete-favicon-form">
|
|
{{svg "octicon-trash" 14}} {{ctx.Locale.Tr "repo.settings.pages.brand_delete_favicon"}}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="field">
|
|
<label>{{ctx.Locale.Tr "repo.settings.pages.brand_upload_favicon"}}</label>
|
|
<div class="tw-flex tw-gap-2 tw-items-center">
|
|
<input type="file" name="brand_favicon" accept="image/jpeg,image/png,image/webp,image/gif,image/x-icon,image/svg+xml" form="upload-favicon-form">
|
|
<button class="ui primary button" type="submit" form="upload-favicon-form">
|
|
{{svg "octicon-upload" 16}} {{ctx.Locale.Tr "repo.settings.pages.brand_upload_btn"}}
|
|
</button>
|
|
</div>
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.pages.brand_favicon_upload_help"}}</p>
|
|
</div>
|
|
<div class="ui horizontal divider">{{ctx.Locale.Tr "repo.settings.pages.brand_or"}}</div>
|
|
<div class="field">
|
|
<input name="brand_favicon_url" value="{{.Config.Brand.FaviconURL}}" placeholder="https://example.com/favicon.ico">
|
|
<p class="help">{{ctx.Locale.Tr "repo.settings.pages.brand_favicon_url_help"}}</p>
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="field">
|
|
<button class="ui primary button">{{ctx.Locale.Tr "save"}}</button>
|
|
</div>
|
|
</form>
|
|
|
|
{{/* Separate forms for upload/delete actions — outside the main form to avoid nesting */}}
|
|
{{if .Config.Brand.UploadedLogo}}
|
|
<form id="delete-logo-form" method="post" action="{{.Link}}/delete_logo" class="tw-hidden">{{.CsrfTokenHtml}}</form>
|
|
{{else}}
|
|
<form id="upload-logo-form" method="post" enctype="multipart/form-data" action="{{.Link}}/upload_logo" class="tw-hidden">{{.CsrfTokenHtml}}</form>
|
|
{{end}}
|
|
|
|
{{if .Config.Brand.UploadedFavicon}}
|
|
<form id="delete-favicon-form" method="post" action="{{.Link}}/delete_favicon" class="tw-hidden">{{.CsrfTokenHtml}}</form>
|
|
{{else}}
|
|
<form id="upload-favicon-form" method="post" enctype="multipart/form-data" action="{{.Link}}/upload_favicon" class="tw-hidden">{{.CsrfTokenHtml}}</form>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{template "repo/settings/layout_footer" .}}
|