feat(call): add docked call panel and remote cursor overlay
- Implemented DockedCallPanel component to render the docked call interface when an active call is present. - Created RemoteCursorOverlay component to display remote cursor positions during screen sharing. - Added hooks for managing docked call state and remote cursor functionality. - Introduced pending drag state management for seamless transitions between docked and floating states. - Developed embed filter management components for personal and room-wide settings, allowing users to customize URL embed visibility. - Implemented auto-joining functionality for rooms within spaces, enhancing user experience during space navigation. - Added state management for tracking joining progress of rooms in spaces.
This commit is contained in:
@@ -42,11 +42,26 @@ export const UrlPreviewCard = as<'div', { url: string; ts: number }>(
|
||||
if (previewStatus.status === AsyncStatus.Error) return null;
|
||||
|
||||
const renderContent = (prev: IPreviewUrlResponse) => {
|
||||
const imgUrl = mxcUrlToHttp(mx, prev['og:image'] || '', useAuthentication, 256, 256, 'scale', false);
|
||||
const ogImage = prev['og:image'] || '';
|
||||
// SVGs can't be thumbnailed by Matrix servers, load them directly
|
||||
// Also check og:image:type if available
|
||||
const isSvg =
|
||||
ogImage.toLowerCase().endsWith('.svg') ||
|
||||
prev['og:image:type'] === 'image/svg+xml';
|
||||
const imgUrl = isSvg
|
||||
? mxcUrlToHttp(mx, ogImage, useAuthentication)
|
||||
: mxcUrlToHttp(mx, ogImage, useAuthentication, 256, 256, 'scale', false);
|
||||
|
||||
return (
|
||||
<>
|
||||
{imgUrl && <UrlPreviewImg src={imgUrl} alt={prev['og:title']} title={prev['og:title']} />}
|
||||
{imgUrl && (
|
||||
<UrlPreviewImg
|
||||
src={imgUrl}
|
||||
alt={prev['og:title']}
|
||||
title={prev['og:title']}
|
||||
style={isSvg ? { padding: '10px' } : undefined}
|
||||
/>
|
||||
)}
|
||||
<UrlPreviewContent>
|
||||
<Text
|
||||
style={linkStyles}
|
||||
|
||||
Reference in New Issue
Block a user