This implements a basic CardDav UI, titled "Contacts". It allows creating new contacts with a first name + last name, and editing their first and last names, main email, main phone, and notes. You can also import and export VCF (VCARD) files. It also allows editing the VCARD directly, for power users. Additionally, you can choose, create, or delete address books, and if there's no address book created yet in your CardDav server (first-time setup), it'll automatically create one, titled "Contacts". Finally, there are some dependency updates and a fix for the config not allowing disabling the `cardDav` or the `calDav` server. Related to #56
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { Directory, DirectoryFile } from '/lib/types.ts';
|
|
import MainFiles from '/components/files/MainFiles.tsx';
|
|
|
|
interface FilesWrapperProps {
|
|
initialDirectories: Directory[];
|
|
initialFiles: DirectoryFile[];
|
|
initialPath: string;
|
|
baseUrl: string;
|
|
isFileSharingAllowed: boolean;
|
|
isCalDavEnabled?: boolean;
|
|
fileShareId?: string;
|
|
}
|
|
|
|
// This wrapper is necessary because islands need to be the first frontend component, but they don't support functions as props, so the more complex logic needs to live in the component itself
|
|
export default function FilesWrapper(
|
|
{
|
|
initialDirectories,
|
|
initialFiles,
|
|
initialPath,
|
|
baseUrl,
|
|
isFileSharingAllowed,
|
|
isCalDavEnabled,
|
|
fileShareId,
|
|
}: FilesWrapperProps,
|
|
) {
|
|
return (
|
|
<MainFiles
|
|
initialDirectories={initialDirectories}
|
|
initialFiles={initialFiles}
|
|
initialPath={initialPath}
|
|
baseUrl={baseUrl}
|
|
isFileSharingAllowed={isFileSharingAllowed}
|
|
isCalDavEnabled={isCalDavEnabled}
|
|
fileShareId={fileShareId}
|
|
/>
|
|
);
|
|
}
|