Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Introduced turbopack alias for canvas in next.config.mjs. - Updated package.json scripts for development and branding tasks. - Added new dependencies for Tiptap extensions. - Implemented new demo layouts for agenda, contacts, drive, and mail applications. - Enhanced globals.css for improved theming and splash screen animations. - Added OAuth callback handling for drive mounts. - Updated layout components to integrate new demo shells and improve structure.
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import type { AgendaCalendar } from "@/lib/agenda/agenda-types"
|
|
import type { AgendaVideoProvider } from "@/lib/agenda/agenda-settings-types"
|
|
import { videoProviderLabel } from "@/lib/agenda/agenda-settings-labels"
|
|
|
|
export type AgendaVideoIcon =
|
|
| { kind: "image"; src: string; alt: string }
|
|
| { kind: "iconify"; icon: string }
|
|
|
|
export const AGENDA_VIDEO_PROVIDER_ICONS: Record<
|
|
Exclude<AgendaVideoProvider, "none">,
|
|
AgendaVideoIcon
|
|
> = {
|
|
ultimeet: { kind: "image", src: "/ultimeet-mark.svg", alt: "UltiMeet" },
|
|
google_meet: { kind: "iconify", icon: "logos:google-meet" },
|
|
zoom: { kind: "iconify", icon: "logos:zoom-icon" },
|
|
teams: { kind: "iconify", icon: "logos:microsoft-teams" },
|
|
jitsi: { kind: "iconify", icon: "simple-icons:jitsi" },
|
|
}
|
|
|
|
export function newAgendaEventUid(): string {
|
|
return `${crypto.randomUUID()}@ulti`
|
|
}
|
|
|
|
export function agendaEventPath(calendar: AgendaCalendar, uid: string): string {
|
|
const base = calendar.path.endsWith("/") ? calendar.path : `${calendar.path}/`
|
|
return `${base}${uid}.ics`
|
|
}
|
|
|
|
export function videoToggleLabel(
|
|
provider: AgendaVideoProvider,
|
|
enabled: boolean,
|
|
): string {
|
|
if (provider === "none") return "Aucune visio"
|
|
const name = videoProviderLabel(provider)
|
|
return enabled ? `${name} activée` : `Ajouter ${name}`
|
|
}
|
|
|
|
export function videoJoinLabel(provider: AgendaVideoProvider): string {
|
|
return `Rejoindre ${videoProviderLabel(provider)}`
|
|
}
|
|
|
|
export function canAutoGenerateVideoLink(provider: AgendaVideoProvider): boolean {
|
|
return provider === "ultimeet"
|
|
}
|