mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-09 17:18:46 +03:00
keep "disable dynamic title" while duplicating or restoring a tab - fixes #4334
This commit is contained in:
parent
28b84e38ca
commit
fa70447223
@ -93,13 +93,13 @@ export class SplitContainer {
|
||||
return s
|
||||
}
|
||||
|
||||
async serialize (): Promise<RecoveryToken> {
|
||||
async serialize (tabsRecovery: TabRecoveryService): Promise<RecoveryToken> {
|
||||
const children: any[] = []
|
||||
for (const child of this.children) {
|
||||
if (child instanceof SplitContainer) {
|
||||
children.push(await child.serialize())
|
||||
children.push(await child.serialize(tabsRecovery))
|
||||
} else {
|
||||
children.push(await child.getRecoveryToken())
|
||||
children.push(await tabsRecovery.getFullRecoveryToken(child))
|
||||
}
|
||||
}
|
||||
return {
|
||||
@ -565,7 +565,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
||||
|
||||
/** @hidden */
|
||||
async getRecoveryToken (): Promise<any> {
|
||||
return this.root.serialize()
|
||||
return this.root.serialize(this.tabRecovery)
|
||||
}
|
||||
|
||||
/** @hidden */
|
||||
|
@ -42,7 +42,7 @@ export class ProfilesService {
|
||||
tab.setTitle(profile.name)
|
||||
}
|
||||
if (profile.disableDynamicTitle) {
|
||||
tab['enableDynamicTitle'] = false
|
||||
tab['disableDynamicTitle'] = true
|
||||
}
|
||||
return tab
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ export class TabRecoveryService {
|
||||
if (tab.color) {
|
||||
token.tabColor = tab.color
|
||||
}
|
||||
token.disableDynamicTitle = tab['disableDynamicTitle']
|
||||
}
|
||||
return token
|
||||
}
|
||||
@ -54,6 +55,7 @@ export class TabRecoveryService {
|
||||
tab.inputs = tab.inputs ?? {}
|
||||
tab.inputs.color = token.tabColor ?? null
|
||||
tab.inputs.title = token.tabTitle || ''
|
||||
tab.inputs.disableDynamicTitle = token.disableDynamicTitle
|
||||
return tab
|
||||
} catch (error) {
|
||||
this.logger.warn('Tab recovery crashed:', token, provider, error)
|
||||
|
@ -111,4 +111,4 @@ export default class SSHModule {
|
||||
|
||||
export * from './api'
|
||||
export { SFTPFile, SFTPSession } from './session/sftp'
|
||||
export { SFTPPanelComponent }
|
||||
export { SFTPPanelComponent, SFTPContextMenuItemProvider }
|
||||
|
@ -98,9 +98,9 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
||||
enablePassthrough = true
|
||||
|
||||
/**
|
||||
* Enables receiving dynamic window/tab title provided by the shell
|
||||
* Disables display of dynamic window/tab title provided by the shell
|
||||
*/
|
||||
enableDynamicTitle = true
|
||||
disableDynamicTitle = false
|
||||
|
||||
alternateScreenActive = false
|
||||
|
||||
@ -586,7 +586,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
||||
}
|
||||
|
||||
this.termContainerSubscriptions.subscribe(this.frontend.title$, title => this.zone.run(() => {
|
||||
if (this.enableDynamicTitle) {
|
||||
if (!this.disableDynamicTitle) {
|
||||
this.setTitle(title)
|
||||
}
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user