chore: cross domain banner between APP_HOST_LEGACY and APP_HOST
This commit is contained in:
parent
61a9bedfff
commit
4dd24f0925
10 changed files with 137 additions and 11 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
en:
|
||||
message_new_domain: "demarches-simplifiees.fr is now called"
|
||||
follow_link: Follow this link to connect to the new address.
|
||||
detected_error: We have detected a network error in your access. Contact your IT department to authorize connection to demarches.gouv.fr.
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fr:
|
||||
message_new_domain: "demarches-simplifiees.fr s’appelle maintenant"
|
||||
follow_link: Suivez ce lien pour vous connecter à la nouvelle adresse.
|
||||
detected_error: Nous avons détecté une erreur réseau pour vous y accéder. Contactez votre service informatique pour autoriser la connexion sur demarches.gouv.fr.
|
|
@ -0,0 +1,19 @@
|
|||
- if auto_switch?
|
||||
:javascript
|
||||
const hintUrl = "http://#{ApplicationHelper::APP_HOST}/favicon.ico"
|
||||
|
||||
fetch(hintUrl, { mode: 'cors' }).then(() => {
|
||||
window.location = '#{new_host_url}';
|
||||
}).catch((e) => {
|
||||
// TODO: notify us in order to monitor connectivity issues volume
|
||||
})
|
||||
|
||||
= render Dsfr::NoticeComponent.new(closable: true) do |c|
|
||||
- c.with_title do
|
||||
= t(".message_new_domain")
|
||||
= "#{helpers.link_to APPLICATION_NAME, new_host_url}."
|
||||
|
||||
- if manual_switch?
|
||||
= t(".follow_link")
|
||||
- elsif auto_switch? || true
|
||||
= t(".detected_error")
|
Loading…
Add table
Add a link
Reference in a new issue