mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-12-14 16:16:21 +00:00
Update AppImage
This commit is contained in:
@@ -143,6 +143,13 @@ export function ScriptTerminalModal({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value === "cancel" || value === "") {
|
||||||
|
setCurrentInteraction(null)
|
||||||
|
setInteractionInput("")
|
||||||
|
handleCloseModal()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const response = JSON.stringify({
|
const response = JSON.stringify({
|
||||||
type: "interaction_response",
|
type: "interaction_response",
|
||||||
id: currentInteraction.id,
|
id: currentInteraction.id,
|
||||||
@@ -209,11 +216,13 @@ export function ScriptTerminalModal({
|
|||||||
|
|
||||||
{!isMobile && (
|
{!isMobile && (
|
||||||
<div
|
<div
|
||||||
className="h-2 bg-border hover:bg-primary/20 cursor-ns-resize flex items-center justify-center transition-colors"
|
className={`h-2 cursor-ns-resize flex items-center justify-center transition-colors ${
|
||||||
|
isResizing ? "bg-blue-500" : "bg-zinc-800 hover:bg-blue-500/50"
|
||||||
|
}`}
|
||||||
onMouseDown={handleResizeStart}
|
onMouseDown={handleResizeStart}
|
||||||
onTouchStart={handleResizeStart}
|
onTouchStart={handleResizeStart}
|
||||||
>
|
>
|
||||||
<GripHorizontal className="h-4 w-4 text-muted-foreground" />
|
<GripHorizontal className={`h-4 w-4 ${isResizing ? "text-white" : "text-zinc-500"}`} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -244,6 +253,7 @@ export function ScriptTerminalModal({
|
|||||||
className="max-w-4xl max-h-[80vh] overflow-y-auto"
|
className="max-w-4xl max-h-[80vh] overflow-y-auto"
|
||||||
onInteractOutside={(e) => e.preventDefault()}
|
onInteractOutside={(e) => e.preventDefault()}
|
||||||
onEscapeKeyDown={(e) => e.preventDefault()}
|
onEscapeKeyDown={(e) => e.preventDefault()}
|
||||||
|
hideClose
|
||||||
>
|
>
|
||||||
<DialogTitle>{currentInteraction.title}</DialogTitle>
|
<DialogTitle>{currentInteraction.title}</DialogTitle>
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
@@ -264,6 +274,13 @@ export function ScriptTerminalModal({
|
|||||||
>
|
>
|
||||||
No
|
No
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => handleInteractionResponse("cancel")}
|
||||||
|
variant="outline"
|
||||||
|
className="flex-1 hover:bg-red-600 hover:text-white hover:border-red-600"
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -284,7 +301,7 @@ export function ScriptTerminalModal({
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
className="w-full hover:bg-red-600 hover:text-white hover:border-red-600"
|
className="w-full hover:bg-red-600 hover:text-white hover:border-red-600"
|
||||||
>
|
>
|
||||||
Cancel / Go Back
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -310,7 +327,7 @@ export function ScriptTerminalModal({
|
|||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => handleInteractionResponse("")}
|
onClick={() => handleInteractionResponse("cancel")}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
className="flex-1 hover:bg-red-600 hover:text-white hover:border-red-600"
|
className="flex-1 hover:bg-red-600 hover:text-white hover:border-red-600"
|
||||||
>
|
>
|
||||||
@@ -321,12 +338,21 @@ export function ScriptTerminalModal({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{currentInteraction.type === "msgbox" && (
|
{currentInteraction.type === "msgbox" && (
|
||||||
<Button
|
<div className="flex gap-2">
|
||||||
onClick={() => handleInteractionResponse("ok")}
|
<Button
|
||||||
className="w-full bg-blue-600 hover:bg-blue-700"
|
onClick={() => handleInteractionResponse("ok")}
|
||||||
>
|
className="flex-1 bg-blue-600 hover:bg-blue-700"
|
||||||
OK
|
>
|
||||||
</Button>
|
OK
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => handleInteractionResponse("cancel")}
|
||||||
|
variant="outline"
|
||||||
|
className="flex-1 hover:bg-red-600 hover:text-white hover:border-red-600"
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -676,6 +676,21 @@ export const TerminalPanel: React.FC<TerminalPanelProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Terminal Tabs */}
|
||||||
|
<div className="flex gap-1 px-2 py-1 bg-zinc-900 border-b border-zinc-800 overflow-x-auto">
|
||||||
|
{terminals.map((terminal) => (
|
||||||
|
<button
|
||||||
|
key={terminal.id}
|
||||||
|
onClick={() => setActiveTerminalId(terminal.id)}
|
||||||
|
className={`px-3 py-1 text-xs rounded-t transition-colors ${
|
||||||
|
terminal.id === activeTerminalId ? "bg-zinc-800 text-white" : "text-zinc-500 hover:text-white"
|
||||||
|
} ${isScriptModal ? "hidden" : ""}`}
|
||||||
|
>
|
||||||
|
{terminal.title}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
{isScriptModal && (
|
{isScriptModal && (
|
||||||
<div className="sr-only" data-connection-status={activeTerminal?.isConnected ? "connected" : "disconnected"}>
|
<div className="sr-only" data-connection-status={activeTerminal?.isConnected ? "connected" : "disconnected"}>
|
||||||
Connection Status
|
Connection Status
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ def script_websocket(ws, session_id):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
time.sleep(0.1)
|
time.sleep(0.01)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user