From ab388deb0e52c058a19dbd844bdd890f7cf84d51 Mon Sep 17 00:00:00 2001 From: puni9869 <80308335+puni9869@users.noreply.github.com> Date: Tue, 1 Aug 2023 21:30:59 +0530 Subject: Allow editing push mirrors after creation (#26151) Allow users to edit the sync interval for existing push mirrors. Currently, there is no way to modify the interval once the mirror is created.
Screenshots ## Before Screenshot 2023-07-26 at 9 31 21 AM ## After Screenshot 2023-07-26 at 9 44 40 AM ### On hover image image image ### Edit modal image ### Only valid times are allowed Screenshot 2023-07-26 at 9 50 01 AM image
Fixes #21295 --------- Co-authored-by: wxiaoguang --- templates/repo/settings/options.tmpl | 20 +++++++++++--- .../repo/settings/push_mirror_sync_modal.tmpl | 32 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 templates/repo/settings/push_mirror_sync_modal.tmpl (limited to 'templates/repo/settings') diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index f0b030dc54..569a576ce6 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -203,17 +203,27 @@ {{$.locale.Tr "repo.settings.mirror_settings.direction.push"}} {{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}
{{$.locale.Tr "error"}}
{{end}} +
{{$.CsrfTokenHtml}} - + - +
{{$.CsrfTokenHtml}} - + - +
@@ -980,3 +990,5 @@ {{end}} {{end}} + +{{template "repo/settings/push_mirror_sync_modal" .}} diff --git a/templates/repo/settings/push_mirror_sync_modal.tmpl b/templates/repo/settings/push_mirror_sync_modal.tmpl new file mode 100644 index 0000000000..a04574add5 --- /dev/null +++ b/templates/repo/settings/push_mirror_sync_modal.tmpl @@ -0,0 +1,32 @@ + -- cgit v1.2.3