"use client"; import { useTranslations } from 'next-intl'; import { useAuthStore } from '@/stores/auth-store'; import { useEmailStore } from '@/stores/email-store'; import { SettingsSection, SettingItem } from './settings-section'; import { formatFileSize } from '@/lib/utils'; export function AccountSettings() { const t = useTranslations('settings.account'); const { username, serverUrl } = useAuthStore(); const { quota } = useEmailStore(); const quotaPercentage = quota ? Math.round((quota.used / quota.total) * 100) : 0; return ( {/* Email Address */} {username || t('../../common.unknown')} {/* Server */} {serverUrl || t('../../common.unknown')} {/* Storage */} {quota && quota.total > 0 && (
{t('storage.percentage', { percent: quotaPercentage })}
)} ); }