Compare commits

..

2 Commits

Author SHA1 Message Date
Eugene Pankov
beb7c614bc fixed #8093 - SFTP panel visual issues 2023-03-19 10:09:43 +01:00
Eugene Pankov
ef3c9e3be0 fixed #8028 - ghost panes and missing pane drag handle 2023-03-18 20:01:28 +01:00
5 changed files with 21 additions and 6 deletions

View File

@@ -192,6 +192,14 @@ export abstract class BaseTabComponent extends BaseComponent {
this.viewContainer = undefined
}
get topmostParent (): BaseTabComponent|null {
let parent = this.parent
while (parent?.parent) {
parent = parent.parent
}
return parent
}
/**
* Called before the tab is closed
*/

View File

@@ -458,12 +458,18 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
tab.destroy()
}
let allTabs: BaseTabComponent[] = []
if (thing instanceof BaseTabComponent) {
if (thing.parent instanceof SplitTabComponent) {
thing.parent.removeTab(thing)
allTabs = [thing]
} else if (thing instanceof SplitContainer) {
allTabs = thing.getAllTabs()
}
for (const tab of allTabs) {
if (tab.parent instanceof SplitTabComponent) {
tab.parent.removeTab(tab)
}
thing.removeFromContainer()
thing.parent = this
tab.removeFromContainer()
tab.parent = this
}
let target = relative ? this.getParentOf(relative) : null

View File

@@ -46,6 +46,6 @@
}
}
.btn-close svg {
.btn-link svg {
width: 12px;
}

View File

@@ -2,6 +2,7 @@
padding: 5px 15px 5px 15px;
display: flex;
z-index: 3;
overflow: hidden;
::ng-deep .btn {
white-space: nowrap;

View File

@@ -29,7 +29,7 @@ export class TerminalToolbarComponent {
}
get shouldShowDragHandle (): boolean {
return this.tab.parent instanceof SplitTabComponent && this.tab.parent.getAllTabs().length > 1
return this.tab.topmostParent instanceof SplitTabComponent && this.tab.topmostParent.getAllTabs().length > 1
}
@HostListener('mouseenter') onMouseEnter () {