From fd5bbb27699942f7d741d074eafdf16bfc9ecdd6 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 2 Oct 2023 14:47:39 -0700 Subject: Warn the user on links that dont match their text (#1573) * Add link warning modal when URLs do not match their text * Simplify the misleading link case for clarity * Fix typecheck * fix dark mode * Give a stronger visual indication of the root domain in the link warning * More rigorous URL mismatch logic * Remove debug --------- Co-authored-by: Ansh Nanda --- src/view/com/modals/Modal.tsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/view/com/modals/Modal.tsx') diff --git a/src/view/com/modals/Modal.tsx b/src/view/com/modals/Modal.tsx index cd2d2d9e9..4f3f424a3 100644 --- a/src/view/com/modals/Modal.tsx +++ b/src/view/com/modals/Modal.tsx @@ -33,6 +33,7 @@ import * as BirthDateSettingsModal from './BirthDateSettings' import * as VerifyEmailModal from './VerifyEmail' import * as ChangeEmailModal from './ChangeEmail' import * as SwitchAccountModal from './SwitchAccount' +import * as LinkWarningModal from './LinkWarning' const DEFAULT_SNAPPOINTS = ['90%'] @@ -148,6 +149,9 @@ export const ModalsContainer = observer(function ModalsContainer() { } else if (activeModal?.name === 'switch-account') { snapPoints = SwitchAccountModal.snapPoints element = + } else if (activeModal?.name === 'link-warning') { + snapPoints = LinkWarningModal.snapPoints + element = } else { return null } -- cgit 1.4.1