summaryrefslogtreecommitdiff
path: root/src/components/ClipboardButton.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ClipboardButton.tsx')
-rw-r--r--src/components/ClipboardButton.tsx28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/components/ClipboardButton.tsx b/src/components/ClipboardButton.tsx
index cf11e6e..3760e81 100644
--- a/src/components/ClipboardButton.tsx
+++ b/src/components/ClipboardButton.tsx
@@ -1,26 +1,9 @@
-import { useState } from "react";
import { PanelSectionRow, ButtonItem } from "@decky/ui";
-import { FaClipboard, FaCheck } from "react-icons/fa";
-import { getLaunchOption } from "../api/lsfgApi";
+import { FaExternalLinkAlt } from "react-icons/fa";
export function ClipboardButton() {
- const [copied, setCopied] = useState(false);
-
- const handleClipboardClick = async () => {
- try {
- // Get the launch option from the backend
- const response = await getLaunchOption();
- const launchOption = response.launch_option;
-
- // Copy to clipboard
- await navigator.clipboard.writeText(launchOption);
- setCopied(true);
-
- // Reset the copied state after 2 seconds
- setTimeout(() => setCopied(false), 2000);
- } catch (error) {
- console.error("Failed to copy launch option:", error);
- }
+ const handleClipboardClick = () => {
+ window.open("https://github.com/xXJSONDeruloXx/decky-lossless-scaling-vk/wiki/Clipboard", "_blank");
};
return (
@@ -28,11 +11,10 @@ export function ClipboardButton() {
<ButtonItem
layout="below"
onClick={handleClipboardClick}
- description="Copy the launch option needed for Steam games"
>
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
- {copied ? <FaCheck style={{ color: "green" }} /> : <FaClipboard />}
- <div>{copied ? "Copied!" : "Copy Launch Option"}</div>
+ <FaExternalLinkAlt />
+ <div>Launch Option Clipboard</div>
</div>
</ButtonItem>
</PanelSectionRow>