From 5eeaef954c8f5f3e8a60c98a8b055a718d16423a Mon Sep 17 00:00:00 2001 From: Clem Date: Mon, 14 Aug 2023 15:53:58 +0200 Subject: [PATCH] ref(settings/ssh): migrate and remove deprecated clearServiceMessagesOnConnect ssh option --- tabby-core/src/services/config.service.ts | 7 +++++++ tabby-ssh/src/components/sshSettingsTab.component.pug | 8 -------- tabby-ssh/src/components/sshTab.component.ts | 4 ---- tabby-ssh/src/config.ts | 1 - 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/tabby-core/src/services/config.service.ts b/tabby-core/src/services/config.service.ts index daa0d746..b4c884ed 100644 --- a/tabby-core/src/services/config.service.ts +++ b/tabby-core/src/services/config.service.ts @@ -364,6 +364,13 @@ export class ConfigService { } config.version = 4 } + if (config.version < 6) { + if (config.ssh.clearServiceMessagesOnConnect === false) { + config.profileDefaults.ssh.clearServiceMessagesOnConnect = false + delete config.ssh?.clearServiceMessagesOnConnect + } + config.version = 6 + } } private async maybeDecryptConfig (store) { diff --git a/tabby-ssh/src/components/sshSettingsTab.component.pug b/tabby-ssh/src/components/sshSettingsTab.component.pug index 2ff88f71..fd50f44f 100644 --- a/tabby-ssh/src/components/sshSettingsTab.component.pug +++ b/tabby-ssh/src/components/sshSettingsTab.component.pug @@ -61,12 +61,4 @@ h3 SSH (ngModelChange)='config.save()' ) -.form-line - .header - .title(translate) Clear terminal after connection - toggle( - [(ngModel)]='config.store.ssh.clearServiceMessagesOnConnect', - (ngModelChange)='config.save()', - ) - .alert.alert-info(translate) SSH connection management is now done through the "Profiles & connections" tab diff --git a/tabby-ssh/src/components/sshTab.component.ts b/tabby-ssh/src/components/sshTab.component.ts index e7fd7815..738862dd 100644 --- a/tabby-ssh/src/components/sshTab.component.ts +++ b/tabby-ssh/src/components/sshTab.component.ts @@ -163,10 +163,6 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent await session.start() - if (this.config.store.ssh.clearServiceMessagesOnConnect) { - this.frontend?.clear() - } - this.session?.resize(this.size.columns, this.size.rows) } diff --git a/tabby-ssh/src/config.ts b/tabby-ssh/src/config.ts index 82a35cdc..8c32ba89 100644 --- a/tabby-ssh/src/config.ts +++ b/tabby-ssh/src/config.ts @@ -11,7 +11,6 @@ export class SSHConfigProvider extends ConfigProvider { x11Display: null, knownHosts: [], verifyHostKeys: true, - clearServiceMessagesOnConnect: true, }, hotkeys: { 'restart-ssh-session': [],