-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from opeolluwa/master
revamp the supported devices to include web
- Loading branch information
Showing
3 changed files
with
69 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { serverBaseUrl } = useContext(SystemInformationContext); | ||
|
||
const copyToClipboard = async () => { | ||
writeText(serverBaseUrl.toString()) | ||
.then(async () => { | ||
message("Text Copied", { title: "Tauri", type: "info" }); | ||
}) | ||
.then(() => { | ||
console.log("here goes nothing"); | ||
}); | ||
}; | ||
return ( | ||
<> | ||
<PageLayout pageTitle={"Connect Device"} includeSearchBar={false}> | ||
<View | ||
className=" text-center flex flex-col justify-center items-center" | ||
style={{ height: "500px" }} | ||
> | ||
<View> | ||
<Heading className="mt-8 text-3xl text-gray-700"> | ||
Connect Device | ||
</Heading> | ||
<Text className="mb-8 leading-5"> | ||
Visit this address in your browser | ||
</Text> | ||
|
||
<View className="flex items-center justify-center"> | ||
<span className="text-2xl" onClick={copyToClipboard}> | ||
{serverBaseUrl + "/upload"} | ||
</span> | ||
<i className="ri-file-copy-line text-4xl ml-3 cursor-pointer hover:text-app"></i> | ||
</View> | ||
</View> | ||
</View> | ||
</PageLayout> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters