|
@@ -2466,66 +2466,17 @@ export default function Page() {
|
|
|
</Tabs>
|
|
</Tabs>
|
|
|
<div class="flex-1 min-h-0 relative">
|
|
<div class="flex-1 min-h-0 relative">
|
|
|
<For each={terminal.all()}>
|
|
<For each={terminal.all()}>
|
|
|
- {(pty) => {
|
|
|
|
|
- const [dismissed, setDismissed] = createSignal(false)
|
|
|
|
|
- return (
|
|
|
|
|
- <div
|
|
|
|
|
- id={`terminal-wrapper-${pty.id}`}
|
|
|
|
|
- class="absolute inset-0"
|
|
|
|
|
- style={{
|
|
|
|
|
- display: terminal.active() === pty.id ? "block" : "none",
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- <Terminal
|
|
|
|
|
- pty={pty}
|
|
|
|
|
- onCleanup={(data) => terminal.update({ ...data, id: pty.id })}
|
|
|
|
|
- onConnect={() => {
|
|
|
|
|
- terminal.update({ id: pty.id, error: false })
|
|
|
|
|
- setDismissed(false)
|
|
|
|
|
- }}
|
|
|
|
|
- onConnectError={() => {
|
|
|
|
|
- setDismissed(false)
|
|
|
|
|
- terminal.update({ id: pty.id, error: true })
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
- <Show when={pty.error && !dismissed()}>
|
|
|
|
|
- <div
|
|
|
|
|
- class="absolute inset-0 flex flex-col items-center justify-center gap-3"
|
|
|
|
|
- style={{ "background-color": "rgba(0, 0, 0, 0.6)" }}
|
|
|
|
|
- >
|
|
|
|
|
- <Icon
|
|
|
|
|
- name="circle-ban-sign"
|
|
|
|
|
- class="w-8 h-8"
|
|
|
|
|
- style={{ color: "rgba(239, 68, 68, 0.8)" }}
|
|
|
|
|
- />
|
|
|
|
|
- <div class="text-center" style={{ color: "rgba(255, 255, 255, 0.7)" }}>
|
|
|
|
|
- <div class="text-14-semibold mb-1">{language.t("terminal.connectionLost.title")}</div>
|
|
|
|
|
- <div class="text-12-regular" style={{ color: "rgba(255, 255, 255, 0.5)" }}>
|
|
|
|
|
- {language.t("terminal.connectionLost.description")}
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button
|
|
|
|
|
- class="mt-2 px-3 py-1.5 text-12-medium rounded-lg transition-colors"
|
|
|
|
|
- style={{
|
|
|
|
|
- "background-color": "rgba(255, 255, 255, 0.1)",
|
|
|
|
|
- color: "rgba(255, 255, 255, 0.7)",
|
|
|
|
|
- border: "1px solid rgba(255, 255, 255, 0.2)",
|
|
|
|
|
- }}
|
|
|
|
|
- onMouseEnter={(e) =>
|
|
|
|
|
- (e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.15)")
|
|
|
|
|
- }
|
|
|
|
|
- onMouseLeave={(e) =>
|
|
|
|
|
- (e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.1)")
|
|
|
|
|
- }
|
|
|
|
|
- onClick={() => setDismissed(true)}
|
|
|
|
|
- >
|
|
|
|
|
- {language.t("common.dismiss")}
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Show>
|
|
|
|
|
- </div>
|
|
|
|
|
- )
|
|
|
|
|
- }}
|
|
|
|
|
|
|
+ {(pty) => (
|
|
|
|
|
+ <div
|
|
|
|
|
+ id={`terminal-wrapper-${pty.id}`}
|
|
|
|
|
+ class="absolute inset-0"
|
|
|
|
|
+ style={{
|
|
|
|
|
+ display: terminal.active() === pty.id ? "block" : "none",
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ <Terminal pty={pty} onCleanup={terminal.update} onConnectError={() => terminal.clone(pty.id)} />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ )}
|
|
|
</For>
|
|
</For>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|