diff --git a/app/views/layouts/_offline_flash.erb b/app/views/layouts/_offline_flash.erb index de4d156323..364788dcf0 100644 --- a/app/views/layouts/_offline_flash.erb +++ b/app/views/layouts/_offline_flash.erb @@ -9,6 +9,15 @@
<% end %> + <% if Settings.status_expected_restore_date %> + <% expected_restore_time = Time.parse(Settings.status_expected_restore_date).utc %> + <% if expected_restore_time > Time.now.utc %> ++ <%= t ".expected_restore_html", :time => friendly_date(expected_restore_time) %> +
+ <% end %> + <% end %> + <% if Settings.status_announcement_url %><%= link_to t(".announcement"), Settings.status_announcement_url %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 5e7362f85d..57133659fe 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1587,6 +1587,7 @@ en: offline_flash: osm_offline: "The OpenStreetMap database is currently offline while essential database maintenance work is carried out." osm_read_only: "The OpenStreetMap database is currently in read-only mode while essential database maintenance work is carried out." + expected_restore_html: "Services are expected to be restored in %{time}." announcement: "You can read the announcement here." user_mailer: diary_comment_notification: diff --git a/config/settings.yml b/config/settings.yml index 3b0a99ca30..71819c4020 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -23,6 +23,8 @@ api_version: "0.6" # database_offline - database offline with site in emergency mode # gpx_offline - gpx storage offline status: "online" +# Expected services restoration date added to offline flash messages +#status_expected_restore_date: "2024-12-18 12:00:00Z" # Application status announcement url added to offline flash messages #status_announcement_url: "https://en.osm.town/@osm_tech" # The maximum area you're allowed to request, in square degrees