mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-01 00:07:01 +00:00
fix: confirm the host before opening meeting links from calendar events and invitations
This commit is contained in:
@@ -3,7 +3,6 @@ import {
|
|||||||
Animated,
|
Animated,
|
||||||
Dimensions,
|
Dimensions,
|
||||||
Easing,
|
Easing,
|
||||||
Linking,
|
|
||||||
Modal,
|
Modal,
|
||||||
Pressable,
|
Pressable,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
@@ -11,6 +10,7 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
import { openExternalUrl } from '../../lib/open-url';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
import {
|
import {
|
||||||
AlignLeft,
|
AlignLeft,
|
||||||
@@ -275,7 +275,7 @@ export function EventDetailSheet({
|
|||||||
</View>
|
</View>
|
||||||
<Pressable
|
<Pressable
|
||||||
style={styles.joinBtn}
|
style={styles.joinBtn}
|
||||||
onPress={() => { void Linking.openURL(videoUri); }}
|
onPress={() => { void openExternalUrl(videoUri, { confirm: true }); }}
|
||||||
>
|
>
|
||||||
<Text style={styles.joinBtnText}>{t('calendar.detail.open_link', 'Open link')}</Text>
|
<Text style={styles.joinBtnText}>{t('calendar.detail.open_link', 'Open link')}</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View, Text, StyleSheet, Pressable, ActivityIndicator, Linking } from 'react-native';
|
import { View, Text, StyleSheet, Pressable, ActivityIndicator } from 'react-native';
|
||||||
|
import { openExternalUrl } from '../../lib/open-url';
|
||||||
import {
|
import {
|
||||||
CalendarPlus, Check, HelpCircle, X, MapPin, Video, Clock, CalendarDays, AlertTriangle,
|
CalendarPlus, Check, HelpCircle, X, MapPin, Video, Clock, CalendarDays, AlertTriangle,
|
||||||
ShieldCheck, ShieldAlert, ChevronDown,
|
ShieldCheck, ShieldAlert, ChevronDown,
|
||||||
@@ -256,7 +257,7 @@ export function CalendarInvitationBanner({ email, jmapAccountId }: Props) {
|
|||||||
<Row icon={<MapPin size={15} color={c.textMuted} />} text={location} styles={styles} />
|
<Row icon={<MapPin size={15} color={c.textMuted} />} text={location} styles={styles} />
|
||||||
) : null}
|
) : null}
|
||||||
{videoUri ? (
|
{videoUri ? (
|
||||||
<Pressable style={styles.detailRow} onPress={() => { void Linking.openURL(videoUri); }}>
|
<Pressable style={styles.detailRow} onPress={() => { void openExternalUrl(videoUri, { confirm: true }); }}>
|
||||||
<Video size={15} color={c.textMuted} />
|
<Video size={15} color={c.textMuted} />
|
||||||
<Text style={[styles.detailText, { color: c.primary }]} numberOfLines={1}>
|
<Text style={[styles.detailText, { color: c.primary }]} numberOfLines={1}>
|
||||||
{t('calendar.invitation.join_video', 'Join video call')}
|
{t('calendar.invitation.join_video', 'Join video call')}
|
||||||
|
|||||||
Reference in New Issue
Block a user