make tabs always-present in DOM

This commit is contained in:
Eugene Pankov
2021-04-04 20:03:03 +02:00
parent d71ee6b6f1
commit 80c781a8ca
3 changed files with 29 additions and 16 deletions

View File

@@ -95,12 +95,14 @@ title-bar(
&& (hostApp.platform == Platform.Windows || hostApp.platform == Platform.Linux)', && (hostApp.platform == Platform.Windows || hostApp.platform == Platform.Linux)',
) )
start-page(*ngIf='ready && app.tabs.length == 0') .content
start-page.content-tab.content-tab-active(*ngIf='ready && app.tabs.length == 0')
tab-body( tab-body.content-tab(
*ngFor='let tab of unsortedTabs', *ngFor='let tab of unsortedTabs',
[active]='tab == app.activeTab', [class.content-tab-active]='tab == app.activeTab',
[tab]='tab', [active]='tab == app.activeTab',
) [tab]='tab',
)
ng-template(ngbModalContainer) ng-template(ngbModalContainer)

View File

@@ -134,9 +134,24 @@ $side-tab-width: 200px;
} }
} }
.tabs-content { .content {
flex: auto; flex: 1 1 0;
display: flex; position: relative;
min-height: 0;
min-width: 0;
> .content-tab {
position: absolute;
top: 0;
width: 100%;
height: 100%;
left: 100%;
&.content-tab-active {
left: 0;
}
}
} }
hotkey-hint { hotkey-hint {

View File

@@ -1,15 +1,11 @@
:host { :host {
display: none; display: flex;
flex: auto; flex: auto;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
&.active { >* {
display: flex; flex: auto;
>* {
flex: auto;
}
} }
> perfect-scrollbar { > perfect-scrollbar {