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.
58 lines
1.6 KiB
TypeScript
58 lines
1.6 KiB
TypeScript
"use client"
|
|
|
|
import { useEffect, useMemo } from "react"
|
|
import { DemoChrome } from "@/components/demo/demo-chrome"
|
|
import { RichTextDocumentEditor } from "@/components/drive/richtext-document"
|
|
import { SuiteThemeShell } from "@/components/suite/suite-theme-shell"
|
|
import type { RichTextSessionResponse } from "@/lib/drive/richtext-types"
|
|
|
|
const DEMO_SESSION: RichTextSessionResponse = {
|
|
roomId: "demo-docs",
|
|
canonicalPath: "/Démo/Bienvenue dans UltiDocs.ultidoc.json",
|
|
wsUrl: "",
|
|
token: "",
|
|
mode: "edit",
|
|
importRequired: false,
|
|
collaboration: false,
|
|
documentUrl: "/demo/ultidoc-sample.json",
|
|
saveUrl: "/api/demo/richtext-save",
|
|
}
|
|
|
|
/** Éditeur UltiDocs réel, sans backend : contenu seedé, sauvegarde no-op (zéro rétention). */
|
|
export function DemoDocsEditor() {
|
|
useEffect(() => {
|
|
document.documentElement.dataset.routeScope = "drive"
|
|
}, [])
|
|
|
|
const chrome = useMemo(
|
|
() => ({
|
|
title: "Bienvenue dans UltiDocs",
|
|
showBack: false,
|
|
showShare: false,
|
|
showAccount: false,
|
|
trailing: (
|
|
<span className="rounded-full border border-[var(--mail-border)] px-2.5 py-1 text-[11px] font-medium text-muted-foreground">
|
|
Démo — zéro rétention
|
|
</span>
|
|
),
|
|
}),
|
|
[]
|
|
)
|
|
|
|
return (
|
|
<SuiteThemeShell>
|
|
<DemoChrome>
|
|
<div className="flex h-dvh flex-col overflow-hidden">
|
|
<RichTextDocumentEditor
|
|
session={DEMO_SESSION}
|
|
mode="edit"
|
|
userName="Visiteur"
|
|
userColor="#4f6df5"
|
|
chrome={chrome}
|
|
/>
|
|
</div>
|
|
</DemoChrome>
|
|
</SuiteThemeShell>
|
|
)
|
|
}
|