diff --git a/web/src/components/Config.jsx b/web/src/components/Config.jsx index 4e99746..828e19d 100644 --- a/web/src/components/Config.jsx +++ b/web/src/components/Config.jsx @@ -220,28 +220,47 @@ function PanelProfile({ config, editProfile, profileForm, setProfileForm, setEdi if (!profile) { return ( -
-
{t('config.loadingProfile')}
+
+
+
{t('config.loadingProfile')}
+
) } + const personalKeys = Object.entries(profile).filter(([k, v]) => k !== 'preferences' && typeof v !== 'object') + const personalObj = Object.fromEntries(personalKeys) + const preferences = profile.preferences || null + return ( -
- -
- {editProfile ? ( - <> - - - +
+
+
{t('config.profileInfo') || 'Informations personnelles'}
+ +
+
+
{t('config.profilePrefs') || 'Préférences'}
+ {preferences ? ( + ) : ( - +
)}
+
+
+ {editProfile ? ( + <> + + + + ) : ( + + )} +
+
) } @@ -249,19 +268,10 @@ function PanelProfile({ config, editProfile, profileForm, setProfileForm, setEdi function RenderFields({ obj, path, editing, onChange, t }) { if (!obj || typeof obj !== 'object') return null - return Object.entries(obj).map(([key, value]) => { + return Object.entries(obj).filter(([, v]) => v === null || typeof v !== 'object').map(([key, value]) => { const fieldPath = path ? `${path}.${key}` : key const label = getFieldLabel(key, t) - if (value !== null && typeof value === 'object' && !Array.isArray(value)) { - return ( -
- {label} - -
- ) - } - if (editing) { if (typeof value === 'boolean') { return ( diff --git a/web/src/i18n/en.js b/web/src/i18n/en.js index 0b8b066..4303d7d 100644 --- a/web/src/i18n/en.js +++ b/web/src/i18n/en.js @@ -182,6 +182,8 @@ const en = { installed: 'Installed', missing: 'Missing', editProfile: 'Edit', + profileInfo: 'Personal Info', + profilePrefs: 'Preferences', cancel: 'Cancel', editProvider: 'Configure', validateKey: 'Validate', diff --git a/web/src/i18n/fr.js b/web/src/i18n/fr.js index 1e8f569..f54f3aa 100644 --- a/web/src/i18n/fr.js +++ b/web/src/i18n/fr.js @@ -182,6 +182,8 @@ const fr = { installed: 'Install\u00e9', missing: 'Manquant', editProfile: 'Modifier', + profileInfo: 'Informations personnelles', + profilePrefs: 'Préférences', editProvider: 'Configurer', validateKey: 'Valider', validating: 'V\u00e9rification...', diff --git a/web/src/styles/global.css b/web/src/styles/global.css index bc091b7..936f4ba 100644 --- a/web/src/styles/global.css +++ b/web/src/styles/global.css @@ -435,6 +435,10 @@ input::placeholder { color: var(--text-disabled); } .config-panel-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .config-panel-body { flex: 1; overflow-y: auto; padding: 16px 28px 28px; } +.config-profile-center { + max-width: 540px; margin: 0 auto; width: 100%; + display: flex; flex-direction: column; gap: 12px; +} .config-card { background: var(--bg-card); border: 1px solid var(--border); @@ -622,6 +626,7 @@ input::placeholder { color: var(--text-disabled); } .dash-cmd-text { font-size: 11px; font-family: var(--font-mono); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + flex: 1; min-width: 0; } /* Services */