diff --git a/desktop/src/pages/_app.tsx b/desktop/src/pages/_app.tsx index d7e240d..ae3ddef 100644 --- a/desktop/src/pages/_app.tsx +++ b/desktop/src/pages/_app.tsx @@ -4,7 +4,7 @@ import SystemInfoStore from "@/store/sys-info"; import "@/styles/globals.css"; import type { AppProps } from "next/app"; import WifiStatus from "@/store/wifi-status"; - +import "remixicon/fonts/remixicon.css"; export default function App({ Component, pageProps }: AppProps) { return ( diff --git a/desktop/src/pages/connection/desktop.tsx b/desktop/src/pages/connection/desktop.tsx new file mode 100644 index 0000000..c537300 --- /dev/null +++ b/desktop/src/pages/connection/desktop.tsx @@ -0,0 +1,50 @@ +"use client"; + +import Heading from "@/components/Heading"; +import Text from "@/components/Text"; +import View from "@/components/View"; +import PageLayout from "@/components/layout/PageLayout"; +import { SystemInformationContext } from "@/store/sys-info"; +import { useContext } from "react"; +import { writeText } from "@tauri-apps/api/clipboard"; +import { message } from "@tauri-apps/api/dialog"; + +export default function ConnectionPage() { + const { port } = useContext(SystemInformationContext); + + const copyToClipboard = async () => { + writeText(port.toString()) + .then(async () => { + message("Text Copied", { title: "Tauri", type: "info" }); + }) + .then(() => { + console.log("here goes nothing"); + }); + }; + return ( + <> + + + + + Connect Device + + + Provide the client id in the peer device + + + + + #{port} + + + + + + + + ); +} diff --git a/desktop/src/pages/connection/hotspot.tsx b/desktop/src/pages/connection/hotspot.tsx new file mode 100644 index 0000000..c55b5b1 --- /dev/null +++ b/desktop/src/pages/connection/hotspot.tsx @@ -0,0 +1,33 @@ +"use client"; + +import Heading from "@/components/Heading"; +import View from "@/components/View"; +import PageLayout from "@/components/layout/PageLayout"; +import { Text } from "@filesync/components"; +import { + ArrowDownIcon, + ArrowUpIcon, + RadioIcon, + WifiIcon, +} from "@heroicons/react/24/outline"; + +export default function ConnectionPage() { + return ( + <> + + + + + + Network Configuration + + Connect to the network on peer device + + + + + + + + ); +} diff --git a/desktop/src/pages/connection/index.tsx b/desktop/src/pages/connection/index.tsx new file mode 100644 index 0000000..5460e73 --- /dev/null +++ b/desktop/src/pages/connection/index.tsx @@ -0,0 +1,41 @@ +"use client"; + +import Heading from "@/components/Heading"; +import View from "@/components/View"; +import PageLayout from "@/components/layout/PageLayout"; +import { Text } from "@filesync/components"; +import { ArrowDownIcon, ArrowUpIcon } from "@heroicons/react/24/outline"; + +export default function ConnectionPage() { + return ( + <> + + + + + What would you like to do? + + some lorem text blablabla + + + + + Send File + + + + Recieve File + + + + + + + ); +} diff --git a/desktop/src/pages/connection.tsx b/desktop/src/pages/connection/mobile.tsx similarity index 75% rename from desktop/src/pages/connection.tsx rename to desktop/src/pages/connection/mobile.tsx index 2234f7a..05da42d 100644 --- a/desktop/src/pages/connection.tsx +++ b/desktop/src/pages/connection/mobile.tsx @@ -1,12 +1,12 @@ "use client"; +import Heading from "@/components/Heading"; import Text from "@/components/Text"; import View from "@/components/View"; import PageLayout from "@/components/layout/PageLayout"; -import QRCode from "react-qr-code"; -import { useContext } from "react"; import { SystemInformationContext } from "@/store/sys-info"; -import Heading from "@/components/Heading"; +import { useContext } from "react"; +import QRCode from "react-qr-code"; export default function ConnectionPage() { const { serverBaseUrl } = useContext(SystemInformationContext); @@ -18,17 +18,18 @@ export default function ConnectionPage() { className=" text-center flex flex-col justify-center items-center" style={{ height: "600px" }} > - - Connect Device + + Connect Device + - Scan the QR code below to connect your device + Scan the QR code to connect your device diff --git a/desktop/src/pages/connection/peer.tsx b/desktop/src/pages/connection/peer.tsx new file mode 100644 index 0000000..551e4e4 --- /dev/null +++ b/desktop/src/pages/connection/peer.tsx @@ -0,0 +1,47 @@ +"use client"; + +import Heading from "@/components/Heading"; +import Text from "@/components/Text"; +import View from "@/components/View"; +import PageLayout from "@/components/layout/PageLayout"; +import { LinuxOutlined } from "@ant-design/icons"; + +export default function ConnectionPage() { + return ( + <> + + + + + Select Device + + + Select device type to begin + + + + + + + + + + + + + + + ); +}