carnet panel
This commit is contained in:
parent
06a1f87422
commit
c5773cba01
@ -21,13 +21,16 @@ interface Note {
|
|||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
content: string;
|
content: string;
|
||||||
lastEdited: Date;
|
lastModified: string;
|
||||||
|
type: string;
|
||||||
|
mime: string;
|
||||||
|
etag: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CarnetPage() {
|
export default function CarnetPage() {
|
||||||
const { data: session, status } = useSession();
|
const { data: session, status } = useSession();
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
const [layoutMode, setLayoutMode] = useState<PaneLayout>(PaneLayout.ItemSelection);
|
const [layoutMode, setLayoutMode] = useState<string>("item-selection");
|
||||||
const [selectedNote, setSelectedNote] = useState<Note | null>(null);
|
const [selectedNote, setSelectedNote] = useState<Note | null>(null);
|
||||||
const [isMobile, setIsMobile] = useState(false);
|
const [isMobile, setIsMobile] = useState(false);
|
||||||
const [showNav, setShowNav] = useState(true);
|
const [showNav, setShowNav] = useState(true);
|
||||||
@ -142,7 +145,7 @@ export default function CarnetPage() {
|
|||||||
const handleFolderSelect = (folder: string) => {
|
const handleFolderSelect = (folder: string) => {
|
||||||
console.log('Selected folder:', folder);
|
console.log('Selected folder:', folder);
|
||||||
setSelectedFolder(folder);
|
setSelectedFolder(folder);
|
||||||
setLayoutMode(PaneLayout.ItemSelection);
|
setLayoutMode("item-selection");
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
|
|||||||
@ -26,12 +26,7 @@ const FOLDER_CONFIG: Record<FolderType, FolderConfig> = {
|
|||||||
'Contacts': { icon: Users, order: 4 }
|
'Contacts': { icon: Users, order: 4 }
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Navigation: React.FC<NavigationProps> = ({
|
export default function Navigation({ layout, onLayoutChange, nextcloudFolders, onFolderSelect }: NavigationProps) {
|
||||||
layout,
|
|
||||||
onLayoutChange,
|
|
||||||
nextcloudFolders,
|
|
||||||
onFolderSelect,
|
|
||||||
}) => {
|
|
||||||
const [searchQuery, setSearchQuery] = useState('');
|
const [searchQuery, setSearchQuery] = useState('');
|
||||||
|
|
||||||
const getFolderIcon = (folder: string) => {
|
const getFolderIcon = (folder: string) => {
|
||||||
@ -130,4 +125,4 @@ export const Navigation: React.FC<NavigationProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
@ -8,8 +8,8 @@ import { fr } from 'date-fns/locale';
|
|||||||
interface Note {
|
interface Note {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
content: string;
|
||||||
lastModified: string;
|
lastModified: string;
|
||||||
size: number;
|
|
||||||
type: string;
|
type: string;
|
||||||
mime: string;
|
mime: string;
|
||||||
etag: string;
|
etag: string;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user