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:
parent
21e38c8453
commit
ef6b8a4eaa
@ -22,6 +22,7 @@ export interface Profile {
|
||||
}
|
||||
|
||||
export interface ConnectableProfile extends Profile {
|
||||
clearServiceMessagesOnConnect: boolean
|
||||
}
|
||||
|
||||
export type PartialProfile<T extends Profile> = Omit<Omit<Omit<{
|
||||
|
@ -32,6 +32,7 @@ export class SerialProfilesService extends ConnectableProfileProvider<SerialProf
|
||||
slowSend: false,
|
||||
input: { backspace: 'backspace' },
|
||||
},
|
||||
clearServiceMessagesOnConnect: false,
|
||||
}
|
||||
|
||||
constructor (
|
||||
|
@ -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')
|
||||
|
@ -44,6 +44,7 @@ export class SSHProfilesService extends ConnectableProfileProvider<SSHProfile> {
|
||||
reuseSession: true,
|
||||
input: { backspace: 'backspace' },
|
||||
},
|
||||
clearServiceMessagesOnConnect: true,
|
||||
}
|
||||
|
||||
constructor (
|
||||
|
@ -21,6 +21,7 @@ export class TelnetProfilesService extends ConnectableProfileProvider<TelnetProf
|
||||
scripts: [],
|
||||
input: { backspace: 'backspace' },
|
||||
},
|
||||
clearServiceMessagesOnConnect: false,
|
||||
}
|
||||
|
||||
constructor (private translate: TranslateService) { super() }
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user