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>
32 lines
1.1 KiB
Handlebars
32 lines
1.1 KiB
Handlebars
<dialog class="modal-dialog" id="cite-repo-modal">
|
|
<div class="header">
|
|
{{ctx.Locale.Tr "repo.cite_this_repo"}}
|
|
</div>
|
|
<div class="content">
|
|
<div class="ui stackable secondary menu">
|
|
<div class="ui action input tw-flex tw-w-full" data-global-init="initRepoCitationPanel">
|
|
{{if .CitationAPA}}
|
|
<button type="button" class="ui citation button citation-apa" data-text="{{.CitationAPA}}">
|
|
APA
|
|
</button>
|
|
{{end}}
|
|
<button type="button" class="ui citation button citation-bibtex" data-text="{{.CitationBibTeX}}">
|
|
BibTeX
|
|
</button>
|
|
<input value="" size="1" readonly autofocus>
|
|
<button type="button" class="ui icon button citation-copy" data-tooltip-content="{{ctx.Locale.Tr "copy"}}">
|
|
{{svg "octicon-copy"}}
|
|
</button>
|
|
<a class="ui basic jump icon button" href="{{$.RepoLink}}/src/{{$.RefTypeNameSubURL}}/{{PathEscapeSegments $.CitationFileName}}" data-tooltip-content="{{ctx.Locale.Tr "repo.find_file.go_to_file"}}">
|
|
{{svg "octicon-file-moved"}}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="actions">
|
|
<button type="button" class="ui cancel button">
|
|
{{ctx.Locale.Tr "cancel"}}
|
|
</button>
|
|
</div>
|
|
</dialog>
|