@@ -35,19 +35,18 @@ import { CoreEditorComponentsModule } from '@features/editor/components/componen
3535import { CoreFileUploader , CoreFileUploaderStoreFilesResult } from '@features/fileuploader/services/fileuploader' ;
3636import { CoreTagComponentsModule } from '@features/tag/components/components.module' ;
3737import { CanLeave } from '@guards/can-leave' ;
38- import { CoreLoadings } from '@services/loadings' ;
38+ import { CoreLoadings } from '@services/overlays/ loadings' ;
3939import { CoreNavigator } from '@services/navigator' ;
4040import { CoreNetwork } from '@services/network' ;
4141import { CoreSites , CoreSitesReadingStrategy } from '@services/sites' ;
4242import { CoreSync } from '@services/sync' ;
43- import { CoreDomUtils } from '@services/utils/dom' ;
4443import { CoreWSError } from '@classes/errors/wserror' ;
45- import { Translate } from '@singletons' ;
4644import { CoreEvents } from '@singletons/events' ;
4745import { CoreForms } from '@singletons/form' ;
4846import { CoreFileEntry } from '@services/file-helper' ;
4947import { CoreTimeUtils } from '@services/utils/time' ;
5048import { CorePromiseUtils } from '@singletons/promise-utils' ;
49+ import { CoreAlerts } from '@services/overlays/alerts' ;
5150
5251@Component ( {
5352 selector : 'addon-blog-edit-entry' ,
@@ -164,7 +163,7 @@ export default class AddonBlogEditEntryPage implements CanLeave, OnInit, OnDestr
164163 this . associatedCourse = course ;
165164 }
166165 } catch ( error ) {
167- CoreDomUtils . showErrorModalDefault ( error , 'Error getting associations, they may not be displayed correctly.' ) ;
166+ CoreAlerts . showError ( error , { default : 'Error getting associations, they may not be displayed correctly.' } ) ;
168167 }
169168
170169 return ;
@@ -204,7 +203,7 @@ export default class AddonBlogEditEntryPage implements CanLeave, OnInit, OnDestr
204203 this . associatedModule = await CoreCourse . getModule ( this . modId ) ;
205204 }
206205 } catch ( error ) {
207- CoreDomUtils . showErrorModalDefault ( error , 'Error retrieving data.' ) ;
206+ CoreAlerts . showError ( error , { default : 'Error retrieving data.' } ) ;
208207 this . forceLeave = true ;
209208 CoreNavigator . back ( ) ;
210209
@@ -338,7 +337,7 @@ export default class AddonBlogEditEntryPage implements CanLeave, OnInit, OnDestr
338337 } catch ( error ) {
339338 if ( CoreWSError . isWebServiceError ( error ) ) {
340339 // It's a WebService error, the user cannot send the message so don't store it.
341- CoreDomUtils . showErrorModalDefault ( error , 'Error updating entry.' ) ;
340+ CoreAlerts . showError ( error , { default : 'Error updating entry.' } ) ;
342341
343342 return ;
344343 }
@@ -363,7 +362,7 @@ export default class AddonBlogEditEntryPage implements CanLeave, OnInit, OnDestr
363362 } catch ( error ) {
364363 if ( CoreWSError . isWebServiceError ( error ) ) {
365364 // It's a WebService error, the user cannot send the message so don't store it.
366- CoreDomUtils . showErrorModalDefault ( error , 'Error creating entry.' ) ;
365+ CoreAlerts . showError ( error , { default : 'Error creating entry.' } ) ;
367366
368367 return ;
369368 }
@@ -412,7 +411,7 @@ export default class AddonBlogEditEntryPage implements CanLeave, OnInit, OnDestr
412411
413412 if ( ( ! this . entry && this . hasDataChangedForNewEntry ) || ( this . entry && this . hasDataChangedForEdit ) ) {
414413 // Modified, confirm user wants to go back.
415- await CoreDomUtils . showConfirm ( Translate . instant ( 'core.confirmcanceledit' ) ) ;
414+ await CoreAlerts . confirmLeaveWithChanges ( ) ;
416415 }
417416
418417 CoreForms . triggerFormCancelledEvent ( this . formElement , CoreSites . getCurrentSiteId ( ) ) ;
0 commit comments