Bootbox dialog improvements (#1192)

* Translate bootbox dialog buttons

This also isolates the bootbox dependency.

* Migrate delete playlist dialog from window.confirm to bootbox.confirm
This commit is contained in:
Pedro Galhardo 2022-06-23 02:27:58 +01:00 committed by GitHub
parent 0ca0b34ff0
commit 569f6c279a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 55 deletions

View file

@ -280,7 +280,7 @@
},
deletePreset() {
let presets = this.$root.cfg.audio.equalizer.presets
bootbox.confirm(app.getLz('term.deletepreset.warn'), (result) => {
app.confirm(app.getLz('term.deletepreset.warn'), (result) => {
if (result) {
this.changePreset("default")
// find the preset by id (preset) and remove it
@ -351,7 +351,7 @@
},
addPreset() {
let self = this
bootbox.prompt(app.getLz('term.newpreset.name'), (res) => {
app.prompt(app.getLz('term.newpreset.name'), (res) => {
if (res) {
let eqSettings = Clone(app.cfg.audio.equalizer)
let newPreset = new self.eqPreset()
@ -386,7 +386,7 @@
},
importPreset() {
let self = this
bootbox.prompt("Enter preset share code", (res) => {
app.prompt("Enter preset share code", (res) => {
if (res) {
let preset = JSON.parse(atob(res))
if (preset.frequencies && preset.gain && preset.Q && preset.mix && preset.vibrantBass) {