Made the close button in the plugin settings modal work

This commit is contained in:
Samuel Elliott 2018-02-02 18:07:05 +00:00
parent aefab7c677
commit 67e6a22ca7
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
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,
@ -67,4 +70,4 @@
this.changed = this.checkForChanges();
}
}
</script>
</script>

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;
}
}
}