mirror of
https://github.com/Eugeny/tabby.git
synced 2025-08-16 14:21:53 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
beb7c614bc | ||
![]() |
ef3c9e3be0 |
@@ -192,6 +192,14 @@ export abstract class BaseTabComponent extends BaseComponent {
|
|||||||
this.viewContainer = undefined
|
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
|
* Called before the tab is closed
|
||||||
*/
|
*/
|
||||||
|
@@ -458,12 +458,18 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
|||||||
tab.destroy()
|
tab.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let allTabs: BaseTabComponent[] = []
|
||||||
if (thing instanceof BaseTabComponent) {
|
if (thing instanceof BaseTabComponent) {
|
||||||
if (thing.parent instanceof SplitTabComponent) {
|
allTabs = [thing]
|
||||||
thing.parent.removeTab(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()
|
tab.removeFromContainer()
|
||||||
thing.parent = this
|
tab.parent = this
|
||||||
}
|
}
|
||||||
|
|
||||||
let target = relative ? this.getParentOf(relative) : null
|
let target = relative ? this.getParentOf(relative) : null
|
||||||
|
@@ -46,6 +46,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-close svg {
|
.btn-link svg {
|
||||||
width: 12px;
|
width: 12px;
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
padding: 5px 15px 5px 15px;
|
padding: 5px 15px 5px 15px;
|
||||||
display: flex;
|
display: flex;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
::ng-deep .btn {
|
::ng-deep .btn {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@@ -29,7 +29,7 @@ export class TerminalToolbarComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get shouldShowDragHandle (): boolean {
|
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 () {
|
@HostListener('mouseenter') onMouseEnter () {
|
||||||
|
Reference in New Issue
Block a user