From 09c8b0de38e815500f2382e34cf1dc5bfa3add92 Mon Sep 17 00:00:00 2001
From: Tyler Woods
Date: Fri, 7 Jun 2024 19:40:24 -0500
Subject: [PATCH 1/4] alternative style
---
components/Script.tsx | 5 ++++-
components/ScriptBrowser.tsx | 22 ++++++++++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/components/Script.tsx b/components/Script.tsx
index 2503d52..1dc86cf 100644
--- a/components/Script.tsx
+++ b/components/Script.tsx
@@ -5,7 +5,7 @@ import { Suspense, useEffect, useState, useMemo } from "react";
import { extractDate } from "@/lib/time";
import { Button } from "./ui/button";
import { toast } from "sonner";
-import { Clipboard, Info, X, Code, Globe, BookOpenText, ExternalLink } from "lucide-react";
+import { Clipboard, Info, X, Code, Globe, BookOpenText, ExternalLink, Copy } from "lucide-react";
import { Separator } from "@/components/ui/separator";
import Link from "next/link";
import { Category, Script } from "@/lib/types";
@@ -419,6 +419,7 @@ function ScriptItem({
{!isMobile && item.alpineScript
? item.alpineScript
: "Copy install command"}
+
>
)}
@@ -454,6 +455,8 @@ function ScriptItem({
{!isMobile && installCommand
? installCommand
: "Copy install command"}
+
+
>
)}
diff --git a/components/ScriptBrowser.tsx b/components/ScriptBrowser.tsx
index 5f03629..7bc6f1e 100644
--- a/components/ScriptBrowser.tsx
+++ b/components/ScriptBrowser.tsx
@@ -192,19 +192,28 @@ const ScriptBrowser = ({
)}
+
{filteredLinks.map((category) => (
-
+
-
+
{category.catagoryName}{" "}
-
+
{category.expand.items.length}
{" "}
@@ -228,9 +237,9 @@ const ScriptBrowser = ({
pathname: "/scripts",
query: { id: script.title },
}}
- className={`flex cursor-pointer items-center justify-between gap-1 px-1 py-1 text-muted-foreground hover:rounded-lg hover:bg-blue-300/20 hover:bg-neutral-50 hover:dark:bg-blue-900/20 ${
+ className={`flex cursor-pointer items-center justify-between gap-1 px-1 py-1 text-muted-foreground hover:rounded-lg hover:bg-accent/60 hover:dark:bg-accent/20 ${
selectedScript === script.title
- ? "rounded-lg bg-blue-300/20 font-semibold dark:bg-blue-900/20 dark:text-white"
+ ? "rounded-lg bg-accent font-semibold dark:bg-accent/30 dark:text-white"
: ""
}`}
onClick={() => handleSelected(script.title)}
@@ -279,6 +288,7 @@ const ScriptBrowser = ({
))}
+
);
};
From e261d3af3649206edc1a4b910203b22302d7c8e1 Mon Sep 17 00:00:00 2001
From: Tyler Woods
Date: Fri, 7 Jun 2024 20:03:42 -0500
Subject: [PATCH 2/4] update container heading placement
---
components/Script.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/components/Script.tsx b/components/Script.tsx
index 1dc86cf..fbc730c 100644
--- a/components/Script.tsx
+++ b/components/Script.tsx
@@ -343,10 +343,12 @@ function ScriptItem({
)}
-
-
+
+
How to {item.item_type ? "install" : "use"}
+
+
{item.hasAlpineScript ? (
>
)}
+
From 1087286dd743d7c822aa59fef83ae30c64ceefd2 Mon Sep 17 00:00:00 2001
From: Tyler Woods
Date: Fri, 7 Jun 2024 20:08:29 -0500
Subject: [PATCH 3/4] padding
---
components/Script.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/components/Script.tsx b/components/Script.tsx
index fbc730c..ae9f46c 100644
--- a/components/Script.tsx
+++ b/components/Script.tsx
@@ -315,12 +315,14 @@ function ScriptItem({
-
+
+
Description
{descriptionCodeBlock(item.description)}
+
{item.alert1 && (
From 59963e676f71033f0f36ace11b2061b03391c6d1 Mon Sep 17 00:00:00 2001
From: Tyler Woods
Date: Fri, 7 Jun 2024 20:34:21 -0500
Subject: [PATCH 4/4] tidy up the search display
---
components/ScriptBrowser.tsx | 63 +++++++++++++++++++++++-------------
1 file changed, 40 insertions(+), 23 deletions(-)
diff --git a/components/ScriptBrowser.tsx b/components/ScriptBrowser.tsx
index 7bc6f1e..7818ee2 100644
--- a/components/ScriptBrowser.tsx
+++ b/components/ScriptBrowser.tsx
@@ -12,6 +12,7 @@ import { X, EyeOff, Eye, Star } from "lucide-react";
import React, { useState, useEffect, useRef, useMemo, useCallback } from "react";
import { Category } from "@/lib/types";
import { Badge } from "./ui/badge";
+import { Button } from "./ui/button";
import clsx from "clsx";
const ScriptBrowser = ({
@@ -151,7 +152,7 @@ const ScriptBrowser = ({
handleSearch(e.target.value)}
ref={inputRef}
value={searchTerm}
@@ -168,28 +169,25 @@ const ScriptBrowser = ({
)}
{searchTerm ? (
-
- Press 'Esc' to clear the search
-
+
+
+ Press
+
+ esc
+
+ to clear the search
+
+
) : (
-
- setShowLogos(!showLogos)}
- >
- {showLogos ? (
- <>
-
- Hide Logos
- >
- ) : (
- <>
-
- Show Logos
- >
- )}
-
-
+
+
+ Press
+
+ /
+
+ to search
+
+
)}
@@ -288,7 +286,26 @@ const ScriptBrowser = ({
))}
-
+
+
+
+
);
};