mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-24 14:47:39 +00:00
Make the session exited clearer
This commit is contained in:
parent
3758e2d375
commit
3c7b2855d3
2 changed files with 21 additions and 5 deletions
|
|
@ -1222,6 +1222,7 @@ export class SessionView extends LitElement {
|
|||
<!-- Terminal Component -->
|
||||
<vibe-terminal
|
||||
.sessionId=${this.session?.id || ''}
|
||||
.sessionStatus=${this.session?.status || 'running'}
|
||||
.cols=${80}
|
||||
.rows=${24}
|
||||
.fontSize=${this.terminalFontSize}
|
||||
|
|
@ -1231,6 +1232,21 @@ export class SessionView extends LitElement {
|
|||
></vibe-terminal>
|
||||
</div>
|
||||
|
||||
<!-- Floating Session Exited Banner (outside terminal container to avoid filter effects) -->
|
||||
${this.session?.status === 'exited'
|
||||
? html`
|
||||
<div
|
||||
class="absolute inset-0 flex items-center justify-center pointer-events-none z-50"
|
||||
>
|
||||
<div
|
||||
class="bg-dark-bg-secondary border border-dark-border ${this.getStatusColor()} font-medium text-sm tracking-wide px-4 py-2 rounded-lg shadow-lg"
|
||||
>
|
||||
SESSION EXITED
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
: ''}
|
||||
|
||||
<!-- Mobile Input Controls -->
|
||||
${this.isMobile && !this.showMobileInput
|
||||
? html`
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export class Terminal extends LitElement {
|
|||
}
|
||||
|
||||
@property({ type: String }) sessionId = '';
|
||||
@property({ type: String }) sessionStatus = 'running'; // Track session status for cursor control
|
||||
@property({ type: Number }) cols = 80;
|
||||
@property({ type: Number }) rows = 24;
|
||||
@property({ type: Number }) fontSize = 14;
|
||||
|
|
@ -700,11 +701,10 @@ export class Terminal extends LitElement {
|
|||
|
||||
// Check if cursor is on this line (relative to viewport)
|
||||
const isCursorLine = row === cursorY;
|
||||
const lineContent = this.renderLine(
|
||||
line,
|
||||
cell,
|
||||
isCursorLine && this.cursorVisible ? cursorX : -1
|
||||
);
|
||||
// Hide cursor for exited sessions or when explicitly disabled via ANSI escape sequences
|
||||
const shouldShowCursor =
|
||||
isCursorLine && this.cursorVisible && this.sessionStatus !== 'exited';
|
||||
const lineContent = this.renderLine(line, cell, shouldShowCursor ? cursorX : -1);
|
||||
|
||||
html += `<div class="terminal-line"${style}>${lineContent || ''}</div>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue