mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
Merge pull request #8726 from Clem-Fern/profiles-rework
This commit is contained in:
@@ -4,7 +4,7 @@ import { Injector, Component } from '@angular/core'
|
||||
|
||||
import { first } from 'rxjs'
|
||||
|
||||
import { BaseTerminalProfile } from './interfaces'
|
||||
import { ConnectableTerminalProfile } from './interfaces'
|
||||
import { BaseTerminalTabComponent } from './baseTerminalTab.component'
|
||||
import { GetRecoveryTokenOptions, RecoveryToken } from 'tabby-core'
|
||||
|
||||
@@ -13,7 +13,7 @@ import { GetRecoveryTokenOptions, RecoveryToken } from 'tabby-core'
|
||||
* A class to base your custom connectable terminal tabs on
|
||||
*/
|
||||
@Component({ template: '' })
|
||||
export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProfile> extends BaseTerminalTabComponent<P> {
|
||||
export abstract class ConnectableTerminalTabComponent<P extends ConnectableTerminalProfile> extends BaseTerminalTabComponent<P> {
|
||||
|
||||
protected reconnectOffered = false
|
||||
protected isDisconnectedByHand = false
|
||||
@@ -57,6 +57,9 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
|
||||
async initializeSession (): Promise<void> {
|
||||
this.reconnectOffered = false
|
||||
this.isDisconnectedByHand = false
|
||||
if (this.profile.clearServiceMessagesOnConnect) {
|
||||
this.frontend?.clear()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Profile } from 'tabby-core'
|
||||
import { ConnectableProfile, Profile } from 'tabby-core'
|
||||
|
||||
export interface ResizeEvent {
|
||||
columns: number
|
||||
@@ -19,3 +19,5 @@ export interface TerminalColorScheme {
|
||||
export interface BaseTerminalProfile extends Profile {
|
||||
terminalColorScheme?: TerminalColorScheme
|
||||
}
|
||||
|
||||
export interface ConnectableTerminalProfile extends BaseTerminalProfile, ConnectableProfile {}
|
||||
|
@@ -175,7 +175,7 @@ export class SaveAsProfileContextMenu extends TabContextMenuItemProvider {
|
||||
const modal = this.ngbModal.open(PromptModalComponent)
|
||||
modal.componentInstance.prompt = this.translate.instant('New profile name')
|
||||
modal.componentInstance.value = tab.profile.name
|
||||
const name = (await modal.result)?.value
|
||||
const name = (await modal.result.catch(() => null))?.value
|
||||
if (!name) {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user