summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorKurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>2025-08-06 21:42:38 -0400
committerGitHub <noreply@github.com>2025-08-06 21:42:38 -0400
commit4967dbb4ea19182c982c8107574a85f306266e8f (patch)
treec4eca36e77886d847f02f426fe26eadeada9599f /src/components
parent284181443578e70066fce70d7d067f219cc85b3d (diff)
downloadDecky-Framegen-4967dbb4ea19182c982c8107574a85f306266e8f.tar.gz
Decky-Framegen-4967dbb4ea19182c982c8107574a85f306266e8f.zip
Pr fixes (#126)
* rm flatpak function, rm legacy script * feat: add warning modal on copy button
Diffstat (limited to 'src/components')
-rw-r--r--src/components/SmartClipboardButton.tsx28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/components/SmartClipboardButton.tsx b/src/components/SmartClipboardButton.tsx
index 095da15..d88a58a 100644
--- a/src/components/SmartClipboardButton.tsx
+++ b/src/components/SmartClipboardButton.tsx
@@ -1,5 +1,5 @@
import { useState, useEffect } from "react";
-import { PanelSectionRow, ButtonItem } from "@decky/ui";
+import { PanelSectionRow, ButtonItem, ConfirmModal, showModal } from "@decky/ui";
import { FaClipboard, FaCheck } from "react-icons/fa";
import { toaster } from "@decky/api";
@@ -29,6 +29,32 @@ export function SmartClipboardButton({
const copyToClipboard = async () => {
if (isLoading || showSuccess) return;
+ const isPatchCommand = command.includes("fgmod %command%") && !command.includes("uninstaller");
+
+ if (isPatchCommand) {
+ showModal(
+ <ConfirmModal
+ strTitle={`Patch Game with OptiScaler?`}
+ strDescription={
+ "WARNING: Decky Framegen does not unpatch games when uninstalled. Be sure to unpatch the game or run the OptiScaler uninstall script inside the game files if you choose to uninstall the plugin or the game has issues."
+ }
+ strOKButtonText="Copy Patch Command"
+ strCancelButtonText="Cancel"
+ onOK={async () => {
+ await performCopy();
+ }}
+ />
+ );
+ return;
+ }
+
+ // For non-patch commands, copy directly
+ await performCopy();
+ };
+
+ const performCopy = async () => {
+ if (isLoading || showSuccess) return;
+
setIsLoading(true);
try {
const text = command;