Implement URL validation on default videos links (#7087)

This commit is contained in:
sean-brydon authored and GitHub committed 2023-02-14 13:19:45 +00:00
1 parent 77600f8168
commit 1c97e549eb
6 files changed
+47 -6

No files matched your search

@@ -196,6 +196,12 @@ export const EventSetupTab = (
if (!eventLocationType) {
return null;
}
// We dont want to translate the string link - it doesnt exist in common.json and it gets prefixed/suffixed with __ or //
const eventLabel =
eventLocationType.defaultValueVariable === "link"
? location[eventLocationType.defaultValueVariable]
: t(location[eventLocationType.defaultValueVariable] || eventLocationType.label);
return (
<li
key={`${location.type}${index}`}
@@ -207,9 +213,7 @@ export const EventSetupTab = (
className="h-4 w-4"
alt={`${eventLocationType.label} logo`}
/>
<span className="truncate text-sm ltr:ml-1 rtl:mr-1">
{t(location[eventLocationType.defaultValueVariable] || eventLocationType.label)}
</span>
<span className="truncate text-sm ltr:ml-1 rtl:mr-1">{eventLabel}</span>
</div>
<div className="flex">
<button
@@ -121,6 +121,9 @@ const IntegrationsList = ({ data, handleDisconnect, variant }: IntegrationsListP
showToast("Default app updated successfully", "success");
utils.viewer.getUsersDefaultConferencingApp.invalidate();
},
onError: (error) => {
showToast(`Error: ${error.message}`, "error");
},
});
const { t } = useLocale();
@@ -66,6 +66,9 @@ const ConferencingLayout = () => {
showToast("Default app updated successfully", "success");
utils.viewer.getUsersDefaultConferencingApp.invalidate();
},
onError: (error) => {
showToast(`Error: ${error.message}`, "error");
},
});
const [deleteAppModal, setDeleteAppModal] = useState(false);