mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 06:24:56 +00:00
disallow disabling core plugins - fixes #1990
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
.list-group-item.d-flex.align-items-center(*ngFor='let plugin of pluginManager.installedPlugins')
|
||||
toggle(
|
||||
[ngModel]='isPluginEnabled(plugin)',
|
||||
(ngModelChange)='togglePlugin(plugin)'
|
||||
(ngModelChange)='togglePlugin(plugin)',
|
||||
[disabled]='!canDisablePlugin(plugin)'
|
||||
)
|
||||
|
||||
.mr-auto.d-flex.flex-column
|
||||
|
@@ -9,6 +9,8 @@ import { PluginInfo, PluginManagerService } from '../services/pluginManager.serv
|
||||
|
||||
enum BusyState { Installing = 'Installing', Uninstalling = 'Uninstalling' }
|
||||
|
||||
const FORCE_ENABLE = ['terminus-core', 'terminus-settings']
|
||||
|
||||
/** @hidden */
|
||||
@Component({
|
||||
template: require('./pluginsSettingsTab.component.pug'),
|
||||
@@ -106,6 +108,10 @@ export class PluginsSettingsTabComponent {
|
||||
return !this.config.store.pluginBlacklist.includes(plugin.name)
|
||||
}
|
||||
|
||||
canDisablePlugin (plugin: PluginInfo) {
|
||||
return !FORCE_ENABLE.includes(plugin.packageName)
|
||||
}
|
||||
|
||||
togglePlugin (plugin: PluginInfo) {
|
||||
if (this.isPluginEnabled(plugin)) {
|
||||
this.disablePlugin(plugin)
|
||||
|
Reference in New Issue
Block a user