Merge pull request #10172 from colinux/fix-banner-domain
Tech: fix pour la bannière du domaine
This commit is contained in:
commit
b6526cfad9
1 changed files with 8 additions and 3 deletions
|
@ -7,7 +7,12 @@
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
const error = new Error("Connection test on new host failed: " + e);
|
const error = new Error("Connection test on new host failed: " + e);
|
||||||
const event = new CustomEvent("sentry:capture-exception", { detail: error });
|
const event = new CustomEvent("sentry:capture-exception", { detail: error });
|
||||||
setTimeout(() => dispatchEvent(event), 100); // listener is not immediately enabled
|
|
||||||
|
// listener is not immediately enabled, so wait a little bit
|
||||||
|
setTimeout(() => {
|
||||||
|
dispatchEvent(event);
|
||||||
|
document.getElementById("banner_auto_switch_error")?.classList?.remove("hidden");
|
||||||
|
}, 100);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,8 +23,8 @@
|
||||||
|
|
||||||
- if manual_switch?
|
- if manual_switch?
|
||||||
= t(".follow_link")
|
= t(".follow_link")
|
||||||
- elsif auto_switch? || true
|
- elsif auto_switch?
|
||||||
= t(".detected_error")
|
%span#banner_auto_switch_error.hidden= t(".detected_error")
|
||||||
|
|
||||||
- if user && !user.preferred_domain_demarches_gouv_fr? && requested_from_new_domain?
|
- if user && !user.preferred_domain_demarches_gouv_fr? && requested_from_new_domain?
|
||||||
= form_tag(helpers.preferred_domain_path, method: :patch, remote: true, name: "update-preferred-domain")
|
= form_tag(helpers.preferred_domain_path, method: :patch, remote: true, name: "update-preferred-domain")
|
||||||
|
|
Loading…
Reference in a new issue