mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Make repo migration cancelable and fix various bugs (#24605)
Replace #12917 Close #24601 Close #12845     --------- Co-authored-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
{{template "base/alert" .}}
|
||||
<div class="home">
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div id="repo_migrating" class="sixteen wide center aligned centered column" task="{{.MigrateTask.ID}}">
|
||||
<div id="repo_migrating" class="sixteen wide center aligned centered column" data-migrating-task-id="{{.MigrateTask.ID}}">
|
||||
<div>
|
||||
<img src="{{AssetUrlPrefix}}/img/loading.png">
|
||||
</div>
|
||||
@@ -32,10 +32,14 @@
|
||||
{{end}}
|
||||
<p id="repo_migrating_failed_error"></p>
|
||||
</div>
|
||||
{{if and .Failed .Permission.IsAdmin}}
|
||||
{{if .Permission.IsAdmin}}
|
||||
<div class="ui divider"></div>
|
||||
<div class="item">
|
||||
{{if .Failed}}
|
||||
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.locale.Tr "repo.settings.delete"}}</button>
|
||||
{{else}}
|
||||
<button class="ui basic red show-modal button" data-modal="#cancel-repo-modal">{{.locale.Tr "cancel"}}</button>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -45,6 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small modal" id="delete-repo-modal">
|
||||
<div class="header">
|
||||
{{.locale.Tr "repo.settings.delete"}}
|
||||
@@ -78,4 +83,18 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui g-modal-confirm modal" id="cancel-repo-modal">
|
||||
<div class="header">
|
||||
{{.locale.Tr "repo.migrate.cancel_migrating_title"}}
|
||||
</div>
|
||||
<form action="{{.Link}}/settings/migrate/cancel" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="content">
|
||||
{{.locale.Tr "repo.migrate.cancel_migrating_confirm"}}
|
||||
</div>
|
||||
{{template "base/modal_actions_confirm" .}}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{template "base/footer" .}}
|
||||
|
Reference in New Issue
Block a user