diff --git a/app/components/aggregation-filter.tsx b/app/components/aggregation-filter.tsx index 8b780e9b..eed726a9 100644 --- a/app/components/aggregation-filter.tsx +++ b/app/components/aggregation-filter.tsx @@ -57,10 +57,10 @@ export function AggregationFilter() { > -
+
Aggregation <> diff --git a/app/components/device-detail/device-detail-box.tsx b/app/components/device-detail/device-detail-box.tsx index 46c23918..d8e665c2 100644 --- a/app/components/device-detail/device-detail-box.tsx +++ b/app/components/device-detail/device-detail-box.tsx @@ -199,12 +199,12 @@ export default function DeviceDetailBox() { >
{navigation.state === 'loading' && ( @@ -223,7 +223,7 @@ export default function DeviceDetailBox() { : 'h-4 w-4 rounded-full bg-red-500' } >
-
+
{data.device.name}
@@ -306,7 +306,7 @@ export default function DeviceDetailBox() { />
-
+
{data.deviceImageUrl ? ( )}
-
+
)} -
+
{sensors && sensors.map( (sensor: SensorWithLatestMeasurement) => { diff --git a/app/components/device-detail/entry-logs.tsx b/app/components/device-detail/entry-logs.tsx index 45bdf0e6..0374e9c0 100644 --- a/app/components/device-detail/entry-logs.tsx +++ b/app/components/device-detail/entry-logs.tsx @@ -1,4 +1,3 @@ -import { useMediaQuery } from '@mantine/hooks' import { Activity, Clock, ExternalLink } from 'lucide-react' import { useState } from 'react' import { useTranslation } from 'react-i18next' @@ -11,16 +10,6 @@ import { DialogTitle, DialogTrigger, } from '../ui/dialog' -import { - Drawer, - DrawerClose, - DrawerContent, - DrawerDescription, - DrawerFooter, - DrawerHeader, - DrawerTitle, - DrawerTrigger, -} from '../ui/drawer' import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip' import { Card } from '@/components/ui/card' import { ScrollArea } from '@/components/ui/scroll-area' @@ -32,93 +21,55 @@ export default function EntryLogs({ entryLogs: LogEntry[] }) { const [open, setOpen] = useState(false) - const isDesktop = useMediaQuery('(min-width: 768px)') const { t, i18n } = useTranslation('device-detail-box') + const latestEntry = entryLogs[0] - if (isDesktop) { - return ( -
-

{t('logs')}

-
-
-
- -
-
-

- {entryLogs[entryLogs.length - 1].content} -

-
- - {new Date(entryLogs[0].createdAt).toLocaleString(i18n.language)} -
-
-
-
- - - - - - - {t('device_logs')} - {t('logs_owner_hint')} - - - - -
-
-
- ) - } + if (!latestEntry) return null return (

{t('logs')}

-
-
-
- +
+
+
+
-
-

{entryLogs[0].content}

+
+

+ {latestEntry.content} +

- {new Date(entryLogs[0].createdAt).toLocaleString(i18n.language)} + {new Date(latestEntry.createdAt).toLocaleString(i18n.language)}
-
- - - - - - - {t('device_logs')} - {t('logs_owner_hint')} - + + + + + + + + +

{t('show_all_logs')}

+
+
+ + + {t('device_logs')} + {t('logs_owner_hint')} + - - - - - -
-
+ +
) diff --git a/app/components/device-detail/graph.tsx b/app/components/device-detail/graph.tsx index 1852dbdb..a8bfc7a3 100644 --- a/app/components/device-detail/graph.tsx +++ b/app/components/device-detail/graph.tsx @@ -558,14 +558,14 @@ export default function Graph({
)}
-
+
{currentZoom !== null && currentZoom.xMax !== 0 && currentZoom.xMin !== 0 && ( diff --git a/app/components/device/new/custom-device-config.tsx b/app/components/device/new/custom-device-config.tsx index 587a725c..3bff64a6 100644 --- a/app/components/device/new/custom-device-config.tsx +++ b/app/components/device/new/custom-device-config.tsx @@ -186,13 +186,19 @@ export function CustomDeviceConfig() { return (
- - {t('device_schema_tab')} - {t('manual_sensors_tab')} - - {t('selected_sensors_tab', { count: sensors.length })} - - +
+ + + {t('device_schema_tab')} + + + {t('manual_sensors_tab')} + + + {t('selected_sensors_tab', { count: sensors.length })} + + +
@@ -281,11 +287,11 @@ export function CustomDeviceConfig() { {t('device_schema_example_download')}
-
+
{ const file = event.target.files?.[0] if (file) void importDeviceSchema(file) diff --git a/app/components/device/new/general-info.tsx b/app/components/device/new/general-info.tsx index 1a51a9f9..e68581e4 100644 --- a/app/components/device/new/general-info.tsx +++ b/app/components/device/new/general-info.tsx @@ -162,7 +162,7 @@ export function GeneralInfoStep() {
-
+
{temporaryExpirationDate && ( -
+
-
-
+
+
-
+
-
+
{/* Breadcrumb Navigation */} - - + + {Stepper.steps.map((step, index) => { return (
@@ -241,7 +241,7 @@ export default function NewDeviceStepper() {
{/* Form Content */} -
+
{stepper.match({ advanced: () => , 'general-info': () => , @@ -253,7 +253,7 @@ export default function NewDeviceStepper() {
{/* Navigation Buttons */} -
+
+ -
+
setOpen(true)} onChange={(e) => setSearchString(e.target.value)} - className="h-full w-full flex-1 border-none bg-transparent focus:border-none focus:ring-0 focus:outline-hidden dark:text-zinc-200" + className="h-full min-w-0 flex-1 border-none bg-transparent focus:border-none focus:ring-0 focus:outline-hidden dark:text-zinc-200" value={searchString} /> {!open && ( - + ctrl + K )} @@ -110,7 +122,7 @@ export default function NavBar(props: NavBarProps) { inputRef.current?.blur() }} aria-label="Close search" - className="rounded-full p-1 hover:bg-black/5 dark:hover:bg-white/10" + className="-mr-2 flex size-11 shrink-0 items-center justify-center rounded-full hover:bg-black/5 lg:mr-0 lg:size-8 dark:hover:bg-white/10" > @@ -154,8 +166,8 @@ export default function NavBar(props: NavBarProps) { - {!open && isDesktop && ( -
+ {!open && ( +
)} diff --git a/app/components/landing/footer.tsx b/app/components/landing/footer.tsx index d8b3053b..b184086b 100644 --- a/app/components/landing/footer.tsx +++ b/app/components/landing/footer.tsx @@ -9,7 +9,7 @@ export default function Footer() { className="w-full bg-white px-4 text-gray-300 sm:p-6 lg:text-lg dark:bg-black dark:text-gray-100" >
-
+
© {currentYear}{' '} @@ -17,13 +17,13 @@ export default function Footer() { . {t('rightsReserved')} -