Revert "Merge branch 'main' into develop"

This reverts commit 932ae6c385, reversing
changes made to 150098de59.
This commit is contained in:
Core 2022-03-16 00:04:13 +00:00
parent 182e903fc2
commit 4b0323e267
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
50 changed files with 19329 additions and 2344 deletions

View file

@ -222,14 +222,14 @@
items: {
"new": {
"icon": "./assets/feather/plus.svg",
name: "New Preset...",
"name": app.getLz('action.newpreset'),
action: () => {
this.addPreset()
}
},
"delete": {
"icon": "./assets/feather/x-circle.svg",
name: "Delete Preset",
"name": app.getLz('action.deletepreset'),
action: () => {
this.deletePreset()
}
@ -280,13 +280,13 @@
},
deletePreset() {
let presets = this.$root.cfg.audio.equalizer.presets
bootbox.confirm("Are you sure you want to delete this preset?", (result) => {
bootbox.confirm(app.getLz('term.deletepreset.warn'), (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")
notyf.success(app.getLz('term.deletedpreset'))
}
})
},
@ -346,7 +346,7 @@
},
addPreset() {
let self = this
bootbox.prompt("New EQ Preset Name", (res) => {
bootbox.prompt(app.getLz('term.newpreset.name'), (res) => {
if (res) {
let eqSettings = Clone(app.cfg.audio.equalizer)
let newPreset = new self.eqPreset()
@ -357,7 +357,7 @@
newPreset.mix = eqSettings.mix
newPreset.vibrantBass = eqSettings.vibrantBass
app.cfg.audio.equalizer.presets.push(newPreset)
notyf.success("Added Preset")
notyf.success(app.getLz('term.addedpreset'))
self.changePreset(newPreset.preset)
}
})