diff --git a/package.json b/package.json index 3b59560..344094d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ephemeral", "private": true, - "version": "0.9.0", + "version": "0.9.5", "type": "module", "scripts": { "preinstall": "npx only-allow pnpm", @@ -79,7 +79,6 @@ "typescript-eslint": "^7.4.0", "vite": "^5.2.7" }, - "description": "release - 2/23/24 This is using Vite and React. To build and start, run `npm run bstart`. For UI components, we're using https://ui.shadcn.com/. To add a new component run `npx shadcn-ui@latest add [name of component]`. **Note: Whenever you add a component make sure to open it's file, and remove the dark prefixes from the classes. Then, remove the non-prefixed classes that were there before. **", "main": "index.ts", "author": "", "license": "ISC" diff --git a/src/components/shortcut-card.tsx b/src/components/shortcut-card.tsx index 9cbd0a1..241e59a 100644 --- a/src/components/shortcut-card.tsx +++ b/src/components/shortcut-card.tsx @@ -12,6 +12,13 @@ import { } from "@/components/ui/card"; import { useEffect } from "react"; import { Skeleton } from "@/components/ui/skeleton"; +import { Sparkles } from "lucide-react"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "./ui/tooltip"; export default function ShortcutCard({ app }: { app: Application }) { const { data: image, loading, run, error } = useAsync(null); useEffect(() => { @@ -22,12 +29,29 @@ export default function ShortcutCard({ app }: { app: Application }) { res.blob().then((blob) => URL.createObjectURL(blob) as string), ), ); - }, [app.image]); // eslint-disable-line react-hooks/exhaustive-deps + }, [app, run]); return ( - + - {app.name} + + {app.featured && ( + + + + + + + Featured + + + + )} + {app.name} + {app.description} diff --git a/src/components/shortcut-carousel.tsx b/src/components/shortcut-carousel.tsx index 2c8f549..bc13cf9 100644 --- a/src/components/shortcut-carousel.tsx +++ b/src/components/shortcut-carousel.tsx @@ -54,24 +54,29 @@ export function ShortcutCarousel() { return ( - {!appError - ? !loading - ? apps - ? apps - .filter((app) => app.featured) - .map((app) => ( - - - - - - )) - : null - : null - : null} + {!appError ? ( + !loading ? ( + apps ? ( + apps + .filter((app) => app.featured) + .map((app) => ( + + + + + + )) + ) : null + ) : ( +
+ ) + ) : null} diff --git a/src/layouts/main-layout.tsx b/src/layouts/main-layout.tsx index 2c31893..c1c206d 100644 --- a/src/layouts/main-layout.tsx +++ b/src/layouts/main-layout.tsx @@ -126,19 +126,18 @@ export default function MainLayout() { Github diff --git a/src/main.tsx b/src/main.tsx index 87058a3..7389e5f 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -34,8 +34,12 @@ export default function App() { scope: "/~/", }) .then(() => { - if (localStorage.getItem("refreshAgain") === "true") { + if ( + localStorage.getItem("refreshAgain") === "true" || + !localStorage.getItem("firstLoad") + ) { localStorage.removeItem("refreshAgain"); + localStorage.setItem("firstLoad", "true"); window.location.reload(); } console.log( diff --git a/src/pages/home.tsx b/src/pages/home.tsx index 5308902..0119ba6 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -34,9 +34,8 @@ export default function Home() { async (event: React.ChangeEvent) => { const query = event.target.value; await fetchSuggestions(query); - console.log(suggestions); }, - [fetchSuggestions, suggestions], + [fetchSuggestions], ); const throttledInputChange = useCallback(throttle(500, onInputChange), []); // eslint-disable-line @@ -121,16 +120,16 @@ export default function Home() { -
-

- Featured Apps -

-
- -
-
+ {!showingSuggestions ? ( +
+

+ Featured Apps +

+
+ +
+
+ ) : null}
); } diff --git a/src/pages/settings/proxy.tsx b/src/pages/settings/proxy.tsx index 9b1cdd6..a5f4dd6 100644 --- a/src/pages/settings/proxy.tsx +++ b/src/pages/settings/proxy.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef } from "react"; import { useToast } from "@/components/ui/use-toast"; -import { useConfig } from "@/hooks"; // Replace with correct path +import { useConfig } from "@/hooks"; import { Card, CardContent, @@ -23,12 +23,11 @@ import { import { unregisterServiceWorker } from "@/lib/sw"; export default function ProxySettings() { const { toast } = useToast(); - const [config, reset, loading] = useConfig("proxy"); // Using the useConfig hook to get proxy settings + const [config, reset, loading] = useConfig("proxy"); const wispServerRef = useRef(null); useEffect(() => { if (config) { - // Setting default values from config if available if (wispServerRef.current) wispServerRef.current.value = config.wispServer; } diff --git a/src/pages/view.tsx b/src/pages/view.tsx index a198336..dec217a 100644 --- a/src/pages/view.tsx +++ b/src/pages/view.tsx @@ -230,9 +230,10 @@ export default function View() {
{leftButtons.map( - ({ title, onClick, disabled, children, asChild }) => ( + ({ title, onClick, disabled, children, asChild }, key) => (