Merge branch 'main' into fixed_labeler_issue
This commit is contained in:
8 files changed
+63
-20
No files matched your search
@@ -1,10 +1,9 @@
|
||||
import { useTranscription } from "@daily-co/daily-react";
|
||||
import { useDaily, useDailyEvent } from "@daily-co/daily-react";
|
||||
import React, { Fragment, useCallback, useRef, useState, useLayoutEffect, useEffect } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { showToast } from "@calcom/ui";
|
||||
|
||||
export const CalAiTranscribe = () => {
|
||||
const daily = useDaily();
|
||||
@@ -26,11 +25,25 @@ export const CalAiTranscribe = () => {
|
||||
);
|
||||
|
||||
useDailyEvent("transcription-started", (ev) => {
|
||||
showToast(t("transcription_enabled"), "success");
|
||||
daily?.updateCustomTrayButtons({
|
||||
transcription: {
|
||||
label: "Stop",
|
||||
tooltip: "Stop transcription",
|
||||
iconPath: `${WEBAPP_URL}/sparkles-red.svg`,
|
||||
iconPathDarkMode: `${WEBAPP_URL}/sparkles-red.svg`,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
useDailyEvent("transcription-stopped", (ev) => {
|
||||
showToast(t("transcription_stopped"), "success");
|
||||
daily?.updateCustomTrayButtons({
|
||||
transcription: {
|
||||
label: "Cal.ai",
|
||||
tooltip: "Transcription powered by AI",
|
||||
iconPath: `${WEBAPP_URL}/sparkles`,
|
||||
iconPathDarkMode: `${WEBAPP_URL}/sparkles`,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
useDailyEvent("custom-button-click", (ev) => {
|
||||
@@ -68,11 +81,13 @@ export const CalAiTranscribe = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Toaster position="bottom-right" />
|
||||
<div
|
||||
id="cal-ai-thing"
|
||||
style={{
|
||||
textShadow: "0 0 20px black, 0 0 20px black, 0 0 20px black",
|
||||
}}
|
||||
ref={transcriptRef}
|
||||
className="max-h-full overflow-x-hidden overflow-y-scroll p-2 text-center text-white">
|
||||
className="max-h-full overflow-x-hidden overflow-y-scroll p-8 text-center text-white">
|
||||
{transcript
|
||||
? transcript.split("\n").map((line, i) => (
|
||||
<Fragment key={`transcript-${i}`}>
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function JoinCall(props: PageProps) {
|
||||
customTrayButtons: {
|
||||
transcription: {
|
||||
label: "Cal.ai",
|
||||
tooltip: "Toggle real time transcription powered by AI",
|
||||
tooltip: "Transcription powered by AI",
|
||||
iconPath: `${WEBAPP_URL}/sparkles.svg`,
|
||||
iconPathDarkMode: `${WEBAPP_URL}/sparkles.svg`,
|
||||
},
|
||||
@@ -103,12 +103,12 @@ export default function JoinCall(props: PageProps) {
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
className="fixed z-10 inline-block h-4"
|
||||
className="fixed z-10 hidden h-5 sm:inline-block"
|
||||
src={`${WEBSITE_URL}/cal-logo-word-dark.svg`}
|
||||
alt="Logo"
|
||||
style={{
|
||||
top: 9,
|
||||
left: "calc(50% - 45px)",
|
||||
top: 47,
|
||||
left: 20,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -595,14 +595,9 @@ export default function Signup({
|
||||
</div>
|
||||
<div>
|
||||
<img
|
||||
src="/product-cards/trustpilot.svg"
|
||||
className="block h-[54px] w-full dark:hidden"
|
||||
alt="Trustpilot Rating of 4.7 Stars"
|
||||
/>
|
||||
<img
|
||||
src="/product-cards/trustpilot-dark.svg"
|
||||
className="hidden h-[54px] w-full dark:block"
|
||||
alt="Trustpilot Rating of 4.7 Stars"
|
||||
src="/product-cards/google-reviews.svg"
|
||||
className="h-[54px] w-full"
|
||||
alt="Google Reviews Rating of 4.7 Stars"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<svg width="165" height="77" viewBox="0 0 165 77" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.7986 19.2884L20.7082 24L18.6092 15.12L25.5973 9.14526L16.3951 8.37474L12.7986 0L9.20222 8.37474L0 9.14526L6.98805 15.12L4.88908 24L12.7986 19.2884Z" fill="#FBBC04"/>
|
||||
<path d="M46.7986 19.2884L54.7082 24L52.6092 15.12L59.5973 9.14526L50.3951 8.37474L46.7986 0L43.2022 8.37474L34 9.14526L40.9881 15.12L38.8891 24L46.7986 19.2884Z" fill="#FBBC04"/>
|
||||
<path d="M79.7986 19.2884L87.7082 24L85.6092 15.12L92.5973 9.14526L83.3951 8.37474L79.7986 0L76.2022 8.37474L67 9.14526L73.9881 15.12L71.8891 24L79.7986 19.2884Z" fill="#FBBC04"/>
|
||||
<path d="M113.799 19.2884L121.708 24L119.609 15.12L126.597 9.14526L117.395 8.37474L113.799 0L110.202 8.37474L101 9.14526L107.988 15.12L105.889 24L113.799 19.2884Z" fill="#FBBC04"/>
|
||||
<path d="M147.799 19.2884L155.708 24L153.609 15.12L160.597 9.14526L151.395 8.37474L147.799 0L144.202 8.37474L135 9.14526L141.988 15.12L139.889 24L147.799 19.2884Z" fill="#FBBC04"/>
|
||||
<path d="M39.54 56.9268C39.54 55.5943 39.4204 54.313 39.1983 53.083H21.5V60.3605H31.6133C31.1692 62.7009 29.8367 64.6826 27.8379 66.0151V70.7472H33.9367C37.49 67.4672 39.54 62.6497 39.54 56.9268Z" fill="#4285F4"/>
|
||||
<path d="M21.5 75.2921C26.5737 75.2921 30.8275 73.6179 33.9366 70.7479L27.8379 66.0158C26.1637 67.1433 24.0283 67.8266 21.5 67.8266C16.6141 67.8266 12.4629 64.5296 10.9766 60.0879H4.72412V64.9396C7.8162 71.0725 14.1541 75.2921 21.5 75.2921Z" fill="#34A853"/>
|
||||
<path d="M10.9766 60.0706C10.6008 58.9431 10.3787 57.7473 10.3787 56.5002C10.3787 55.2531 10.6008 54.0573 10.9766 52.9298V48.0781H4.72409C3.44284 50.6065 2.70825 53.4594 2.70825 56.5002C2.70825 59.541 3.44284 62.394 4.72409 64.9223L9.59284 61.1298L10.9766 60.0706Z" fill="#FBBC05"/>
|
||||
<path d="M21.5 45.1905C24.2675 45.1905 26.7275 46.1472 28.692 47.9922L34.0733 42.6109C30.8104 39.5701 26.5737 37.708 21.5 37.708C14.1541 37.708 7.8162 41.9276 4.72412 48.0776L10.9766 52.9293C12.4629 48.4876 16.6141 45.1905 21.5 45.1905Z" fill="#EA4335"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,7 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 3L10.088 8.813C9.99015 9.11051 9.82379 9.38088 9.60234 9.60234C9.38088 9.82379 9.11051 9.99015 8.813 10.088L3 12L8.813 13.912C9.11051 14.0099 9.38088 14.1762 9.60234 14.3977C9.82379 14.6191 9.99015 14.8895 10.088 15.187L12 21L13.912 15.187C14.0099 14.8895 14.1762 14.6191 14.3977 14.3977C14.6191 14.1762 14.8895 14.0099 15.187 13.912L21 12L15.187 10.088C14.8895 9.99015 14.6191 9.82379 14.3977 9.60234C14.1762 9.38088 14.0099 9.11051 13.912 8.813L12 3Z" stroke="#F63035" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5 3V7" stroke="#F63035" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M19 17V21" stroke="#F63035" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3 5H7" stroke="#F63035" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M17 19H21" stroke="#F63035" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -133,6 +133,14 @@ const BookerComponent = ({
|
||||
onToggleCalendar,
|
||||
} = calendars;
|
||||
|
||||
const scrolledToTimeslotsOnce = useRef(false);
|
||||
const scrollToTimeSlots = () => {
|
||||
if (isMobile && !isEmbed && !scrolledToTimeslotsOnce.current) {
|
||||
timeslotsRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||
scrolledToTimeslotsOnce.current = true;
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (event.isPending) return setBookerState("loading");
|
||||
if (!selectedDate) return setBookerState("selecting_date");
|
||||
@@ -327,7 +335,7 @@ const BookerComponent = ({
|
||||
{!hideEventTypeDetails && orgBannerUrl && !isPlatform && (
|
||||
<img
|
||||
loading="eager"
|
||||
className="-mb-9 h-28 max-h-28 rounded-tl-md sm:max-h-24"
|
||||
className="-mb-9 ltr:rounded-tl-md rtl:rounded-tr-md"
|
||||
alt="org banner"
|
||||
src={orgBannerUrl}
|
||||
/>
|
||||
@@ -346,7 +354,7 @@ const BookerComponent = ({
|
||||
{layout !== BookerLayouts.MONTH_VIEW &&
|
||||
!(layout === "mobile" && bookerState === "booking") && (
|
||||
<div className="mt-auto px-5 py-3 ">
|
||||
<DatePicker event={event} schedule={schedule} />
|
||||
<DatePicker event={event} schedule={schedule} scrollToTimeSlots={scrollToTimeSlots} />
|
||||
</div>
|
||||
)}
|
||||
</BookerSection>
|
||||
@@ -379,6 +387,7 @@ const BookerComponent = ({
|
||||
}}
|
||||
event={event}
|
||||
schedule={schedule}
|
||||
scrollToTimeSlots={scrollToTimeSlots}
|
||||
/>
|
||||
</BookerSection>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ export const DatePicker = ({
|
||||
event,
|
||||
schedule,
|
||||
classNames,
|
||||
scrollToTimeSlots,
|
||||
}: {
|
||||
event: useEventReturnType;
|
||||
schedule: useScheduleForEventReturnType;
|
||||
@@ -25,6 +26,7 @@ export const DatePicker = ({
|
||||
datePickerDatesActive?: string;
|
||||
datePickerToggle?: string;
|
||||
};
|
||||
scrollToTimeSlots?: () => void;
|
||||
}) => {
|
||||
const { i18n } = useLocale();
|
||||
const [month, selectedDate] = useBookerStore((state) => [state.month, state.selectedDate], shallow);
|
||||
@@ -59,6 +61,7 @@ export const DatePicker = ({
|
||||
selected={dayjs(selectedDate)}
|
||||
weekStart={weekdayToWeekIndex(event?.data?.users?.[0]?.weekStart)}
|
||||
slots={schedule?.data?.slots}
|
||||
scrollToTimeSlots={scrollToTimeSlots}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -152,6 +152,7 @@ const Days = ({
|
||||
datePickerDate?: string;
|
||||
datePickerDateActive?: string;
|
||||
};
|
||||
scrollToTimeSlots?: () => void;
|
||||
}) => {
|
||||
// Create placeholder elements for empty days in first week
|
||||
const weekdayOfFirst = browsingDate.date(1).day();
|
||||
@@ -267,6 +268,7 @@ const Days = ({
|
||||
date={day}
|
||||
onClick={() => {
|
||||
props.onChange(day);
|
||||
props?.scrollToTimeSlots?.();
|
||||
}}
|
||||
disabled={disabled}
|
||||
active={isActive(day)}
|
||||
@@ -302,6 +304,7 @@ const DatePicker = ({
|
||||
datePickerDatesActive?: string;
|
||||
datePickerToggle?: string;
|
||||
};
|
||||
scrollToTimeSlots?: () => void;
|
||||
}) => {
|
||||
const browsingDate = passThroughProps.browsingDate || dayjs().startOf("month");
|
||||
const { i18n } = useLocale();
|
||||
|
||||
Reference in new issue
Block a user