summaryrefslogtreecommitdiff
path: root/src/components/ClipboardButton.tsx
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-07-18 12:12:55 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-07-18 12:12:55 -0400
commitf3846f88402b6216675c9c48c04ab5a30cce3062 (patch)
tree32ac1ec1d1229444bb97c531d12a7d5c749d1afe /src/components/ClipboardButton.tsx
parent48ee73dae1bdecec47ccbaf5456be8c5937cb0fd (diff)
downloaddecky-lsfg-vk-f3846f88402b6216675c9c48c04ab5a30cce3062.tar.gz
decky-lsfg-vk-f3846f88402b6216675c9c48c04ab5a30cce3062.zip
restore clipboard wiki button
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>