diff --git a/components/Script.tsx b/components/Script.tsx index 2503d52..ae9f46c 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"; @@ -315,12 +315,14 @@ function ScriptItem({
-

+
+

Description

{descriptionCodeBlock(item.description)}

+
{item.alert1 && (

@@ -343,10 +345,12 @@ function ScriptItem({ )}

-
-

+
+

How to {item.item_type ? "install" : "use"}

+ +
{item.hasAlpineScript ? ( )} @@ -454,9 +459,12 @@ function ScriptItem({ {!isMobile && installCommand ? installCommand : "Copy install command"} + + )} +

diff --git a/components/ScriptBrowser.tsx b/components/ScriptBrowser.tsx index 5f03629..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,43 +169,49 @@ 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 +

+
)} +
{filteredLinks.map((category) => ( - +
- + {category.catagoryName}{" "} - + {category.expand.items.length}
{" "} @@ -228,9 +235,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 +286,26 @@ const ScriptBrowser = ({ ))}
+

+ +

+ ); };