diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-10-02 14:47:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 14:47:39 -0700 |
commit | fd5bbb27699942f7d741d074eafdf16bfc9ecdd6 (patch) | |
tree | a7e7e6f1e7b07fc45a4988504e2509db97689079 /src/view/com/modals/Modal.tsx | |
parent | 2f157c152a59dc8bda3d4409204d850c2ac256a1 (diff) | |
download | voidsky-fd5bbb27699942f7d741d074eafdf16bfc9ecdd6.tar.zst |
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 <anshnanda10@gmail.com>
Diffstat (limited to 'src/view/com/modals/Modal.tsx')
-rw-r--r-- | src/view/com/modals/Modal.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
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 = <SwitchAccountModal.Component /> + } else if (activeModal?.name === 'link-warning') { + snapPoints = LinkWarningModal.snapPoints + element = <LinkWarningModal.Component {...activeModal} /> } else { return null } |