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 @@
-
-
+
+
-

+

Cup

{% for metric in metrics %} -
+
{{ metric.name }}
-
+
{{ metric.value }}
@@ -111,7 +113,7 @@ height="24" viewBox="0 0 24 24" fill="currentColor" - class="size-6 text-black dark:text-white shrink-0" + class="size-6 shrink-0 text-black dark:text-white" > ; return (
-
-
+
+
-

+

Cup

-
+
{Object.entries(data.metrics).map(([name, value]) => ( ))}
- -
    - {data.images.filter((image) => image.reference.includes(searchQuery)).map((image) => ( - - ))} + +
      + {data.images + .filter((image) => image.reference.includes(searchQuery)) + .map((image) => ( + + ))}
diff --git a/web/src/components/Image.tsx b/web/src/components/Image.tsx index 09afe41..383c0a9 100644 --- a/web/src/components/Image.tsx +++ b/web/src/components/Image.tsx @@ -62,7 +62,7 @@ export default function Image({ data }: { data: Image }) { <> )}
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/,