@@ -12,6 +12,7 @@ import { EqualizerComponent } from '../equalizer.component'
1212import { Options , CheckboxOption } from 'src/app/components/options/options.component'
1313import { TransitionService } from '../../../../services/transitions.service'
1414import { ApplicationService } from '../../../../services/app.service'
15+ import { ToastService } from '../../../../services/toast.service'
1516
1617@Component ( {
1718 selector : 'eqm-advanced-equalizer' ,
@@ -32,11 +33,23 @@ export class AdvancedEqualizerComponent extends EqualizerComponent implements On
3233 {
3334 type : 'button' ,
3435 label : 'Import Presets' ,
35- action : ( ) => this . service . importPresets ( )
36+ action : async ( ) => {
37+ const log = await this . service . importPresets ( )
38+ this . toast . show ( {
39+ type : 'success' ,
40+ message : log
41+ } )
42+ }
3643 } , {
3744 type : 'button' ,
3845 label : 'Export Presets' ,
39- action : ( ) => this . service . exportPresets ( )
46+ action : async ( ) => {
47+ const log = await this . service . exportPresets ( )
48+ this . toast . show ( {
49+ type : 'success' ,
50+ message : log
51+ } )
52+ }
4053 }
4154 ] , [
4255 this . ShowDefaultPresetsCheckbox
@@ -105,7 +118,8 @@ export class AdvancedEqualizerComponent extends EqualizerComponent implements On
105118 public service : AdvancedEqualizerService ,
106119 public transition : TransitionService ,
107120 public change : ChangeDetectorRef ,
108- public app : ApplicationService
121+ public app : ApplicationService ,
122+ public toast : ToastService
109123 ) {
110124 super ( )
111125 this . getImportLegacyAvailable ( )
@@ -130,10 +144,14 @@ export class AdvancedEqualizerComponent extends EqualizerComponent implements On
130144 type : 'button' ,
131145 label : 'Import eqMac2 Presets' ,
132146 action : async ( ) => {
133- await this . service . importLegacy ( )
147+ const log = await this . service . importLegacyPresets ( )
134148 if ( this . settingsDialog ) {
135149 this . settingsDialog . close ( )
136150 }
151+ this . toast . show ( {
152+ type : 'success' ,
153+ message : log
154+ } )
137155 }
138156 }
139157 )
0 commit comments