From c4ad02ff92aacce7dd55c3a9332450bb34894851 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 22 Nov 2025 17:32:47 +0100 Subject: [PATCH] Update terminal-panel.tsx --- AppImage/components/terminal-panel.tsx | 39 ++++++-------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/AppImage/components/terminal-panel.tsx b/AppImage/components/terminal-panel.tsx index 66f7e07..f15e538 100644 --- a/AppImage/components/terminal-panel.tsx +++ b/AppImage/components/terminal-panel.tsx @@ -3,22 +3,8 @@ import type React from "react" import { useEffect, useRef, useState, useCallback } from "react" import { API_PORT } from "@/lib/api-config" -import { - Activity, - Trash2, - X, - Search, - Send, - Wifi, - WifiOff, - Lightbulb, - Terminal, - Plus, - Split, - Grid2X2, -} from "lucide-react" +import { Activity, Trash2, X, Search, Send, Lightbulb, Terminal, Plus, Split, Grid2X2 } from "lucide-react" import { Button } from "@/components/ui/button" -import { Badge } from "@/components/ui/badge" import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog" import { Input } from "@/components/ui/input" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" @@ -226,8 +212,7 @@ export const TerminalPanel: React.FC = ({ websocketUrl, onCl throw new Error("No valid examples found") } } catch (error) { - console.log("[v0] Falling back to offline mode:", error) - setUseOnline(false) + console.log("[v0] Error fetching from cheat.sh, showing offline results:", error) const filtered = proxmoxCommands.filter( (item) => item.cmd.toLowerCase().includes(query.toLowerCase()) || @@ -247,7 +232,6 @@ export const TerminalPanel: React.FC = ({ websocketUrl, onCl } else { setSearchResults([]) setFilteredCommands(proxmoxCommands) - setUseOnline(true) // Reset to online when query is cleared } }, 800) // Increased debounce to 800ms to avoid premature requests @@ -652,19 +636,12 @@ export const TerminalPanel: React.FC = ({ websocketUrl, onCl Search Commands - - {useOnline ? ( - <> - - Online Mode - - ) : ( - <> - - Offline Mode - - )} - +
+
+
Search for Linux and Proxmox commands