Merge pull request #70 from samuelthomas2774/fix-close-plugin-settings-button

Made the close button in the plugin settings modal work
This commit is contained in:
Alexei Stukov 2018-02-02 21:17:00 +02:00 committed by GitHub
commit 5fe333c3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -9,7 +9,7 @@
*/
<template>
<Modal :headerText="plugin.name + ' Settings'" :close="() => { }">
<Modal :headerText="plugin.name + ' Settings'" :close="close">
<div slot="body" class="bd-plugin-settings-body">
<PluginSetting v-for="setting in configCache" :key="setting.id" :setting="setting" :change="settingChange"/>
</div>
@ -26,7 +26,10 @@
import PluginSetting from './pluginsetting/PluginSetting.vue';
export default {
props: ['plugin'],
props: [
'plugin',
'close'
],
data() {
return {
changed: false,

View File

@ -33,7 +33,7 @@
</div>
</div>
<div v-if="settingsOpen !== null" class="bd-backdrop" @click="settingsOpen = null"></div>
<PluginSettingsModal v-if="settingsOpen !== null" :plugin="settingsOpen" />
<PluginSettingsModal v-if="settingsOpen !== null" :plugin="settingsOpen" :close="closeSettings" />
</SettingsWrapper>
</template>
@ -92,6 +92,9 @@
},
showSettings(plugin) {
this.settingsOpen = plugin;
},
closeSettings() {
this.settingsOpen = null;
}
}
}