chore: fixed a few cal.ai ui issues and cal.video logo (#15044)
This commit is contained in:
1 parent
f28c2645db
commit
96e93138e7
4 files changed
+33
-11
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,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user