mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
allow removing shell integration (fixes #682)
This commit is contained in:
@@ -20,14 +20,6 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
||||
i.fas.fa-bug
|
||||
span Report a problem
|
||||
|
||||
.form-line(*ngIf='!isShellIntegrationInstalled')
|
||||
.header
|
||||
.title Shell integration
|
||||
.description Allows quickly opening a terminal in the selected folder
|
||||
button.btn.btn-primary((click)='installShellIntegration()')
|
||||
i.fas.fa-check
|
||||
span Install
|
||||
|
||||
.form-line
|
||||
.header
|
||||
.title Theme
|
||||
@@ -106,6 +98,12 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
||||
step='0.01'
|
||||
)
|
||||
|
||||
.form-line(*ngIf='hostApp.platform !== Platform.Linux')
|
||||
.header
|
||||
.title Shell integration
|
||||
.description Allows quickly opening a terminal in the selected folder
|
||||
toggle([ngModel]='isShellIntegrationInstalled', (ngModelChange)='toggleShellIntegration()')
|
||||
|
||||
.form-line
|
||||
.header
|
||||
.title Window frame
|
||||
|
@@ -81,6 +81,15 @@ export class SettingsTabComponent extends BaseTabComponent {
|
||||
this.isShellIntegrationInstalled = await this.shellIntegration.isInstalled()
|
||||
}
|
||||
|
||||
async toggleShellIntegration () {
|
||||
if (!this.isShellIntegrationInstalled) {
|
||||
await this.shellIntegration.install()
|
||||
} else {
|
||||
await this.shellIntegration.remove()
|
||||
}
|
||||
this.isShellIntegrationInstalled = await this.shellIntegration.isInstalled()
|
||||
}
|
||||
|
||||
async getRecoveryToken (): Promise<any> {
|
||||
return { type: 'app:settings' }
|
||||
}
|
||||
@@ -114,11 +123,6 @@ export class SettingsTabComponent extends BaseTabComponent {
|
||||
}
|
||||
}
|
||||
|
||||
async installShellIntegration () {
|
||||
await this.shellIntegration.install()
|
||||
this.isShellIntegrationInstalled = true
|
||||
}
|
||||
|
||||
getHotkey (id: string) {
|
||||
let ptr = this.config.store.hotkeys
|
||||
for (let token of id.split(/\./g)) {
|
||||
|
Reference in New Issue
Block a user