don't include tab state in saved layouts

This commit is contained in:
Eugene Pankov
2022-01-10 20:39:29 +01:00
parent 3a11b51729
commit 61c11abda2
15 changed files with 38 additions and 82 deletions

View File

@@ -1,7 +1,7 @@
import colors from 'ansi-colors'
import { Component, Injector } from '@angular/core'
import { first } from 'rxjs'
import { Platform, RecoveryToken } from 'tabby-core'
import { GetRecoveryTokenOptions, Platform, RecoveryToken } from 'tabby-core'
import { BaseTerminalTabComponent } from 'tabby-terminal'
import { TelnetProfile, TelnetSession } from '../session'
@@ -97,11 +97,11 @@ export class TelnetTabComponent extends BaseTerminalTabComponent {
}
}
async getRecoveryToken (): Promise<RecoveryToken> {
async getRecoveryToken (options?: GetRecoveryTokenOptions): Promise<RecoveryToken> {
return {
type: 'app:telnet-tab',
profile: this.profile,
savedState: this.frontend?.saveState(),
savedState: options?.includeState && this.frontend?.saveState(),
}
}

View File

@@ -19,11 +19,4 @@ export class RecoveryProvider extends TabRecoveryProvider<TelnetTabComponent> {
},
}
}
duplicate (recoveryToken: RecoveryToken): RecoveryToken {
return {
...recoveryToken,
savedState: null,
}
}
}