From 6df6880ba3f25e5f24ee3b79662e18a5e1f8b64e Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Fri, 3 Jul 2026 15:59:14 +0700 Subject: [PATCH] refactor: improve layout spacing and enhance preferences menu in HeaderLayout --- .../layouts/components/header.layout.tsx | 100 ++++++++++-------- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/apps/web/src/apps/modules/layouts/components/header.layout.tsx b/apps/web/src/apps/modules/layouts/components/header.layout.tsx index 66ad44a..8920a2f 100644 --- a/apps/web/src/apps/modules/layouts/components/header.layout.tsx +++ b/apps/web/src/apps/modules/layouts/components/header.layout.tsx @@ -55,7 +55,7 @@ export default function HeaderLayout() { {/* 3. RIGHT SECTION (Actions & Profile) */} - + @@ -75,7 +75,7 @@ export default function HeaderLayout() { transition: 'background-color 150ms ease', }} > - + {getInitials(USER.name)} @@ -94,8 +94,9 @@ export default function HeaderLayout() { - - + + {/* Mobile User Info */} + {USER.name} @@ -105,56 +106,63 @@ export default function HeaderLayout() { - - {t('common:preferences', { ns: 'common' })} - - - - {t('common:language', { ns: 'common' })} - - { + if (!val) return; + await i18n.changeLanguage(val); + await secureStorage.setItem(AppStorageKey.LOCALE, val); + }} + styles={{ + input: { + textAlign: 'right', + cursor: 'pointer', + height: '22px', + minHeight: '22px', + }, + root: { + marginTop: '-4px', + marginBottom: '-4px', + }, + }} + /> + - - {t('common:application', { ns: 'common' })} - }> - {t('common:accountSettings', { ns: 'common' })} - - }>{t('common:myProfile', { ns: 'common' })} + {/* Application Section */} + {t('common:application')} + }>{t('common:accountSettings')} + }>{t('common:myProfile')} - + - {t('common:workspace', { ns: 'common' })} - }> - {t('common:switchWorkspace', { ns: 'common' })} - - + {/* Workspace Section */} + {t('common:workspace')} + }>{t('common:switchWorkspace')} - - + - }> - {t('common:signOut', { ns: 'common' })} - - + {/* Sign Out Section */} + }> + {t('common:signOut')} +