diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Content.tsx | 14 | ||||
| -rw-r--r-- | src/components/SmartClipboardButton.tsx | 7 |
2 files changed, 1 insertions, 20 deletions
diff --git a/src/components/Content.tsx b/src/components/Content.tsx index 28eefa7..3dc2696 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -39,25 +39,20 @@ export function Content() { const { isInstalling, isUninstalling, handleInstall, handleUninstall } = useInstallationActions(); - // Reload config when installation status changes useEffect(() => { if (isInstalled) { loadLsfgConfig(); } }, [isInstalled, loadLsfgConfig]); - // Generic configuration change handler const handleConfigChange = async (fieldName: keyof ConfigurationData, value: boolean | number | string) => { - // If we have a current profile, update that profile specifically if (currentProfile) { const newConfig = { ...config, [fieldName]: value }; const result = await updateProfileConfig(currentProfile, newConfig); if (result.success) { - // Reload config to reflect the changes from the backend await loadLsfgConfig(); } } else { - // Fallback to the original method for backward compatibility await updateField(fieldName, value); } }; @@ -80,7 +75,6 @@ export function Content() { return ( <PanelSection> - {/* Show installation components at top when not fully installed */} {!isInstalled && ( <> <InstallationButton @@ -100,7 +94,6 @@ export function Content() { </> )} - {/* FPS multiplier controls stay above profile selection when installed */} {isInstalled && ( <> <PanelSectionRow> @@ -126,7 +119,6 @@ export function Content() { </> )} - {/* Profile Management - only show if installed */} {isInstalled && ( <ProfileManagement currentProfile={currentProfile} @@ -137,7 +129,6 @@ export function Content() { /> )} - {/* Configuration Section - only show if installed */} {isInstalled && ( <ConfigurationSection config={config} @@ -145,7 +136,6 @@ export function Content() { /> )} - {/* Clipboard buttons sit beside usage info for quick access */} {isInstalled && ( <> <SmartClipboardButton /> @@ -153,10 +143,8 @@ export function Content() { </> )} - {/* Usage instructions - always visible for user guidance */} <UsageInstructions config={config} /> - {/* Nerd Stuff Button */} <PanelSectionRow> <ButtonItem layout="below" @@ -166,7 +154,6 @@ export function Content() { </ButtonItem> </PanelSectionRow> - {/* Flatpaks Button */} <PanelSectionRow> <ButtonItem layout="below" @@ -176,7 +163,6 @@ export function Content() { </ButtonItem> </PanelSectionRow> - {/* Status and uninstall sit at bottom when installed to match desired layout */} {isInstalled && ( <> <StatusDisplay diff --git a/src/components/SmartClipboardButton.tsx b/src/components/SmartClipboardButton.tsx index 7be3b2f..c90515a 100644 --- a/src/components/SmartClipboardButton.tsx +++ b/src/components/SmartClipboardButton.tsx @@ -9,7 +9,6 @@ export function SmartClipboardButton() { const [isLoading, setIsLoading] = useState(false); const [showSuccess, setShowSuccess] = useState(false); - // Reset success state after 3 seconds useEffect(() => { if (showSuccess) { const timer = setTimeout(() => { @@ -38,10 +37,8 @@ export function SmartClipboardButton() { const { success, verified } = await copyWithVerification(text); if (success) { - // Show success feedback in the button instead of toast setShowSuccess(true); if (!verified) { - // Copy worked but verification failed - still show success console.log('Copy verification failed but copy likely worked'); } } else { @@ -64,9 +61,7 @@ export function SmartClipboardButton() { > <div style={{ display: "flex", alignItems: "center", gap: "8px" }}> {showSuccess ? ( - <FaCheck style={{ - color: "#4CAF50" // Green color for success - }} /> + <FaCheck style={{ color: "#4CAF50" }} /> ) : isLoading ? ( <FaClipboard style={{ animation: "pulse 1s ease-in-out infinite", |
