Added message entries for message link visit warning.

pull/1708/head
Warrick Corfe-Tan 4 years ago
parent a9913d29f7
commit 23c83662e7

@ -419,5 +419,8 @@
"device": "Device", "device": "Device",
"destination": "Destination", "destination": "Destination",
"learnMore": "Learn more", "learnMore": "Learn more",
"playAtCustomSpeed": "Play at $multipler$x speed" "playAtCustomSpeed": "Play at $multipler$x speed",
"linkVisitWarningTitle": "Open this URL in your browser?",
"linkVisitWarningMessage": "Are you sure you wish to open $url$ in your browser?",
"open": "Open"
} }

@ -78,13 +78,13 @@ export class Linkify extends React.Component<Props> {
const url = e.target.href; const url = e.target.href;
const openLink = () => { const openLink = () => {
// window.open(e.target.href);
void shell.openExternal(url); void shell.openExternal(url);
} }
window.inboxStore?.dispatch(updateConfirmModal({ window.inboxStore?.dispatch(updateConfirmModal({
title: "Hello", title: window.i18n('linkVisitWarningTitle'),
message: "Are you sure you want to open this link?", message: window.i18n("linkVisitWarningMessage", url),
okText: window.i18n("open"),
onClickOk: openLink, onClickOk: openLink,
onClickClose: () => { onClickClose: () => {
window.inboxStore?.dispatch(updateConfirmModal(null)); window.inboxStore?.dispatch(updateConfirmModal(null));

Loading…
Cancel
Save