[PUI] Fix settings intenttation (#7905)

Closes https://github.com/invenhost/InvenTree/issues/104
This commit is contained in:
Matthias Mair 2024-08-18 23:55:56 +02:00 committed by GitHub
parent 8a52bd60af
commit 8bf4ce573f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,7 @@ export function SettingsHeader({
{shorthand && <Text c="dimmed">({shorthand})</Text>} {shorthand && <Text c="dimmed">({shorthand})</Text>}
</Group> </Group>
<Group> <Group>
<Text c="dimmed">{subtitle}</Text> {subtitle ? <Text c="dimmed">{subtitle}</Text> : null}
{switch_text && switch_link && switch_condition && ( {switch_text && switch_link && switch_condition && (
<Anchor component={Link} to={switch_link}> <Anchor component={Link} to={switch_link}>
<IconSwitch size={14} /> <IconSwitch size={14} />

View File

@ -148,7 +148,11 @@ export default function UserSettings() {
<Stack gap="xs"> <Stack gap="xs">
<SettingsHeader <SettingsHeader
title={t`Account Settings`} title={t`Account Settings`}
subtitle={`${user?.first_name} ${user?.last_name}`} subtitle={
user?.first_name && user?.last_name
? `${user?.first_name} ${user?.last_name}`
: null
}
shorthand={user?.username || ''} shorthand={user?.username || ''}
switch_link="/settings/system" switch_link="/settings/system"
switch_text={<Trans>Switch to System Setting</Trans>} switch_text={<Trans>Switch to System Setting</Trans>}