Cleanup names in webUI (#4607)

* Fix _ in labels

* Capitalize camera names in system

* Update storage to link to cameras and share name styling with rest of ui
This commit is contained in:
Nicolas Mowen
2022-12-07 06:37:45 -07:00
committed by GitHub
parent 7888059c9f
commit 6abc0ce921
3 changed files with 51 additions and 30 deletions

View File

@@ -4,6 +4,7 @@ import Heading from '../components/Heading';
import { useWs } from '../api/ws';
import useSWR from 'swr';
import { Table, Tbody, Thead, Tr, Th, Td } from '../components/Table';
import Link from '../components/Link';
const emptyObject = Object.freeze({});
@@ -82,7 +83,9 @@ export default function Storage() {
<div data-testid="detectors" className="grid grid-cols-1 3xl:grid-cols-3 md:grid-cols-2 gap-4">
{Object.entries(storage).map(([name, camera]) => (
<div key={name} className="dark:bg-gray-800 shadow-md hover:shadow-lg rounded-lg transition-shadow">
<div className="text-lg flex justify-between p-4">{name}</div>
<div className="capitalize text-lg flex justify-between p-4">
<Link href={`/cameras/${name}`}>{name.replaceAll('_', ' ')}</Link>
</div>
<div className="p-2">
<Table className="w-full">
<Thead>