Added a data prop to be set when modal is open, in order to disable key bindings
This commit is contained in:
76
src/components/Settings/ConfigLauncher.vue
Normal file
76
src/components/Settings/ConfigLauncher.vue
Normal file
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div class="config-options">
|
||||
<!-- Button and label -->
|
||||
<span>Config</span>
|
||||
<div class="config-buttons">
|
||||
<IconSpanner v-tooltip="tooltip('Update configuration locally')" @click="showEditor()" />
|
||||
</div>
|
||||
|
||||
<!-- Modal containing all the configuration options -->
|
||||
<modal :name="modalName" :resizable="true" width="80%" height="80%"
|
||||
@closed="$emit('modalChanged', false)">
|
||||
<ConfigContainer :sections="sections" />
|
||||
</modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import IconSpanner from '@/assets/interface-icons/config-editor.svg';
|
||||
import ConfigContainer from '@/components/Configuration/ConfigContainer';
|
||||
|
||||
export default {
|
||||
name: 'ConfigLauncher',
|
||||
data() {
|
||||
return {
|
||||
modalName: 'CONF-EDITOR',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
IconSpanner,
|
||||
ConfigContainer,
|
||||
},
|
||||
props: {
|
||||
sections: Array,
|
||||
},
|
||||
methods: {
|
||||
showEditor: function show() {
|
||||
this.$modal.show(this.modalName);
|
||||
this.$emit('modalChanged', true);
|
||||
},
|
||||
updateConfig() {
|
||||
// this.$emit('iconSizeUpdated', iconSize);
|
||||
},
|
||||
tooltip(content) {
|
||||
return { content, trigger: 'hover focus', delay: 250 };
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.config-options {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--settings-text-color);
|
||||
svg {
|
||||
path {
|
||||
fill: var(--settings-text-color);
|
||||
}
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
margin: 0.2rem;
|
||||
padding: 0.2rem;
|
||||
text-align: center;
|
||||
background: var(--background);
|
||||
border: 1px solid currentColor;
|
||||
border-radius: var(--curve-factor);
|
||||
cursor: pointer;
|
||||
&:hover, &.selected {
|
||||
background: var(--settings-text-color);
|
||||
path { fill: var(--background); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user