- 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.
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
"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 d’affichage"
|
||
>
|
||
<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>
|
||
)
|
||
}
|