diff --git a/webui/src/api/addresses.ts b/webui/src/api/addresses.ts index 7e8a8fb..090259e 100644 --- a/webui/src/api/addresses.ts +++ b/webui/src/api/addresses.ts @@ -450,7 +450,7 @@ export async function listAddressSyncSources( export function discoverCardDavAddressBooks( settings: ApiSettings, - payload: { url: string; auth_type: "none" | "basic" | "bearer"; username?: string | null; password?: string | null; bearer_token?: string | null; credential_ref?: string | null } + payload: { url: string; auth_type: "none" | "basic" | "bearer"; username?: string | null; password?: string | null; bearer_token?: string | null } ): Promise { return apiFetch(settings, "/api/v1/addresses/carddav/discover", { method: "POST", @@ -468,7 +468,6 @@ export function createCardDavSyncSource( username?: string | null; password?: string | null; bearer_token?: string | null; - credential_ref?: string | null; sync_direction: "read_only" | "import" | "export" | "two_way"; read_only?: boolean | null; sync_token?: string | null; diff --git a/webui/src/features/addressbook/AddressBookPage.tsx b/webui/src/features/addressbook/AddressBookPage.tsx index 5e350f4..45058bf 100644 --- a/webui/src/features/addressbook/AddressBookPage.tsx +++ b/webui/src/features/addressbook/AddressBookPage.tsx @@ -6,10 +6,12 @@ import { ConfirmDialog, Dialog, DisabledActionTooltip, + DismissibleAlert, ExplorerTree, fetchAuthGroups, FormField, LoadingFrame, + PasswordField, StatusBadge, ToggleSwitch, hasScope, @@ -141,7 +143,6 @@ type CardDavFormState = { username: string; password: string; bearer_token: string; - credential_ref: string; sync_direction: "read_only" | "import" | "export" | "two_way"; }; @@ -198,7 +199,6 @@ const EMPTY_CARDDAV_FORM: CardDavFormState = { username: "", password: "", bearer_token: "", - credential_ref: "", sync_direction: "read_only" }; @@ -1528,8 +1528,7 @@ export default function AddressBookPage({ settings, auth, onAuthChange }: Props) auth_type: cardDavForm.auth_type, username: cardDavForm.username || null, password: cardDavForm.password || null, - bearer_token: cardDavForm.bearer_token || null, - credential_ref: cardDavForm.credential_ref || null + bearer_token: cardDavForm.bearer_token || null }; } @@ -1570,7 +1569,6 @@ export default function AddressBookPage({ settings, auth, onAuthChange }: Props) username: cardDavForm.username || null, password: cardDavForm.password || null, bearer_token: cardDavForm.bearer_token || null, - credential_ref: cardDavForm.credential_ref || null, sync_direction: cardDavForm.sync_direction, read_only: cardDavForm.sync_direction === "read_only" || cardDavForm.sync_direction === "import" }); @@ -1927,8 +1925,8 @@ export default function AddressBookPage({ settings, auth, onAuthChange }: Props) return (
- {error &&
{error}
} - {notice && !error &&
{notice}
} + {error && {error}} + {notice && !error && {notice}}
@@ -2273,18 +2271,15 @@ export default function AddressBookPage({ settings, auth, onAuthChange }: Props) setCardDavForm((current) => ({ ...current, username: event.target.value }))} /> - setCardDavForm((current) => ({ ...current, password: event.target.value }))} /> + setCardDavForm((current) => ({ ...current, password: value }))} autoComplete="new-password" />
} {cardDavForm.auth_type === "bearer" && - setCardDavForm((current) => ({ ...current, bearer_token: event.target.value }))} /> + setCardDavForm((current) => ({ ...current, bearer_token: value }))} autoComplete="new-password" /> } - - setCardDavForm((current) => ({ ...current, credential_ref: event.target.value }))} placeholder="env:GOVOPLAN_CARDDAV_PASSWORD" /> - {cardDavDiscovery.length > 0 &&
{cardDavDiscovery.map((item) => ( @@ -2325,7 +2320,7 @@ export default function AddressBookPage({ settings, auth, onAuthChange }: Props) {syncInspector.source.read_only && }

Last attempt: {formatDateTime(syncInspector.source.last_attempted_at)} ยท Last success: {formatDateTime(syncInspector.source.last_success_at)}

- {syncInspector.source.last_error &&

{syncInspector.source.last_error}

} + {syncInspector.source.last_error && {syncInspector.source.last_error}}
}
{conflictDialog.metadata?.message &&

{String(conflictDialog.metadata.message)}

} - {!canApplyRemoteConflict(conflictDialog) &&

This conflict predates stored field payloads or came from a stale write. It can be marked resolved or ignored, but the remote value cannot be applied automatically.

} + {!canApplyRemoteConflict(conflictDialog) && This conflict predates stored field payloads or came from a stale write. It can be marked resolved or ignored, but the remote value cannot be applied automatically.}
Field
diff --git a/webui/src/styles/addresses.css b/webui/src/styles/addresses.css index 9b0adff..d4c86fa 100644 --- a/webui/src/styles/addresses.css +++ b/webui/src/styles/addresses.css @@ -617,37 +617,6 @@ width: 30px; } -.form-grid { - display: grid; - gap: 12px; -} - -.form-grid.two { - grid-template-columns: repeat(2, minmax(0, 1fr)); -} - -.form-grid.three { - grid-template-columns: repeat(3, minmax(0, 1fr)); -} - -.form-grid.four { - grid-template-columns: repeat(4, minmax(0, 1fr)); -} - -.inline-actions { - justify-content: flex-end; -} - -.inline-actions .btn { - align-items: center; - aspect-ratio: 1; - display: inline-flex; - justify-content: center; - min-height: 30px; - padding: 0; - width: 30px; -} - .strong-link { font-weight: 700; } @@ -677,9 +646,6 @@ @media (max-width: 980px) { .address-book-workspace, - .form-grid.two, - .form-grid.three, - .form-grid.four, .address-form-row-email, .address-form-row-phone, .address-form-row-postal {