Page rename
This commit is contained in:
parent
95241d0d19
commit
86c82a74e4
@ -13,14 +13,15 @@ type FolderType = 'Notes' | 'Diary' | 'Health' | 'Contacts';
|
|||||||
interface FolderConfig {
|
interface FolderConfig {
|
||||||
icon: LucideIcon;
|
icon: LucideIcon;
|
||||||
order: number;
|
order: number;
|
||||||
|
displayName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define folder order and icons
|
// Define folder order, icons and display names
|
||||||
const FOLDER_CONFIG: Record<FolderType, FolderConfig> = {
|
const FOLDER_CONFIG: Record<FolderType, FolderConfig> = {
|
||||||
'Notes': { icon: FileText, order: 1 },
|
'Notes': { icon: FileText, order: 1, displayName: 'Bloc-notes' },
|
||||||
'Diary': { icon: Calendar, order: 2 },
|
'Diary': { icon: Calendar, order: 2, displayName: 'Journal' },
|
||||||
'Health': { icon: Heart, order: 3 },
|
'Health': { icon: Heart, order: 3, displayName: 'Carnet Santé' },
|
||||||
'Contacts': { icon: Users, order: 4 }
|
'Contacts': { icon: Users, order: 4, displayName: 'Carnet d\'adresses' }
|
||||||
};
|
};
|
||||||
|
|
||||||
interface ContactFile {
|
interface ContactFile {
|
||||||
@ -128,7 +129,10 @@ export default function Navigation({ nextcloudFolders, onFolderSelect }: Navigat
|
|||||||
<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">
|
||||||
{sortedFolders.map((folder) => {
|
{sortedFolders.map((folder) => {
|
||||||
const Icon = getFolderIcon(folder);
|
const config = FOLDER_CONFIG[folder as FolderType];
|
||||||
|
const Icon = config?.icon || FileText;
|
||||||
|
const displayName = config?.displayName || folder;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={folder}>
|
<div key={folder}>
|
||||||
<button
|
<button
|
||||||
@ -142,7 +146,7 @@ export default function Navigation({ nextcloudFolders, onFolderSelect }: Navigat
|
|||||||
className="w-full flex items-center space-x-2 px-3 py-2 text-sm rounded-md text-carnet-text-primary hover:bg-carnet-hover"
|
className="w-full flex items-center space-x-2 px-3 py-2 text-sm rounded-md text-carnet-text-primary hover:bg-carnet-hover"
|
||||||
>
|
>
|
||||||
<Icon className="h-4 w-4" />
|
<Icon className="h-4 w-4" />
|
||||||
<span>{folder}</span>
|
<span>{displayName}</span>
|
||||||
{folder === 'Contacts' && (
|
{folder === 'Contacts' && (
|
||||||
<ChevronRight
|
<ChevronRight
|
||||||
className={`h-4 w-4 transition-transform ${
|
className={`h-4 w-4 transition-transform ${
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user