fix(mobile): apply useModalStyle to 7 more modal dialogs
ScheduleMessageModal, PollCreator, JoinAddressPrompt, JumpToTime, EditHistoryModal, ForwardMessageDialog, RemindMeDialog — all now render fullscreen on mobile (≤750px) and as a capped-width box on desktop, consistent with the existing useModalStyle pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import { IContent } from 'matrix-js-sdk';
|
||||
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
||||
import { stopPropagation } from '../../utils/keyboard';
|
||||
import { scheduleMessage } from '../../utils/scheduledMessages';
|
||||
import { useModalStyle } from '../../hooks/useModalStyle';
|
||||
|
||||
interface ScheduleMessageModalProps {
|
||||
roomId: string;
|
||||
@@ -89,6 +90,7 @@ export function ScheduleMessageModal({
|
||||
onScheduled,
|
||||
onClose,
|
||||
}: ScheduleMessageModalProps) {
|
||||
const modalStyle = useModalStyle(400);
|
||||
const mx = useMatrixClient();
|
||||
const [messageText, setMessageText] = useState(initialBody ?? '');
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
@@ -186,9 +188,7 @@ export function ScheduleMessageModal({
|
||||
background: color.Surface.Container,
|
||||
borderRadius: config.radii.R400,
|
||||
boxShadow: color.Other.Shadow,
|
||||
width: '100vw',
|
||||
maxWidth: 400,
|
||||
overflow: 'hidden',
|
||||
...modalStyle,
|
||||
}}
|
||||
>
|
||||
{/* Header */}
|
||||
|
||||
Reference in New Issue
Block a user