{t('nav.profile', 'Profile')} · OxiCloud

{t('nav.profile', 'Profile')}

{#if session.user}
{#if session.user.image && !avatarImgFailed} {initials} (avatarImgFailed = true)} /> {:else} {initials} {/if}

{session.user.username || session.user.email || '—'}

{session.user.email}
{isAdmin ? t('profile.role_admin', 'Administrator') : t('profile.role_user', 'User')} {#if isOidc && session.user.image}

{t('profile.photo_managed_by_oidc', 'Photo managed by your identity provider.')}

{/if}
{#if canEditImage} {/if}
{#if canEditImage && avatarEditOpen}
{#if avatarTab === 'url'} {t('profile.photo_url_hint', 'https://, http://, or data:image/…;base64,… accepted')} {:else} {#if avatarPreview} {t('profile.avatar', {/if} {t( 'profile.photo_resize_note', 'Images larger than 512 × 512 px are automatically resized.' )} {/if}
{#if session.user.image} {/if}
{/if}

{t('profile.account_details', 'Account Details')}

{t('profile.username', 'Username')}
{session.user.username || '—'}
{t('profile.email', 'Email')}
{session.user.email}
{t('profile.role', 'Role')}
{isAdmin ? t('profile.role_admin', 'Administrator') : t('profile.role_user', 'User')}
{t('profile.last_login', 'Last Login')}
{timeAgo(session.user.last_login_at)}

{t('profile.storage', 'Storage')}

{formatBytes(session.user.storage_used_bytes)}
{t('profile.used', 'Used')}
{session.user.storage_quota_bytes > 0 ? formatBytes(session.user.storage_quota_bytes) : '∞'}
{t('profile.quota', 'Quota')}
{session.user.storage_quota_bytes > 0 ? `${storagePct}%` : '—'}
{t('profile.usage', 'Usage')}

{t('profile.edit_profile', 'Edit Profile')}

{#if isOidc}
{t( 'profile.edit_oidc_managed', 'To change your information (name, profile picture, …), please update it at your identity provider. Your changes will appear on your next sign-in.' )}
{:else}
{/if}
{#if !appPwLoadFailed}

{t('profile.app_passwords', 'App Passwords')}

{t( 'profile.app_pw_desc', 'Generate passwords for WebDAV, CalDAV, and CardDAV clients. Each password is shown only once.' )}

{#if generated}
{t('profile.new_password_for', 'New password for')} {generated.label}:
{generated.password}
{t( 'profile.copy_warning', "Copy this password now. You won't be able to see it again." )}
{/if} {#if userPasswords.length === 0}

{t('profile.no_app_passwords', 'No app passwords yet.')}

{:else} {#each userPasswords as p (p.id)} {/each}
{t('profile.col_label', 'Label')} {t('profile.col_created', 'Created')} {t('profile.col_last_used', 'Last Used')} {t('profile.col_status', 'Status')}
{p.label} {formatDate(p.created_at)} {p.last_used_at ? timeAgo(p.last_used_at) : t('profile.never', 'Never')} {#if p.active !== false} {t('profile.active', 'Active')} {:else} {t('profile.revoked', 'Revoked')} {/if} {#if p.active !== false} {/if}
{/if} {#if autoPasswords.length > 0}
{#if autoExpanded}

{t( 'profile.client_sessions_desc', 'Auto-generated when you connect a Nextcloud-compatible client.' )}

{#each autoPasswords as p (p.id)} {/each}
{t('profile.col_client', 'Client')} {t('profile.col_created', 'Created')} {t('profile.col_last_used', 'Last Used')}
{p.label} {formatDate(p.created_at)} {p.last_used_at ? timeAgo(p.last_used_at) : t('profile.never', 'Never')} {#if p.active !== false} {/if}
{/if}
{/if}
{/if} {#if showPasswordCard}

{t('profile.change_password', 'Change Password')}

{/if} {:else}

{t('common.loading', 'Loading…')}

{/if}