diff --git a/package-lock.json b/package-lock.json index d04995c..1c4b4a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,7 +64,6 @@ "recharts": "^2.15.3", "sonner": "^2.0.5", "tailwind-merge": "^3.3.1", - "tailwindcss-animate": "^1.0.7", "vaul": "^1.1.2", "zod": "^3.25.64", "zustand": "^5.0.5" @@ -4724,17 +4723,9 @@ "version": "4.1.10", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.10.tgz", "integrity": "sha512-P3nr6WkvKV/ONsTzj6Gb57sWPMX29EPNPopo7+FcpkQaNsrNpZ1pv8QmrYI2RqEKD7mlGqLnGovlcYnBK0IqUA==", + "dev": true, "license": "MIT" }, - "node_modules/tailwindcss-animate": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz", - "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==", - "license": "MIT", - "peerDependencies": { - "tailwindcss": ">=3.0.0 || insiders" - } - }, "node_modules/tapable": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", diff --git a/package.json b/package.json index dade653..8a14610 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,6 @@ "recharts": "^2.15.3", "sonner": "^2.0.5", "tailwind-merge": "^3.3.1", - "tailwindcss-animate": "^1.0.7", "vaul": "^1.1.2", "zod": "^3.25.64", "zustand": "^5.0.5" diff --git a/src/components/custom/slidingButton.tsx b/src/components/custom/slidingButton.tsx new file mode 100644 index 0000000..4533f30 --- /dev/null +++ b/src/components/custom/slidingButton.tsx @@ -0,0 +1,52 @@ +import { cn } from "@/lib/utils"; +import React, { type ReactNode } from "react"; + +export const SlidingButton = ({ + children, + slidingContent, + as: Tag = "button", + href, + target, + className, + ...props +}: { + children: ReactNode; + slidingContent: ReactNode; + as?: React.ElementType; + href?: string; + target?: string; + className?: string; +} & ( + | React.ComponentPropsWithoutRef<"a"> + | React.ComponentPropsWithoutRef<"button"> +)) => { + return ( + + + {children} + +
+ {slidingContent} +
+
+ ); +}; \ No newline at end of file diff --git a/src/components/sidebar.tsx b/src/components/sidebar.tsx index c430639..7581263 100644 --- a/src/components/sidebar.tsx +++ b/src/components/sidebar.tsx @@ -1,7 +1,7 @@ import { config } from "@/config"; import { Link, useLocation } from "react-router-dom"; import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from "@/components/ui/sidebar"; -import { CircleArrowUp, Download, Settings, SquarePlay, } from "lucide-react"; +import { CircleArrowUp, Download, Puzzle, Settings, SquarePlay, } from "lucide-react"; import { isActive as isActiveSidebarItem } from "@/utils"; import { RoutesObj } from "@/types/route"; import { useDownloadStatesStore, useSettingsPageStatesStore } from "@/services/store"; @@ -40,6 +40,11 @@ export function AppSidebar() { title: "Library", url: "/library", icon: SquarePlay, + }, + { + title: "Extension", + url: "/extension", + icon: Puzzle, } ]; diff --git a/src/index.css b/src/index.css index 9b1f59b..ca001bc 100644 --- a/src/index.css +++ b/src/index.css @@ -1,4 +1,5 @@ @import "tailwindcss"; +@import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); diff --git a/src/main.tsx b/src/main.tsx index 1b8ad62..c79f8ad 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -8,6 +8,7 @@ import RootLayout from "@/pages/layout/root"; import DownloaderPage from "@/pages/downloader"; import LibraryPage from "@/pages/library"; import SettingsPage from "@/pages/settings"; +import ExtensionPage from "@/pages/extension"; ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( @@ -18,6 +19,7 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( }> } /> } /> + } /> } /> diff --git a/src/pages/downloader.tsx b/src/pages/downloader.tsx index 591444a..12300ea 100644 --- a/src/pages/downloader.tsx +++ b/src/pages/downloader.tsx @@ -510,7 +510,7 @@ export default function DownloaderPage() { } }} > -

Suggested (Best)

+

Suggested

{ + try { + await invoke('open_file_with_app', { filePath: url, appName: app }).then(() => { + toast({ + title: 'Opening Link', + description: `Opening link with ${app ? app : 'default app'}.`, + }) + }); + } catch (e) { + console.error(e); + toast({ + title: 'Failed to open link', + description: 'An error occurred while trying to open the link.', + variant: "destructive" + }) + } + } + + return ( +
+ +
+ + + Get Now +
+ } + onClick={() => openLink('https://chromewebstore.google.com/detail/neo-downloader-plus/mehopeailfjmiloiiohgicphlcgpompf', 'chrome')} + > + + + + + Get Chrome Extension + + from Chrome Web Store + + + + Get Now +
+ } + onClick={() => openLink('https://addons.mozilla.org/en-US/firefox/addon/neo-downloader-plus', 'firefox')} + > + + + + + Get Firefox Extension + + from Mozilla Addons Store + +
+
+ + + + + +
+

* These links opens with coresponding browsers only. Make sure the browser is installed befor clicking the link

+ + ) +} \ No newline at end of file diff --git a/src/routes.ts b/src/routes.ts index b91bc8d..196d850 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -1,4 +1,4 @@ -import { Bell, Download, Settings, SquarePlay } from "lucide-react"; +import { Download, Puzzle, Settings, SquarePlay } from "lucide-react"; import { RoutesObj } from "@/types/route"; export const AllRoutes: Array = [ @@ -12,14 +12,14 @@ export const AllRoutes: Array = [ url: "/library", icon: SquarePlay, }, + { + title: "Extension", + url: "/extension", + icon: Puzzle, + }, { title: "Settings", url: "/settings", icon: Settings, - }, - { - title: "Notifications", - url: "/notifications", - icon: Bell, } ]; \ No newline at end of file