ultisuite-client/components/drive/drive-view-mode-toggle.tsx
R3D347HR4Y 6ec95262af Add OnlyOffice integration and update project configurations
- Updated .env.example to include configuration for OnlyOffice Document Server.
- Modified the workspace configuration to remove the drive-suite path.
- Adjusted TypeScript environment imports for consistency.
- Enhanced Next.js configuration to disable canvas in Webpack.
- Updated package.json to include new dependencies for OnlyOffice and PDF.js.
- Added global styles for OnlyOffice theme integration in the CSS.
- Created new layout and page components for the Drive feature, including public sharing and editing functionalities.
- Updated metadata handling across various layouts to reflect the new app structure.
2026-06-07 15:49:21 +02:00

47 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client"
import { Grid3X3, List } from "lucide-react"
import { Button } from "@/components/ui/button"
import { useDriveSettingsStore } from "@/lib/stores/drive-settings-store"
import { cn } from "@/lib/utils"
export function DriveViewModeToggle() {
const viewMode = useDriveSettingsStore((s) => s.viewMode)
const setViewMode = useDriveSettingsStore((s) => s.setViewMode)
return (
<div
className="flex shrink-0 items-center rounded-full border border-mail-border-subtle bg-mail-surface-muted p-0.5"
role="group"
aria-label="Mode daffichage"
>
<Button
type="button"
variant="ghost"
size="icon"
className={cn(
"h-7 w-7 rounded-full",
viewMode === "list" && "bg-mail-surface shadow-sm"
)}
onClick={() => setViewMode("list")}
aria-pressed={viewMode === "list"}
>
<List className="h-4 w-4 text-[#5f6368]" />
</Button>
<Button
type="button"
variant="ghost"
size="icon"
className={cn(
"h-7 w-7 rounded-full",
viewMode === "grid" && "bg-mail-surface shadow-sm"
)}
onClick={() => setViewMode("grid")}
aria-pressed={viewMode === "grid"}
>
<Grid3X3 className="h-4 w-4 text-[#5f6368]" />
</Button>
</div>
)
}