diff --git a/terminus-core/src/components/baseTab.component.ts b/terminus-core/src/components/baseTab.component.ts index fea8b950..355f8002 100644 --- a/terminus-core/src/components/baseTab.component.ts +++ b/terminus-core/src/components/baseTab.component.ts @@ -45,6 +45,8 @@ 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 diff --git a/terminus-core/src/components/tabHeader.component.pug b/terminus-core/src/components/tabHeader.component.pug index b59dfb63..889c7ec9 100644 --- a/terminus-core/src/components/tabHeader.component.pug +++ b/terminus-core/src/components/tabHeader.component.pug @@ -1,7 +1,7 @@ .progressbar([style.width]='progress + "%"', *ngIf='progress != null') -.index( +.index(*ngIf='tab.showIndex==true', #handle, [style.background-color]='tab.color', ) {{index + 1}} .name([title]='tab.customTitle || tab.title') {{tab.customTitle || tab.title}} -button((click)='app.closeTab(tab, true)') × +button(*ngIf='tab.showCloseButton==true',(click)='app.closeTab(tab, true)') × diff --git a/terminus-core/src/components/tabHeader.component.ts b/terminus-core/src/components/tabHeader.component.ts index b617149d..9cccbf1b 100644 --- a/terminus-core/src/components/tabHeader.component.ts +++ b/terminus-core/src/components/tabHeader.component.ts @@ -9,6 +9,7 @@ import { HotkeysService } from '../services/hotkeys.service' import { ElectronService } from '../services/electron.service' import { AppService } from '../services/app.service' import { HostAppService, Platform } from '../services/hostApp.service' +import { ConfigService } from '../services/config.service' /** @hidden */ export interface SortableComponentProxy { @@ -35,8 +36,9 @@ export class TabHeaderComponent { 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) { @@ -52,6 +54,15 @@ 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 () { diff --git a/terminus-ssh/package.json b/terminus-ssh/package.json index 481b8097..39a6357f 100644 --- a/terminus-ssh/package.json +++ b/terminus-ssh/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "webpack --progress --color", "watch": "webpack --progress --color --watch", - "postinstall": "xcopy /i node_modules\\ssh2\\util\\pagent.exe util\\" + "postinstall:win32": "xcopy /i node_modules\\ssh2\\util\\pagent.exe util\\" }, "files": [ "dist", diff --git a/terminus-terminal/src/components/appearanceSettingsTab.component.pug b/terminus-terminal/src/components/appearanceSettingsTab.component.pug index 90eb2c6e..1717dea3 100644 --- a/terminus-terminal/src/components/appearanceSettingsTab.component.pug +++ b/terminus-terminal/src/components/appearanceSettingsTab.component.pug @@ -109,6 +109,24 @@ h3.mb-3 Appearance (ngModelChange)='config.save()', ) +.form-line + .header + .title Disable Tab Index + + toggle( + [(ngModel)]='config.store.terminal.disableTabIndex', + (ngModelChange)='config.save()', + ) + +.form-line + .header + .title Disable Tab Close Button + + toggle( + [(ngModel)]='config.store.terminal.disableCloseButton', + (ngModelChange)='config.save()', + ) + .form-line .header .title Fallback font diff --git a/terminus-terminal/src/config.ts b/terminus-terminal/src/config.ts index fc05958e..5983266f 100644 --- a/terminus-terminal/src/config.ts +++ b/terminus-terminal/src/config.ts @@ -23,6 +23,8 @@ export class TerminalConfigProvider extends ConfigProvider { ligatures: false, cursor: 'block', cursorBlink: true, + disableTabIndex: false, + disableCloseButton: false, customShell: '', rightClick: 'menu', pasteOnMiddleClick: true,