diff --git a/web/.prettierrc b/web/.prettierrc new file mode 100644 index 0000000..b4bfed3 --- /dev/null +++ b/web/.prettierrc @@ -0,0 +1,3 @@ +{ + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/web/bun.lockb b/web/bun.lockb index 7a21bbc..f722434 100755 Binary files a/web/bun.lockb and b/web/bun.lockb differ diff --git a/web/index.html b/web/index.html index 985ee1a..3ade627 100644 --- a/web/index.html +++ b/web/index.html @@ -14,10 +14,10 @@
docker pull {data.reference} @@ -174,9 +174,9 @@ export default function Image({ data }: { data: Image }) { ) : ( @@ -188,7 +188,7 @@ export default function Image({ data }: { data: Image }) { Local digests {data.local_digests.join("\n")} @@ -199,7 +199,7 @@ export default function Image({ data }: { data: Image }) { Remote digest {data.remote_digest} diff --git a/web/src/components/Loading.tsx b/web/src/components/Loading.tsx index 76139e0..f2e33dc 100644 --- a/web/src/components/Loading.tsx +++ b/web/src/components/Loading.tsx @@ -8,22 +8,25 @@ export default function Loading({ onLoad }: { onLoad: (data: Data) => void }) { process.env.NODE_ENV === "production" ? "/api/v1/full" : `http://${window.location.hostname}:8000/api/v1/full`, - ).then((response) => response.json().then((data) => {onLoad(data as Data)})); + ).then((response) => + response.json().then((data) => { + onLoad(data as Data); + }), + ); return ( - - + + - + Cup Loading diff --git a/web/src/components/Search.tsx b/web/src/components/Search.tsx index dc77ce8..b4cd82a 100644 --- a/web/src/components/Search.tsx +++ b/web/src/components/Search.tsx @@ -25,25 +25,28 @@ export default function Search({ return ( {showClear && ( - + )} diff --git a/web/src/components/Statistic.tsx b/web/src/components/Statistic.tsx index 88e96da..906bac9 100644 --- a/web/src/components/Statistic.tsx +++ b/web/src/components/Statistic.tsx @@ -19,27 +19,27 @@ export default function Statistic({ - + {name} - - + + {value} {name == "Monitored images" && ( - + )} {name == "Up to date" && ( - + )} {name == "Update available" && ( - + )} {name == "Unknown" && ( - + )} diff --git a/web/src/index.css b/web/src/index.css index 06cc5f7..2ddb373 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -51,4 +51,4 @@ html::-webkit-scrollbar-thumb:hover { background: #b5b5b5; } -} \ No newline at end of file +} diff --git a/web/src/types.ts b/web/src/types.ts index 72e941a..7e65a1d 100644 --- a/web/src/types.ts +++ b/web/src/types.ts @@ -7,20 +7,20 @@ export interface Data { }; images: Image[]; last_updated: string; -}; +} export interface Image { - reference: string, + reference: string; parts: { - registry: string, - repository: string, - tag: string, - }, - local_digests: string[], - remote_digest: string, + registry: string; + repository: string; + tag: string; + }; + local_digests: string[]; + remote_digest: string; result: { - has_update: boolean | null, - error: string | null - }, - time: number -} \ No newline at end of file + has_update: boolean | null; + error: string | null; + }; + time: number; +} diff --git a/web/tailwind.config.js b/web/tailwind.config.js index a1c1e2a..fdd92a2 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -8,7 +8,7 @@ export default { safelist: [ // Generate minimum extra CSS { - pattern: /bg-(gray|neutral)-(50|500)/, + pattern: /bg-(gray|neutral)-(50|100|500)/, }, { pattern: /bg-(gray|neutral)-(900|950)/, @@ -24,11 +24,11 @@ export default { }, { pattern: /text-(gray|neutral)-600/, - variants: ["hover"] + variants: ["hover"], }, { pattern: /text-(gray|neutral)-400/, - variants: ["hover", "dark", "dark:hover"] + variants: ["hover", "dark", "dark:hover"], }, { pattern: /text-(gray|neutral)-500/,
{data.local_digests.join("\n")} @@ -199,7 +199,7 @@ export default function Image({ data }: { data: Image }) {
{data.remote_digest}