Merge remote-tracking branch 'upstream/pull/5403'

This commit is contained in:
Tom Hughes 2025-02-10 18:54:14 +00:00
commit 2cfc030bba
7 changed files with 51 additions and 27 deletions

View file

@ -259,12 +259,7 @@ class ApplicationController < ActionController::Base
request.content_security_policy = policy
case Settings.status
when "database_offline", "api_offline"
flash.now[:warning] = t("layouts.osm_offline")
when "database_readonly", "api_readonly"
flash.now[:warning] = t("layouts.osm_read_only")
end
flash.now[:warning] = { :partial => "layouts/offline_flash" } unless api_status == "online"
request.xhr? ? "xhr" : "map"
end