mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-16 01:19:58 +00:00
Fixes based on PR reviews
This commit is contained in:
parent
d607b7423a
commit
f1e79e9ada
@ -45,8 +45,6 @@ export abstract class BaseTabComponent {
|
|||||||
color: string|null = null
|
color: string|null = null
|
||||||
|
|
||||||
hasFocus = false
|
hasFocus = false
|
||||||
showIndex = true
|
|
||||||
showCloseButton = true
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ping this if your recovery state has been changed and you want
|
* Ping this if your recovery state has been changed and you want
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.progressbar([style.width]='progress + "%"', *ngIf='progress != null')
|
.progressbar([style.width]='progress + "%"', *ngIf='progress != null')
|
||||||
.index(*ngIf='tab.showIndex==true',
|
.index(*ngIf='!config.store.terminal.disableTabIndex',
|
||||||
#handle,
|
#handle,
|
||||||
[style.background-color]='tab.color',
|
[style.background-color]='tab.color',
|
||||||
) {{index + 1}}
|
) {{index + 1}}
|
||||||
.name([title]='tab.customTitle || tab.title') {{tab.customTitle || tab.title}}
|
.name([title]='tab.customTitle || tab.title') {{tab.customTitle || tab.title}}
|
||||||
button(*ngIf='tab.showCloseButton==true',(click)='app.closeTab(tab, true)') ×
|
button(*ngIf='!config.store.terminal.disableCloseButton',(click)='app.closeTab(tab, true)') ×
|
||||||
|
@ -32,13 +32,13 @@ export class TabHeaderComponent {
|
|||||||
|
|
||||||
private constructor (
|
private constructor (
|
||||||
public app: AppService,
|
public app: AppService,
|
||||||
|
public config: ConfigService,
|
||||||
private electron: ElectronService,
|
private electron: ElectronService,
|
||||||
private hostApp: HostAppService,
|
private hostApp: HostAppService,
|
||||||
private ngbModal: NgbModal,
|
private ngbModal: NgbModal,
|
||||||
private hotkeys: HotkeysService,
|
private hotkeys: HotkeysService,
|
||||||
private config: ConfigService,
|
|
||||||
@Inject(SortableComponent) private parentDraggable: SortableComponentProxy,
|
@Inject(SortableComponent) private parentDraggable: SortableComponentProxy,
|
||||||
@Optional() @Inject(TabContextMenuItemProvider) protected contextMenuProviders: TabContextMenuItemProvider[],
|
@Optional() @Inject(TabContextMenuItemProvider) protected contextMenuProviders: TabContextMenuItemProvider[],
|
||||||
) {
|
) {
|
||||||
this.hotkeys.matchedHotkey.subscribe((hotkey) => {
|
this.hotkeys.matchedHotkey.subscribe((hotkey) => {
|
||||||
if (this.app.activeTab === this.tab) {
|
if (this.app.activeTab === this.tab) {
|
||||||
@ -54,15 +54,6 @@ export class TabHeaderComponent {
|
|||||||
this.tab.progress$.subscribe(progress => {
|
this.tab.progress$.subscribe(progress => {
|
||||||
this.progress = progress
|
this.progress = progress
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.config.store.terminal.disableTabIndex) {
|
|
||||||
this.tab.showIndex = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.config.store.terminal.disableCloseButton) {
|
|
||||||
this.tab.showCloseButton = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit () {
|
ngAfterViewInit () {
|
||||||
|
@ -111,20 +111,20 @@ h3.mb-3 Appearance
|
|||||||
|
|
||||||
.form-line
|
.form-line
|
||||||
.header
|
.header
|
||||||
.title Disable Tab Index
|
.title Disable tab index
|
||||||
|
|
||||||
toggle(
|
toggle(
|
||||||
[(ngModel)]='config.store.terminal.disableTabIndex',
|
[(ngModel)]='config.store.terminal.disableTabIndex',
|
||||||
(ngModelChange)='config.save(); config.requestRestart()',
|
(ngModelChange)='config.save();',
|
||||||
)
|
)
|
||||||
|
|
||||||
.form-line
|
.form-line
|
||||||
.header
|
.header
|
||||||
.title Disable Tab Close Button
|
.title Disable tab close button
|
||||||
|
|
||||||
toggle(
|
toggle(
|
||||||
[(ngModel)]='config.store.terminal.disableCloseButton',
|
[(ngModel)]='config.store.terminal.disableCloseButton',
|
||||||
(ngModelChange)='config.save(); config.requestRestart()',
|
(ngModelChange)='config.save();',
|
||||||
)
|
)
|
||||||
|
|
||||||
.form-line
|
.form-line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user