mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Replace Fomantic's hard-forked jQuery modal with native `<dialog>` elements, advancing https://github.com/go-gitea/gitea/issues/29849. The UI is visually unchanged. Dialogs open with `show()` over an `inert` page, so tooltips, popups and toasts mounted on `<body>` stay usable above them, unlike with `showModal()` (https://github.com/whatwg/html/issues/9936). - Remove the Fomantic modal and dimmer, add `showModal` and `hideModal` - Declare modals as `<dialog class="modal-dialog">`, shown inside a `.modal-backdrop`, instead of `ui modal` with its unused size classes - Remove two modals that could never be opened - Block the page while a modal is open, close the topmost one on Escape and restore focus to its opener - Allow stacked modals, use a confirm modal instead of `window.confirm` for deleting content history - Hide popups and toasts when a modal opens or closes - Keep the release notes modal open when generating notes fails Fixes: https://github.com/go-gitea/gitea/issues/39643 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
49 lines
2.0 KiB
Handlebars
49 lines
2.0 KiB
Handlebars
{{template "repo/settings/layout_head" (dict "pageClass" "repository settings lfs")}}
|
|
<div class="repo-setting-content">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "repo.settings.lfs_filelist"}} ({{ctx.Locale.Tr "admin.total" .Total}})
|
|
<div class="ui right">
|
|
<a class="ui tiny compact button" href="{{.Link}}/locks">{{ctx.Locale.Tr "repo.settings.lfs_locks"}}</a>
|
|
<a class="ui primary tiny compact button" href="{{.Link}}/pointers"> {{ctx.Locale.Tr "repo.settings.lfs_findpointerfiles"}}</a>
|
|
</div>
|
|
</h4>
|
|
<table id="lfs-files-table" class="ui attached segment single line table">
|
|
<tbody>
|
|
{{range .LFSFiles}}
|
|
<tr>
|
|
<td>
|
|
<a href="{{$.Link}}/show/{{.Oid}}" title="{{.Oid}}" class="ui label commit-id-short">
|
|
{{ShortSha .Oid}}
|
|
</a>
|
|
</td>
|
|
<td>{{FormatByteSize .Size}}</td>
|
|
<td>{{DateUtils.TimeSince .CreatedUnix}}</td>
|
|
<td>
|
|
<div class="flex-text-block tw-justify-end">
|
|
<a class="ui basic primary tiny compact button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
|
<button type="button" class="ui basic tiny compact red icon button show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.editor.delete_this_file"}}"
|
|
data-modal="#delete-lfs-object" data-modal-header="{{ctx.Locale.Tr "repo.settings.lfs_delete" .Oid}}" data-modal-form.url="{{$.Link}}/delete/{{.Oid}}"
|
|
>
|
|
{{svg "octicon-trash" 14}}
|
|
</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr>
|
|
<td colspan="4">{{ctx.Locale.Tr "repo.settings.lfs_no_lfs_files"}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{template "base/paginate" .}}
|
|
<dialog class="modal-dialog" id="delete-lfs-object">
|
|
<div class="header"></div>
|
|
<form class="content" method="post">
|
|
<p>{{ctx.Locale.Tr "repo.settings.lfs_delete_warning"}}</p>
|
|
{{template "base/modal_actions_confirm"}}
|
|
</form>
|
|
</dialog>
|
|
</div>
|
|
{{template "repo/settings/layout_footer" .}}
|