feat(banner-domain): hide error msg by default because while redirecting, we briefly see the banner
This commit is contained in:
parent
dd0dba2959
commit
d8b35e2e77
1 changed files with 7 additions and 2 deletions
|
@ -7,7 +7,12 @@
|
|||
}).catch((e) => {
|
||||
const error = new Error("Connection test on new host failed: " + e);
|
||||
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?
|
||||
= t(".follow_link")
|
||||
= t(".detected_error")
|
||||
- elsif auto_switch?
|
||||
%span#banner_auto_switch_error.hidden= t(".detected_error")
|
||||
|
||||
- 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")
|
||||
|
|
Loading…
Reference in a new issue