mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
feat: move Create Meeting button to header
- Remove 'Start a Quick Meeting' box from main content area - Add showCreateButton and onCreateMeeting props to MinimalHeader - Create Meeting button now appears in header left of Leave Room - Only shows for room owners or shared room users - Update no meetings message to remove reference to quick meeting below - Cleaner, more accessible UI with actions in the header
This commit is contained in:
@@ -185,6 +185,8 @@ export default function MeetingSelection({
|
|||||||
displayName={room?.name}
|
displayName={room?.name}
|
||||||
showLeaveButton={true}
|
showLeaveButton={true}
|
||||||
onLeave={handleLeaveMeeting}
|
onLeave={handleLeaveMeeting}
|
||||||
|
showCreateButton={isOwner || isSharedRoom}
|
||||||
|
onCreateMeeting={onCreateUnscheduled}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Flex
|
<Flex
|
||||||
@@ -391,29 +393,12 @@ export default function MeetingSelection({
|
|||||||
</Text>
|
</Text>
|
||||||
<Text fontSize="md" color="gray.600" maxW="400px">
|
<Text fontSize="md" color="gray.600" maxW="400px">
|
||||||
There are no ongoing or upcoming meetings in this room at the moment.
|
There are no ongoing or upcoming meetings in this room at the moment.
|
||||||
{(isOwner || isSharedRoom) && " You can start a quick meeting below."}
|
|
||||||
</Text>
|
</Text>
|
||||||
</VStack>
|
</VStack>
|
||||||
</VStack>
|
</VStack>
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Create Unscheduled Meeting - Only for room owners or shared rooms */}
|
|
||||||
{(isOwner || isSharedRoom) && (
|
|
||||||
<Box width="100%" bg="gray.50" borderRadius="md" p={4} mt={6}>
|
|
||||||
<HStack justify="space-between" align="center">
|
|
||||||
<VStack align="start" gap={1}>
|
|
||||||
<Text fontWeight="semibold">Start a Quick Meeting</Text>
|
|
||||||
<Text fontSize="sm" color="gray.600">
|
|
||||||
Jump into a meeting room right away
|
|
||||||
</Text>
|
|
||||||
</VStack>
|
|
||||||
<Button colorScheme="green" onClick={onCreateUnscheduled}>
|
|
||||||
Create Meeting
|
|
||||||
</Button>
|
|
||||||
</HStack>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Flex, Link, Button, Text } from "@chakra-ui/react";
|
import { Flex, Link, Button, Text, HStack } from "@chakra-ui/react";
|
||||||
import NextLink from "next/link";
|
import NextLink from "next/link";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -10,6 +10,8 @@ interface MinimalHeaderProps {
|
|||||||
displayName?: string;
|
displayName?: string;
|
||||||
showLeaveButton?: boolean;
|
showLeaveButton?: boolean;
|
||||||
onLeave?: () => void;
|
onLeave?: () => void;
|
||||||
|
showCreateButton?: boolean;
|
||||||
|
onCreateMeeting?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function MinimalHeader({
|
export default function MinimalHeader({
|
||||||
@@ -17,6 +19,8 @@ export default function MinimalHeader({
|
|||||||
displayName,
|
displayName,
|
||||||
showLeaveButton = true,
|
showLeaveButton = true,
|
||||||
onLeave,
|
onLeave,
|
||||||
|
showCreateButton = false,
|
||||||
|
onCreateMeeting,
|
||||||
}: MinimalHeaderProps) {
|
}: MinimalHeaderProps) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -63,7 +67,17 @@ export default function MinimalHeader({
|
|||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
{/* Leave Room Button */}
|
{/* Action Buttons */}
|
||||||
|
<HStack gap={2}>
|
||||||
|
{showCreateButton && onCreateMeeting && (
|
||||||
|
<Button
|
||||||
|
colorScheme="green"
|
||||||
|
size="sm"
|
||||||
|
onClick={onCreateMeeting}
|
||||||
|
>
|
||||||
|
Create Meeting
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
{showLeaveButton && (
|
{showLeaveButton && (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@@ -74,6 +88,7 @@ export default function MinimalHeader({
|
|||||||
Leave Room
|
Leave Room
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
</HStack>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user