From 3c127ad2afbb19c665e832caefc520c3dae9b1d0 Mon Sep 17 00:00:00 2001 From: Nebelung Date: Mon, 14 Oct 2024 23:00:56 +0000 Subject: [PATCH 1/4] proxy switcher + change wisp settings to proxy settings --- next.config.js | 2 +- pnpm-lock.yaml | 6 ++-- src/app/go/[...route]/page.tsx | 1 + src/app/layout.tsx | 2 +- src/app/settings/layout.tsx | 22 +++++++------- src/app/settings/{wisp => proxy}/page.tsx | 37 +++++++++++++++++++++-- 6 files changed, 52 insertions(+), 18 deletions(-) rename src/app/settings/{wisp => proxy}/page.tsx (71%) diff --git a/next.config.js b/next.config.js index 924e07d..50cdca3 100644 --- a/next.config.js +++ b/next.config.js @@ -5,7 +5,7 @@ const nextConfig = { return [ { source: '/settings', - destination: '/settings/appearance', + destination: '/settings/proxy', permanent: false } ] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49b86eb..4fdd38e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3402,7 +3402,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.1 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -4076,7 +4076,7 @@ snapshots: dependencies: '@tootallnate/once': 1.1.2 agent-base: 6.0.2 - debug: 4.3.1 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -4084,7 +4084,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.1 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true diff --git a/src/app/go/[...route]/page.tsx b/src/app/go/[...route]/page.tsx index dbdb0c0..ed45fab 100644 --- a/src/app/go/[...route]/page.tsx +++ b/src/app/go/[...route]/page.tsx @@ -37,6 +37,7 @@ export default function Route({ params }: { params: { route: string[] } }) { ref.current.src = await window.chemical.encode( atob(decodeURIComponent(route)), { + service: window.chemical.getStore("service"), autoHttps: true, searchEngine: "https://www.google.com/search?q=%s", } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c2ddd2c..696aef9 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -20,7 +20,7 @@ export default function RootLayout({ - + diff --git a/src/app/settings/layout.tsx b/src/app/settings/layout.tsx index 80639ad..e46f23a 100644 --- a/src/app/settings/layout.tsx +++ b/src/app/settings/layout.tsx @@ -1,7 +1,7 @@ "use client"; import { Button } from "@/components/ui/button"; -import { Users, Link, Palette, ArrowRightLeft } from "lucide-react"; +import { Users, Link, Palette, LockIcon } from "lucide-react"; import NextLink from "next/link"; import { usePathname } from "next/navigation"; @@ -13,6 +13,16 @@ export default function SettingsLayout({ return (
+ + + - - -