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.web.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.web.tsx')
-rw-r--r-- | src/view/com/modals/Modal.web.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/view/com/modals/Modal.web.tsx b/src/view/com/modals/Modal.web.tsx index 685d9abe1..ee778d17d 100644 --- a/src/view/com/modals/Modal.web.tsx +++ b/src/view/com/modals/Modal.web.tsx @@ -30,6 +30,7 @@ import * as ModerationDetailsModal from './ModerationDetails' import * as BirthDateSettingsModal from './BirthDateSettings' import * as VerifyEmailModal from './VerifyEmail' import * as ChangeEmailModal from './ChangeEmail' +import * as LinkWarningModal from './LinkWarning' export const ModalsContainer = observer(function ModalsContainer() { const store = useStores() @@ -116,6 +117,8 @@ function Modal({modal}: {modal: ModalIface}) { element = <VerifyEmailModal.Component {...modal} /> } else if (modal.name === 'change-email') { element = <ChangeEmailModal.Component /> + } else if (modal.name === 'link-warning') { + element = <LinkWarningModal.Component {...modal} /> } else { return null } |