2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

[UI] About tweak (#9874)

* Cleanup server info modal

* Sort package info
This commit is contained in:
Oliver
2025-06-26 20:53:23 +10:00
committed by GitHub
parent 370baeff8b
commit 791f7797cb
2 changed files with 13 additions and 11 deletions

View File

@ -73,7 +73,7 @@ def read_license_file(path: Path) -> list:
names.add(name) names.add(name)
output.append({key.lower(): value for key, value in entry.items()}) output.append({key.lower(): value for key, value in entry.items()})
return output return sorted(output, key=lambda x: x.get('name', '').lower())
class LicenseViewSerializer(serializers.Serializer): class LicenseViewSerializer(serializers.Serializer):

View File

@ -5,7 +5,6 @@ import type { ContextModalProps } from '@mantine/modals';
import { useShallow } from 'zustand/react/shallow'; import { useShallow } from 'zustand/react/shallow';
import { useServerApiState } from '../../states/ApiState'; import { useServerApiState } from '../../states/ApiState';
import { OnlyStaff } from '../items/OnlyStaff'; import { OnlyStaff } from '../items/OnlyStaff';
import { StylishText } from '../items/StylishText';
export function ServerInfoModal({ export function ServerInfoModal({
context, context,
@ -16,9 +15,6 @@ export function ServerInfoModal({
return ( return (
<Stack> <Stack>
<Divider /> <Divider />
<StylishText size='lg'>
<Trans>Server</Trans>
</StylishText>
<Table striped> <Table striped>
<Table.Tbody> <Table.Tbody>
<Table.Tr> <Table.Tr>
@ -53,8 +49,10 @@ export function ServerInfoModal({
<Trans>Debug Mode</Trans> <Trans>Debug Mode</Trans>
</Table.Td> </Table.Td>
<Table.Td> <Table.Td>
<Badge color='red'>INVE-W4</Badge> <Group justify='space-between'>
<Trans>Server is running in debug mode</Trans> <Badge color='red'>INVE-W4</Badge>
<Trans>Server is running in debug mode</Trans>
</Group>
</Table.Td> </Table.Td>
</Table.Tr> </Table.Tr>
)} )}
@ -104,8 +102,10 @@ export function ServerInfoModal({
<Trans>Background Worker</Trans> <Trans>Background Worker</Trans>
</Table.Td> </Table.Td>
<Table.Td> <Table.Td>
<Badge color='red'>INVE-W5</Badge> <Group justify='space-between'>
<Trans>The Background worker process is not running.</Trans> <Badge color='red'>INVE-W5</Badge>
<Trans>The background worker process is not running</Trans>
</Group>
</Table.Td> </Table.Td>
</Table.Tr> </Table.Tr>
)} )}
@ -115,8 +115,10 @@ export function ServerInfoModal({
<Trans>Email Settings</Trans> <Trans>Email Settings</Trans>
</Table.Td> </Table.Td>
<Table.Td> <Table.Td>
<Badge color='red'>INVE-W7</Badge> <Group justify='space-between'>
<Trans>Email settings not configured.</Trans> <Badge color='red'>INVE-W7</Badge>
<Trans>Email settings not configured.</Trans>
</Group>
</Table.Td> </Table.Td>
</Table.Tr> </Table.Tr>
)} )}