mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-10 18:34:36 +00:00
fixed transfers dropdown being clipped by the terminal - fixes #4688
This commit is contained in:
@@ -57,15 +57,20 @@ title-bar(
|
|||||||
div([class.ml-3]='hasIcons(button.submenuItems)') {{item.title}}
|
div([class.ml-3]='hasIcons(button.submenuItems)') {{item.title}}
|
||||||
|
|
||||||
.d-flex(
|
.d-flex(
|
||||||
*ngIf='activeTransfers.length > 0',
|
|
||||||
ngbDropdown,
|
ngbDropdown,
|
||||||
[(open)]='activeTransfersDropdownOpen'
|
container='body',
|
||||||
|
#activeTransfersDropdown='ngbDropdown'
|
||||||
)
|
)
|
||||||
button.btn.btn-secondary.btn-tab-bar(
|
button.btn.btn-secondary.btn-tab-bar(
|
||||||
|
*ngIf='activeTransfers.length > 0',
|
||||||
title='File transfers',
|
title='File transfers',
|
||||||
ngbDropdownToggle
|
ngbDropdownToggle
|
||||||
) !{require('../icons/download-solid.svg')}
|
) !{require('../icons/download-solid.svg')}
|
||||||
transfers-menu(ngbDropdownMenu, [(transfers)]='activeTransfers')
|
transfers-menu(
|
||||||
|
ngbDropdownMenu,
|
||||||
|
[(transfers)]='activeTransfers',
|
||||||
|
(transfersChange)='onTransfersChange()'
|
||||||
|
)
|
||||||
|
|
||||||
.drag-space.background([class.persistent]='config.store.appearance.frame == "thin" && hostApp.platform != Platform.macOS')
|
.drag-space.background([class.persistent]='config.store.appearance.frame == "thin" && hostApp.platform != Platform.macOS')
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
import { Component, Inject, Input, HostListener, HostBinding, ViewChildren } from '@angular/core'
|
import { Component, Inject, Input, HostListener, HostBinding, ViewChildren, ViewChild } from '@angular/core'
|
||||||
import { trigger, style, animate, transition, state } from '@angular/animations'
|
import { trigger, style, animate, transition, state } from '@angular/animations'
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||||
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'
|
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'
|
||||||
|
|
||||||
import { HostAppService, Platform } from '../api/hostApp'
|
import { HostAppService, Platform } from '../api/hostApp'
|
||||||
@@ -60,10 +60,10 @@ export class AppRootComponent {
|
|||||||
@HostBinding('class.platform-linux') platformClassLinux = process.platform === 'linux'
|
@HostBinding('class.platform-linux') platformClassLinux = process.platform === 'linux'
|
||||||
@HostBinding('class.no-tabs') noTabs = true
|
@HostBinding('class.no-tabs') noTabs = true
|
||||||
@ViewChildren(TabBodyComponent) tabBodies: TabBodyComponent[]
|
@ViewChildren(TabBodyComponent) tabBodies: TabBodyComponent[]
|
||||||
|
@ViewChild('activeTransfersDropdown') activeTransfersDropdown: NgbDropdown
|
||||||
unsortedTabs: BaseTabComponent[] = []
|
unsortedTabs: BaseTabComponent[] = []
|
||||||
updatesAvailable = false
|
updatesAvailable = false
|
||||||
activeTransfers: FileTransfer[] = []
|
activeTransfers: FileTransfer[] = []
|
||||||
activeTransfersDropdownOpen = false
|
|
||||||
private logger: Logger
|
private logger: Logger
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
@@ -147,7 +147,7 @@ export class AppRootComponent {
|
|||||||
|
|
||||||
platform.fileTransferStarted$.subscribe(transfer => {
|
platform.fileTransferStarted$.subscribe(transfer => {
|
||||||
this.activeTransfers.push(transfer)
|
this.activeTransfers.push(transfer)
|
||||||
this.activeTransfersDropdownOpen = true
|
this.activeTransfersDropdown.open()
|
||||||
})
|
})
|
||||||
|
|
||||||
config.ready$.toPromise().then(() => {
|
config.ready$.toPromise().then(() => {
|
||||||
@@ -200,6 +200,12 @@ export class AppRootComponent {
|
|||||||
this.app.emitTabsChanged()
|
this.app.emitTabsChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onTransfersChange () {
|
||||||
|
if (this.activeTransfers.length === 0) {
|
||||||
|
this.activeTransfersDropdown.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private getToolbarButtons (aboveZero: boolean): ToolbarButton[] {
|
private getToolbarButtons (aboveZero: boolean): ToolbarButton[] {
|
||||||
let buttons: ToolbarButton[] = []
|
let buttons: ToolbarButton[] = []
|
||||||
this.config.enabledServices(this.toolbarButtonProviders).forEach(provider => {
|
this.config.enabledServices(this.toolbarButtonProviders).forEach(provider => {
|
||||||
|
@@ -51,3 +51,7 @@
|
|||||||
button {
|
button {
|
||||||
flex: none;
|
flex: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
height: 14px;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user