1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-11 04:43:03 +03:00

feat(core/settings/serial/ssh/telnet): add clearServiceMessagesOnConnect option on connectable profile

This commit is contained in:
Clem 2023-08-14 15:24:41 +02:00
parent 21e38c8453
commit ef6b8a4eaa
6 changed files with 14 additions and 1 deletions

View File

@ -22,6 +22,7 @@ export interface Profile {
}
export interface ConnectableProfile extends Profile {
clearServiceMessagesOnConnect: boolean
}
export type PartialProfile<T extends Profile> = Omit<Omit<Omit<{

View File

@ -32,6 +32,7 @@ export class SerialProfilesService extends ConnectableProfileProvider<SerialProf
slowSend: false,
input: { backspace: 'backspace' },
},
clearServiceMessagesOnConnect: false,
}
constructor (

View File

@ -76,7 +76,13 @@
option(ngValue='keep', translate) Keep
option(*ngIf='isConnectable()', ngValue='reconnect', translate) Reconnect
option(ngValue='close', translate) Close
.form-line(*ngIf='isConnectable()')
.header
.title(translate) Clear terminal after connection
toggle(
[(ngModel)]='profile.clearServiceMessagesOnConnect',
)
.mb-4
.col-12.col-lg-8(*ngIf='this.profileProvider.settingsComponent')

View File

@ -44,6 +44,7 @@ export class SSHProfilesService extends ConnectableProfileProvider<SSHProfile> {
reuseSession: true,
input: { backspace: 'backspace' },
},
clearServiceMessagesOnConnect: true,
}
constructor (

View File

@ -21,6 +21,7 @@ export class TelnetProfilesService extends ConnectableProfileProvider<TelnetProf
scripts: [],
input: { backspace: 'backspace' },
},
clearServiceMessagesOnConnect: false,
}
constructor (private translate: TranslateService) { super() }

View File

@ -57,6 +57,9 @@ export abstract class ConnectableTerminalTabComponent<P extends ConnectableTermi
async initializeSession (): Promise<void> {
this.reconnectOffered = false
this.isDisconnectedByHand = false
if (this.profile.clearServiceMessagesOnConnect) {
this.frontend?.clear()
}
}
/**