added an option to disable the global hotkey to the welcome tab (fixes #1509, fixes #2809)

This commit is contained in:
Eugene Pankov 2020-07-27 15:56:09 +02:00
parent ddd306dbf6
commit 6d0b2608a2
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 14 additions and 3 deletions

View File

@ -9,18 +9,25 @@
.form-line .form-line
.header .header
.title Enable analytics .title Enable analytics
.description Help us track the number of Terminus installs across the world! .description Help track the number of Terminus installs across the world!
toggle([(ngModel)]='config.store.enableAnalytics') toggle([(ngModel)]='config.store.enableAnalytics')
.form-line .form-line
.header .header
.title Enable SSH plugin .title Enable global hotkey (#[strong Ctrl-Space])
.description Toggles the Terminus window visibility
toggle([(ngModel)]='enableGlobalHotkey')
.form-line
.header
.title Enable #[strong SSH] plugin
.description Adds an SSH connection manager UI to Terminus .description Adds an SSH connection manager UI to Terminus
toggle([(ngModel)]='enableSSH') toggle([(ngModel)]='enableSSH')
.form-line .form-line
.header .header
.title Enable Serial plugin .title Enable #[strong Serial] plugin
.description Allows attaching Terminus to serial ports .description Allows attaching Terminus to serial ports
toggle([(ngModel)]='enableSerial') toggle([(ngModel)]='enableSerial')

View File

@ -13,6 +13,7 @@ import { HostAppService } from '../services/hostApp.service'
export class WelcomeTabComponent extends BaseTabComponent { export class WelcomeTabComponent extends BaseTabComponent {
enableSSH = false enableSSH = false
enableSerial = false enableSerial = false
enableGlobalHotkey = true
constructor ( constructor (
private hostApp: HostAppService, private hostApp: HostAppService,
@ -33,6 +34,9 @@ export class WelcomeTabComponent extends BaseTabComponent {
if (!this.enableSerial) { if (!this.enableSerial) {
this.config.store.pluginBlacklist.push('serial') this.config.store.pluginBlacklist.push('serial')
} }
if (!this.enableGlobalHotkey) {
this.config.store.hotkeys['toggle-window'] = []
}
this.config.save() this.config.save()
this.hostApp.getWindow().reload() this.hostApp.getWindow().reload()
} }