2023-04-23 18:21:21 +08:00
|
|
|
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
|
|
|
|
<div class="admin-setting-content">
|
2022-03-30 16:42:47 +08:00
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 20:42:40 +08:00
|
|
|
{{ctx.Locale.Tr "admin.packages.package_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .TotalCount}},
|
2023-09-25 16:56:50 +08:00
|
|
|
{{ctx.Locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}},
|
|
|
|
{{ctx.Locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}})
|
2023-08-08 08:46:10 +08:00
|
|
|
<div class="ui right">
|
2024-10-10 12:56:49 +08:00
|
|
|
<form method="post" action="{{AppSubUrl}}/-/admin/packages/cleanup">
|
2023-08-08 08:46:10 +08:00
|
|
|
{{.CsrfTokenHtml}}
|
2023-09-25 16:56:50 +08:00
|
|
|
<button class="ui primary tiny button">{{ctx.Locale.Tr "admin.packages.cleanup"}}</button>
|
2023-08-08 08:46:10 +08:00
|
|
|
</form>
|
|
|
|
</div>
|
2022-03-30 16:42:47 +08:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form ignore-dirty">
|
2024-03-15 07:24:59 +08:00
|
|
|
<div class="ui small fluid action input">
|
|
|
|
{{template "shared/search/input" dict "Value" .Query}}
|
|
|
|
<select class="ui small dropdown" name="type">
|
2023-09-25 16:56:50 +08:00
|
|
|
<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
|
|
|
|
<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>
|
2022-12-29 07:31:54 +08:00
|
|
|
{{range $type := .AvailableTypes}}
|
|
|
|
<option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option>
|
|
|
|
{{end}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</select>
|
2024-03-15 07:24:59 +08:00
|
|
|
{{template "shared/search/button"}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="ui attached table segment">
|
Improve UI on mobile (#19546)
Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience.
- Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row.
- The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that.
- The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row.
- The notification table will now be show a scrollbar instead of overflow.
- The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high.
- The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile.
- Fixes to not overflow the tables but instead force them to be scrollable.
- When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-02 00:11:21 +08:00
|
|
|
<table class="ui very basic striped table unstackable">
|
2022-03-30 16:42:47 +08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
2023-09-25 16:56:50 +08:00
|
|
|
<th>{{ctx.Locale.Tr "admin.packages.owner"}}</th>
|
|
|
|
<th>{{ctx.Locale.Tr "admin.packages.type"}}</th>
|
2022-10-23 09:18:15 +08:00
|
|
|
<th data-sortt-asc="name_asc" data-sortt-desc="name_desc">
|
2023-09-25 16:56:50 +08:00
|
|
|
{{ctx.Locale.Tr "admin.packages.name"}}
|
2022-10-23 09:18:15 +08:00
|
|
|
{{SortArrow "name_asc" "name_desc" .SortType false}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</th>
|
2022-10-23 09:18:15 +08:00
|
|
|
<th data-sortt-asc="version_desc" data-sortt-desc="version_asc">
|
2023-09-25 16:56:50 +08:00
|
|
|
{{ctx.Locale.Tr "admin.packages.version"}}
|
2022-10-23 09:18:15 +08:00
|
|
|
{{SortArrow "version_desc" "version_asc" .SortType false}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</th>
|
2023-09-25 16:56:50 +08:00
|
|
|
<th>{{ctx.Locale.Tr "admin.packages.creator"}}</th>
|
|
|
|
<th>{{ctx.Locale.Tr "admin.packages.repository"}}</th>
|
|
|
|
<th>{{ctx.Locale.Tr "admin.packages.size"}}</th>
|
2022-10-23 09:18:15 +08:00
|
|
|
<th data-sortt-asc="created_asc" data-sortt-desc="created_desc">
|
2023-09-25 16:56:50 +08:00
|
|
|
{{ctx.Locale.Tr "admin.packages.published"}}
|
2022-10-23 09:18:15 +08:00
|
|
|
{{SortArrow "created_asc" "created_desc" .SortType true}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</th>
|
2023-09-25 16:56:50 +08:00
|
|
|
<th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
|
2022-03-30 16:42:47 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .PackageDescriptors}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.Version.ID}}</td>
|
|
|
|
<td>
|
|
|
|
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
|
|
|
|
{{if .Owner.Visibility.IsPrivate}}
|
|
|
|
<span class="text gold">{{svg "octicon-lock"}}</span>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
|
|
|
<td>{{.Package.Type.Name}}</td>
|
2024-03-05 13:29:32 +08:00
|
|
|
<td class="gt-ellipsis tw-max-w-48">{{.Package.Name}}</td>
|
|
|
|
<td class="gt-ellipsis tw-max-w-48"><a href="{{.VersionWebLink}}">{{.Version.Version}}</a></td>
|
2022-03-30 16:42:47 +08:00
|
|
|
<td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
|
|
|
|
<td>
|
|
|
|
{{if .Repository}}
|
|
|
|
<a href="{{.Repository.Link}}">{{.Repository.Name}}</a>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
|
|
|
<td>{{FileSize .CalculateBlobSize}}</td>
|
2024-11-04 19:30:00 +08:00
|
|
|
<td>{{DateUtils.AbsoluteShort .Version.CreatedUnix}}</td>
|
2022-03-30 16:42:47 +08:00
|
|
|
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.Version.ID}}" data-name="{{.Package.Name}}" data-data-version="{{.Version.Version}}">{{svg "octicon-trash"}}</a></td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{template "base/paginate" .}}
|
|
|
|
</div>
|
|
|
|
|
2023-04-24 19:08:59 +08:00
|
|
|
<div class="ui g-modal-confirm delete modal">
|
2023-04-23 17:24:19 +08:00
|
|
|
<div class="header">
|
2022-03-30 16:42:47 +08:00
|
|
|
{{svg "octicon-trash"}}
|
2023-09-25 16:56:50 +08:00
|
|
|
{{ctx.Locale.Tr "packages.settings.delete"}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</div>
|
|
|
|
<div class="content">
|
2024-02-25 18:45:56 +08:00
|
|
|
{{ctx.Locale.Tr "packages.settings.delete.notice" (`<span class="name"></span>`|SafeHTML) (`<span class="dataVersion"></span>`|SafeHTML)}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</div>
|
2023-04-23 17:24:19 +08:00
|
|
|
{{template "base/modal_actions_confirm" .}}
|
2022-03-30 16:42:47 +08:00
|
|
|
</div>
|
2023-04-23 18:21:21 +08:00
|
|
|
|
|
|
|
{{template "admin/layout_footer" .}}
|