mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
rooms-page-calendar-ics-room-name-fix (#659)
Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@ import {
|
|||||||
} from "../../../lib/utils";
|
} from "../../../lib/utils";
|
||||||
|
|
||||||
interface ICSSettingsProps {
|
interface ICSSettingsProps {
|
||||||
roomName: NonEmptyString;
|
roomName: NonEmptyString | null;
|
||||||
icsUrl?: string;
|
icsUrl?: string;
|
||||||
icsEnabled?: boolean;
|
icsEnabled?: boolean;
|
||||||
icsFetchInterval?: number;
|
icsFetchInterval?: number;
|
||||||
@@ -85,7 +85,7 @@ export default function ICSSettings({
|
|||||||
const handleCopyRoomUrl = async () => {
|
const handleCopyRoomUrl = async () => {
|
||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(
|
await navigator.clipboard.writeText(
|
||||||
roomAbsoluteUrl(assertExistsAndNonEmptyString(roomName)),
|
roomAbsoluteUrl(assertExists(roomName)),
|
||||||
);
|
);
|
||||||
setJustCopied(true);
|
setJustCopied(true);
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ export default function ICSSettings({
|
|||||||
const handleRoomUrlClick = () => {
|
const handleRoomUrlClick = () => {
|
||||||
if (roomUrlInputRef.current) {
|
if (roomUrlInputRef.current) {
|
||||||
roomUrlInputRef.current.select();
|
roomUrlInputRef.current.select();
|
||||||
handleCopyRoomUrl();
|
handleCopyRoomUrl().then(() => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -196,6 +196,7 @@ export default function ICSSettings({
|
|||||||
To enable Reflector to recognize your calendar events as meetings,
|
To enable Reflector to recognize your calendar events as meetings,
|
||||||
add this URL as the location in your calendar events
|
add this URL as the location in your calendar events
|
||||||
</Field.HelperText>
|
</Field.HelperText>
|
||||||
|
{roomName ? (
|
||||||
<HStack gap={0} position="relative" width="100%">
|
<HStack gap={0} position="relative" width="100%">
|
||||||
<Input
|
<Input
|
||||||
ref={roomUrlInputRef}
|
ref={roomUrlInputRef}
|
||||||
@@ -220,6 +221,7 @@ export default function ICSSettings({
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</HStack>
|
</HStack>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
) : null}
|
||||||
</Field.Root>
|
</Field.Root>
|
||||||
|
|
||||||
<Field.Root>
|
<Field.Root>
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ export default function RoomsList() {
|
|||||||
|
|
||||||
<Tabs.Content value="calendar" pt={6}>
|
<Tabs.Content value="calendar" pt={6}>
|
||||||
<ICSSettings
|
<ICSSettings
|
||||||
roomName={parseNonEmptyString(room.name)}
|
roomName={room.name ? parseNonEmptyString(room.name) : null}
|
||||||
icsUrl={room.icsUrl}
|
icsUrl={room.icsUrl}
|
||||||
icsEnabled={room.icsEnabled}
|
icsEnabled={room.icsEnabled}
|
||||||
icsFetchInterval={room.icsFetchInterval}
|
icsFetchInterval={room.icsFetchInterval}
|
||||||
|
|||||||
Reference in New Issue
Block a user