mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-14 00:20:13 +00: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 {
|
export interface ConnectableProfile extends Profile {
|
||||||
|
clearServiceMessagesOnConnect: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PartialProfile<T extends Profile> = Omit<Omit<Omit<{
|
export type PartialProfile<T extends Profile> = Omit<Omit<Omit<{
|
||||||
|
@ -32,6 +32,7 @@ export class SerialProfilesService extends ConnectableProfileProvider<SerialProf
|
|||||||
slowSend: false,
|
slowSend: false,
|
||||||
input: { backspace: 'backspace' },
|
input: { backspace: 'backspace' },
|
||||||
},
|
},
|
||||||
|
clearServiceMessagesOnConnect: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
|
@ -77,6 +77,12 @@
|
|||||||
option(*ngIf='isConnectable()', ngValue='reconnect', translate) Reconnect
|
option(*ngIf='isConnectable()', ngValue='reconnect', translate) Reconnect
|
||||||
option(ngValue='close', translate) Close
|
option(ngValue='close', translate) Close
|
||||||
|
|
||||||
|
.form-line(*ngIf='isConnectable()')
|
||||||
|
.header
|
||||||
|
.title(translate) Clear terminal after connection
|
||||||
|
toggle(
|
||||||
|
[(ngModel)]='profile.clearServiceMessagesOnConnect',
|
||||||
|
)
|
||||||
.mb-4
|
.mb-4
|
||||||
|
|
||||||
.col-12.col-lg-8(*ngIf='this.profileProvider.settingsComponent')
|
.col-12.col-lg-8(*ngIf='this.profileProvider.settingsComponent')
|
||||||
|
@ -44,6 +44,7 @@ export class SSHProfilesService extends ConnectableProfileProvider<SSHProfile> {
|
|||||||
reuseSession: true,
|
reuseSession: true,
|
||||||
input: { backspace: 'backspace' },
|
input: { backspace: 'backspace' },
|
||||||
},
|
},
|
||||||
|
clearServiceMessagesOnConnect: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
|
@ -21,6 +21,7 @@ export class TelnetProfilesService extends ConnectableProfileProvider<TelnetProf
|
|||||||
scripts: [],
|
scripts: [],
|
||||||
input: { backspace: 'backspace' },
|
input: { backspace: 'backspace' },
|
||||||
},
|
},
|
||||||
|
clearServiceMessagesOnConnect: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor (private translate: TranslateService) { super() }
|
constructor (private translate: TranslateService) { super() }
|
||||||
|
@ -57,6 +57,9 @@ export abstract class ConnectableTerminalTabComponent<P extends ConnectableTermi
|
|||||||
async initializeSession (): Promise<void> {
|
async initializeSession (): Promise<void> {
|
||||||
this.reconnectOffered = false
|
this.reconnectOffered = false
|
||||||
this.isDisconnectedByHand = false
|
this.isDisconnectedByHand = false
|
||||||
|
if (this.profile.clearServiceMessagesOnConnect) {
|
||||||
|
this.frontend?.clear()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user