mirror of
https://github.com/Eugeny/tabby.git
synced 2025-02-05 14:29:47 +08: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
|
||||
|
||||
hasFocus = false
|
||||
showIndex = true
|
||||
showCloseButton = true
|
||||
|
||||
/**
|
||||
* Ping this if your recovery state has been changed and you want
|
||||
|
@ -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)') ×
|
||||
|
@ -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 () {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user