2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-07 04:12:11 +00:00

fix italic

This commit is contained in:
Matthias Mair
2024-04-15 12:19:21 +02:00
parent 3e5a31d6bc
commit 5245b1ee56
8 changed files with 26 additions and 13 deletions

View File

@@ -71,7 +71,7 @@ function QueryResultGroup({
<Group justify="apart" wrap="nowrap">
<Group justify="left" gap={5} wrap="nowrap">
<Text size="lg">{model.label_multiple}</Text>
<Text size="sm" italic>
<Text size="sm" style={{ fontStyle: 'italic' }}>
{' '}
- {query.results.count} <Trans>results</Trans>
</Text>

View File

@@ -51,7 +51,7 @@ export function SettingList({
onChange={onChange}
/>
) : (
<Text size="sm" italic color="red">
<Text size="sm" style={{ fontStyle: 'italic' }} color="red">
Setting {key} not found
</Text>
)}
@@ -59,7 +59,7 @@ export function SettingList({
);
})}
{(keys || allKeys).length === 0 && (
<Text italic>
<Text style={{ fontStyle: 'italic' }}>
<Trans>No settings specified</Trans>
</Text>
)}

View File

@@ -58,7 +58,7 @@ export default function MachineManagementPanel() {
</Group>
{registryStatus?.registry_errors &&
registryStatus.registry_errors.length === 0 ? (
<Text italic>
<Text style={{ fontStyle: 'italic' }}>
<Trans>There are no machine registry errors.</Trans>
</Text>
) : (

View File

@@ -149,7 +149,7 @@ export function BomTable({
let text =
available_stock <= 0 ? (
<Text c="red" italic>{t`No stock`}</Text>
<Text c="red" style={{ fontStyle: 'italic' }}>{t`No stock`}</Text>
) : (
available_stock
);
@@ -210,7 +210,9 @@ export function BomTable({
sortable: false, // TODO: Custom sorting via API
render: (record: any) => {
if (record.consumable) {
return <Text italic>{t`Consumable item`}</Text>;
return (
<Text style={{ fontStyle: 'italic' }}>{t`Consumable item`}</Text>
);
}
let can_build = availableStockQuantity(record) / record.quantity;

View File

@@ -109,7 +109,10 @@ export default function BuildLineTable({ params = {} }: { params?: any }) {
available > 0 ? (
available
) : (
<Text c="red" italic>{t`No stock available`}</Text>
<Text
c="red"
style={{ fontStyle: 'italic' }}
>{t`No stock available`}</Text>
)
}
title={t`Available Stock`}
@@ -176,7 +179,7 @@ export default function BuildLineTable({ params = {} }: { params?: any }) {
switchable: false,
render: (record: any) => {
return record?.bom_item_detail?.consumable ? (
<Text italic>{t`Consumable item`}</Text>
<Text style={{ fontStyle: 'italic' }}>{t`Consumable item`}</Text>
) : (
<ProgressBar
progressLabel={true}

View File

@@ -85,7 +85,7 @@ function MachineTypeDrawer({ machineTypeSlug }: { machineTypeSlug: string }) {
</Group>
{!machineType && (
<Text italic>
<Text style={{ fontStyle: 'italic' }}>
<Trans>Machine type not found.</Trans>
</Text>
)}
@@ -192,7 +192,7 @@ function MachineDriverDrawer({
</Group>
{!machineDriver && (
<Text italic>
<Text style={{ fontStyle: 'italic' }}>
<Trans>Machine driver not found.</Trans>
</Text>
)}

View File

@@ -49,7 +49,11 @@ export function PartParameterTable({ partId }: { partId: any }) {
render: (record) => {
let variant = String(partId) != String(record.part);
return <Text italic={variant}>{record.template_detail?.name}</Text>;
return (
<Text style={{ fontStyle: variant ? 'italic' : 'inherit' }}>
{record.template_detail?.name}
</Text>
);
}
},
DescriptionColumn({

View File

@@ -306,7 +306,11 @@ export default function PluginListTable() {
if (record.active) {
return record.meta.description;
} else {
return <Text italic>{t`Description not available`}</Text>;
return (
<Text
style={{ fontStyle: 'italic' }}
>{t`Description not available`}</Text>
);
}
}
},
@@ -351,7 +355,7 @@ export default function PluginListTable() {
: t`The following plugin will be deactivated`}
:
</Text>
<Text size="lg" italic>
<Text size="lg" style={{ fontStyle: 'italic' }}>
{plugin_name}
</Text>
</Stack>