diff --git a/src/renderer/views/components/equalizer.ejs b/src/renderer/views/components/equalizer.ejs
index d9604dcf..889c054c 100644
--- a/src/renderer/views/components/equalizer.ejs
+++ b/src/renderer/views/components/equalizer.ejs
@@ -105,6 +105,12 @@
+
+
+
+
+
+
@@ -116,7 +122,7 @@
template: '#eq-view',
data: function () {
return {
- app: this.$root,
+ // app: this.$root,
eqPreset: function () {
this.preset = uuidv4()
this.name = ""
@@ -224,6 +230,21 @@
mounted() {
},
methods: {
+ sharePreset() {
+ notyf.error("Not implemented")
+ },
+ deletePreset() {
+ let presets = this.$root.cfg.audio.equalizer.presets
+ bootbox.confirm("Are you sure you want to delete this preset?", (result) => {
+ if (result) {
+ this.changePreset("default")
+ // find the preset by id (preset) and remove it
+ let index = presets.findIndex(p => p.preset == this.preset)
+ presets.splice(index, 1)
+ notyf.success("Removed preset")
+ }
+ })
+ },
close() {
app.resetState()
},
@@ -270,6 +291,7 @@
newPreset.mix = eqSettings.mix
app.cfg.audio.equalizer.presets.push(newPreset)
notyf.success("Added Preset")
+ self.changePreset(newPreset.preset)
}
})
},
@@ -287,7 +309,7 @@
notyf.success("Saved Preset")
},
applyPreset(preset) {
- Object.assign(this.app.cfg.audio.equalizer, preset)
+ Object.assign(this.$root.cfg.audio.equalizer, preset)
for (var i = 0; i < 10; i++) {
this.changeGain(i)
this.changeFreq(i)