Basic CardDav UI (Contacts)
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
This commit is contained in:
@@ -56,6 +56,12 @@ export default function Header({ route, user, enabledApps }: Data) {
|
||||
label: 'Expenses',
|
||||
}
|
||||
: null,
|
||||
enabledApps.includes('contacts')
|
||||
? {
|
||||
url: '/contacts',
|
||||
label: 'Contacts',
|
||||
}
|
||||
: null,
|
||||
];
|
||||
|
||||
const menuItems = potentialMenuItems.filter(Boolean) as MenuItem[];
|
||||
@@ -77,6 +83,10 @@ export default function Header({ route, user, enabledApps }: Data) {
|
||||
pageLabel = 'Budgets & Expenses';
|
||||
}
|
||||
|
||||
if (route.startsWith('/contacts')) {
|
||||
pageLabel = 'Contacts';
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
|
||||
@@ -48,7 +48,6 @@ interface MainFilesProps {
|
||||
initialPath: string;
|
||||
baseUrl: string;
|
||||
isFileSharingAllowed: boolean;
|
||||
isCardDavEnabled?: boolean;
|
||||
isCalDavEnabled?: boolean;
|
||||
fileShareId?: string;
|
||||
}
|
||||
@@ -60,7 +59,6 @@ export default function MainFiles(
|
||||
initialPath,
|
||||
baseUrl,
|
||||
isFileSharingAllowed,
|
||||
isCardDavEnabled,
|
||||
isCalDavEnabled,
|
||||
fileShareId,
|
||||
}: MainFilesProps,
|
||||
@@ -890,15 +888,6 @@ export default function MainFiles(
|
||||
)
|
||||
: null}
|
||||
|
||||
{!fileShareId && isCardDavEnabled
|
||||
? (
|
||||
<section class='flex flex-row items-center justify-start my-12'>
|
||||
<span class='font-semibold'>CardDav URL:</span>{' '}
|
||||
<code class='bg-slate-600 mx-2 px-2 py-1 rounded-md'>{baseUrl}/carddav</code>
|
||||
</section>
|
||||
)
|
||||
: null}
|
||||
|
||||
{!fileShareId && isCalDavEnabled
|
||||
? (
|
||||
<section class='flex flex-row items-center justify-start my-12'>
|
||||
|
||||
Reference in New Issue
Block a user