Fixes based on PR reviews

This commit is contained in:
pinpin 2020-11-17 09:14:05 +02:00
parent d607b7423a
commit f1e79e9ada
4 changed files with 8 additions and 19 deletions

View File

@ -45,8 +45,6 @@ export abstract class BaseTabComponent {
color: string|null = null
hasFocus = false
showIndex = true
showCloseButton = true
/**
* Ping this if your recovery state has been changed and you want

View File

@ -1,7 +1,7 @@
.progressbar([style.width]='progress + "%"', *ngIf='progress != null')
.index(*ngIf='tab.showIndex==true',
.index(*ngIf='!config.store.terminal.disableTabIndex',
#handle,
[style.background-color]='tab.color',
) {{index + 1}}
.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)') ×

View File

@ -32,13 +32,13 @@ export class TabHeaderComponent {
private constructor (
public app: AppService,
public config: ConfigService,
private electron: ElectronService,
private hostApp: HostAppService,
private ngbModal: NgbModal,
private hotkeys: HotkeysService,
private config: ConfigService,
@Inject(SortableComponent) private parentDraggable: SortableComponentProxy,
@Optional() @Inject(TabContextMenuItemProvider) protected contextMenuProviders: TabContextMenuItemProvider[],
@Optional() @Inject(TabContextMenuItemProvider) protected contextMenuProviders: TabContextMenuItemProvider[],
) {
this.hotkeys.matchedHotkey.subscribe((hotkey) => {
if (this.app.activeTab === this.tab) {
@ -54,15 +54,6 @@ export class TabHeaderComponent {
this.tab.progress$.subscribe(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 () {

View File

@ -111,20 +111,20 @@ h3.mb-3 Appearance
.form-line
.header
.title Disable Tab Index
.title Disable tab index
toggle(
[(ngModel)]='config.store.terminal.disableTabIndex',
(ngModelChange)='config.save(); config.requestRestart()',
(ngModelChange)='config.save();',
)
.form-line
.header
.title Disable Tab Close Button
.title Disable tab close button
toggle(
[(ngModel)]='config.store.terminal.disableCloseButton',
(ngModelChange)='config.save(); config.requestRestart()',
(ngModelChange)='config.save();',
)
.form-line