carnet panel
This commit is contained in:
parent
c5773cba01
commit
4f85ca7ff1
@ -1,12 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Search, BookOpen, Tag, Trash2, Star, Archive, X, Folder, FileText, Calendar, Heart, Users, LucideIcon, Layout } from 'lucide-react';
|
import { Search, BookOpen, Tag, Trash2, Star, Archive, X, Folder, FileText, Calendar, Heart, Users, LucideIcon } from 'lucide-react';
|
||||||
import { PaneLayout } from '@/app/carnet/page';
|
|
||||||
|
|
||||||
interface NavigationProps {
|
interface NavigationProps {
|
||||||
layout: string;
|
|
||||||
onLayoutChange: (layout: string) => void;
|
|
||||||
nextcloudFolders: string[];
|
nextcloudFolders: string[];
|
||||||
onFolderSelect: (folder: string) => void;
|
onFolderSelect: (folder: string) => void;
|
||||||
}
|
}
|
||||||
@ -26,7 +23,7 @@ const FOLDER_CONFIG: Record<FolderType, FolderConfig> = {
|
|||||||
'Contacts': { icon: Users, order: 4 }
|
'Contacts': { icon: Users, order: 4 }
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Navigation({ layout, onLayoutChange, nextcloudFolders, onFolderSelect }: NavigationProps) {
|
export default function Navigation({ nextcloudFolders, onFolderSelect }: NavigationProps) {
|
||||||
const [searchQuery, setSearchQuery] = useState('');
|
const [searchQuery, setSearchQuery] = useState('');
|
||||||
|
|
||||||
const getFolderIcon = (folder: string) => {
|
const getFolderIcon = (folder: string) => {
|
||||||
@ -75,40 +72,10 @@ export default function Navigation({ layout, onLayoutChange, nextcloudFolders, o
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Layout Selection */}
|
|
||||||
<div className="p-4 border-b border-carnet-border">
|
|
||||||
<div className="flex items-center space-x-2">
|
|
||||||
<Layout className="h-4 w-4 text-carnet-text-muted" />
|
|
||||||
<span className="text-sm font-medium text-carnet-text-primary">Vues</span>
|
|
||||||
</div>
|
|
||||||
<div className="mt-2 space-y-1">
|
|
||||||
<button
|
|
||||||
onClick={() => onLayoutChange('item-selection')}
|
|
||||||
className={`w-full px-3 py-2 text-sm rounded-md ${
|
|
||||||
layout === 'item-selection'
|
|
||||||
? 'bg-primary text-white'
|
|
||||||
: 'text-carnet-text-primary hover:bg-carnet-hover'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
Liste
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={() => onLayoutChange('table-view')}
|
|
||||||
className={`w-full px-3 py-2 text-sm rounded-md ${
|
|
||||||
layout === 'table-view'
|
|
||||||
? 'bg-primary text-white'
|
|
||||||
: 'text-carnet-text-primary hover:bg-carnet-hover'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
Tableau
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Folders */}
|
{/* Folders */}
|
||||||
<div className="flex-1 overflow-y-auto p-4">
|
<div className="flex-1 overflow-y-auto p-4">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
{nextcloudFolders.map((folder) => {
|
{sortedFolders.map((folder) => {
|
||||||
const Icon = getFolderIcon(folder);
|
const Icon = getFolderIcon(folder);
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user