mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 14:34:54 +00:00
bumped Angular
This commit is contained in:
@@ -27,9 +27,16 @@ import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
'flex-basis': '1px',
|
||||
'width': '1px',
|
||||
}),
|
||||
animate('250ms ease-in-out')
|
||||
animate('250ms ease-in-out', style({
|
||||
'flex-basis': '200px',
|
||||
'width': '200px',
|
||||
}))
|
||||
]),
|
||||
transition(':leave', [
|
||||
style({
|
||||
'flex-basis': '200px',
|
||||
'width': '200px',
|
||||
}),
|
||||
animate('250ms ease-in-out', style({
|
||||
'flex-basis': '1px',
|
||||
'width': '1px',
|
||||
|
@@ -1,10 +1,11 @@
|
||||
import { Subject, BehaviorSubject } from 'rxjs'
|
||||
import { Subject } from 'rxjs'
|
||||
import { ViewRef } from '@angular/core'
|
||||
|
||||
export abstract class BaseTabComponent {
|
||||
private static lastTabID = 0
|
||||
id: number
|
||||
title$ = new BehaviorSubject<string>(null)
|
||||
title: string
|
||||
customTitle: string
|
||||
scrollable: boolean
|
||||
hasActivity = false
|
||||
focused$ = new Subject<void>()
|
||||
@@ -33,6 +34,5 @@ export abstract class BaseTabComponent {
|
||||
destroy (): void {
|
||||
this.focused$.complete()
|
||||
this.blurred$.complete()
|
||||
this.title$.complete()
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
.index {{index + 1}}
|
||||
.name {{tab.title$ | async}}
|
||||
.name {{tab.title || tab.customTitle}}
|
||||
button((click)='closeClicked.emit()') ×
|
||||
|
@@ -1,5 +1,7 @@
|
||||
import { Component, Input, Output, EventEmitter, HostBinding, HostListener } from '@angular/core'
|
||||
import { BaseTabComponent } from '../components/baseTab.component'
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { BaseTabComponent } from './baseTab.component'
|
||||
import { RenameTabModalComponent } from './renameTabModal.component'
|
||||
|
||||
@Component({
|
||||
selector: 'tab-header',
|
||||
@@ -13,8 +15,17 @@ export class TabHeaderComponent {
|
||||
@Input() tab: BaseTabComponent
|
||||
@Output() closeClicked = new EventEmitter()
|
||||
|
||||
@HostListener('auxclick', ['$event']) onClick ($event: MouseEvent): void {
|
||||
if ($event.which == 2) {
|
||||
constructor (
|
||||
private ngbModal: NgbModal,
|
||||
) { }
|
||||
|
||||
@HostListener('dblclick') onDoubleClick (): void {
|
||||
let modal = this.ngbModal.open(RenameTabModalComponent)
|
||||
modal.componentInstance.value = this.tab.customTitle || this.tab.title
|
||||
}
|
||||
|
||||
@HostListener('auxclick', ['$event']) onAuxClick ($event: MouseEvent): void {
|
||||
if ($event.which === 2) {
|
||||
this.closeClicked.emit()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user