forgejo-federation/templates/package/settings.tmpl
silverwind 1bd2772235
Replace remaining fontawesome dropdown icons with SVG (#24455)
- Replace leftover dropdown triangles with SVG
- Replace remove icon with SVG and add styling for it:

<img width="817" alt="Screenshot 2023-05-01 at 00 40 05"
src="https://user-images.githubusercontent.com/115237/235379271-4674d4f7-b11e-4d6d-90f9-1478325443ca.png">
<img width="816" alt="Screenshot 2023-05-01 at 00 46 56"
src="https://user-images.githubusercontent.com/115237/235379451-b515afb3-9773-4f6f-a259-e7048235bcba.png">
2023-05-01 05:35:02 -04:00

68 lines
2.6 KiB
Handlebars

{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content repository settings options">
{{template "user/overview/header" .}}
<div class="ui container">
{{template "base/alert" .}}
<p><a href="{{.PackageDescriptor.FullWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{.locale.Tr "repo.settings"}}</strong></p>
<h4 class="ui top attached header">
{{.locale.Tr "packages.settings.link"}}
</h4>
<div class="ui attached segment">
<p>{{.locale.Tr "packages.settings.link.description"}}</p>
<form class="ui form" action="{{.Link}}" method="post">
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="link">
<div class="field">
<div class="ui clearable selection dropdown">
{{$repoID := 0}}
{{if .PackageDescriptor.Repository}}
{{$repoID = .PackageDescriptor.Repository.ID}}
{{end}}
<input type="hidden" name="repo_id" value="{{$repoID}}">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="default text">{{.locale.Tr "packages.settings.link.select"}}</div>
<div class="menu">
{{range .Repos}}
<div class="item" data-value="{{.ID}}">{{.Name}}</div>
{{end}}
</div>
</div>
</div>
<div class="field">
<button class="ui green button">{{.locale.Tr "packages.settings.link.button"}}</button>
</div>
</form>
</div>
<h4 class="ui top attached error header">
{{.locale.Tr "repo.settings.danger_zone"}}
</h4>
<div class="ui attached error table danger segment">
<div class="item">
<div class="ui right">
<button class="ui basic red show-modal button" data-modal="#delete-package-modal">{{.locale.Tr "packages.settings.delete"}}</button>
</div>
<div>
<h5>{{.locale.Tr "packages.settings.delete"}}</h5>
<p>{{.locale.Tr "packages.settings.delete.description"}}</p>
</div>
<div class="ui tiny modal" id="delete-package-modal">
<div class="header">
{{.locale.Tr "packages.settings.delete"}}
</div>
<div class="content">
<div class="ui warning message text left gt-word-break">
{{.locale.Tr "packages.settings.delete.notice" .PackageDescriptor.Package.Name .PackageDescriptor.Version.Version}}
</div>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="delete">
{{template "base/modal_actions_confirm" .}}
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}