Hide settings button if plugin doesn't have any settings
This commit is contained in:
parent
5faaaa0276
commit
e66c1ce447
|
@ -17,6 +17,7 @@ class Plugin {
|
|||
|
||||
constructor(pluginInternals) {
|
||||
this.__pluginInternals = pluginInternals;
|
||||
this.hasSettings = this.pluginConfig && this.pluginConfig.length > 0;
|
||||
this.start = this.start.bind(this);
|
||||
this.stop = this.stop.bind(this);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="bd-plugin-extra">v{{plugin.version}} by {{plugin.authors.join(', ').replace(/,(?!.*,)/gmi, ' and')}}</div>
|
||||
<div class="bd-controls">
|
||||
<ButtonGroup>
|
||||
<Button :onClick="() => showSettings(plugin)">
|
||||
<Button v-if="plugin.hasSettings" :onClick="() => showSettings(plugin)">
|
||||
<MiSettings/>
|
||||
</Button>
|
||||
<Button :onClick="() => reloadPlugin(plugin)">
|
||||
|
|
|
@ -6,9 +6,5 @@
|
|||
"description": "Example Plugin 2 Description"
|
||||
},
|
||||
"main": "index.js",
|
||||
"defaultConfig": [
|
||||
{
|
||||
"foo": "bar"
|
||||
}
|
||||
]
|
||||
"defaultConfig": []
|
||||
}
|
Loading…
Reference in New Issue