From 85c92c2c2bc79c000e40d40cd29c06d547ce09da Mon Sep 17 00:00:00 2001 From: Stanislav Romanov Date: Mon, 19 Sep 2022 15:36:40 +0300 Subject: [PATCH] Rename service from toasts to toster --- app/components/index-setting.js | 6 +++--- app/components/toast.hbs | 2 +- app/components/toast.js | 8 ++++---- app/components/toasts-container.hbs | 2 +- app/components/toasts-container.js | 2 +- app/controllers/admin/indexes/item/delete.js | 4 ++-- .../admin/indexes/item/documents/document/delete.js | 4 ++-- .../admin/indexes/item/documents/document/edit.js | 4 ++-- app/controllers/admin/indexes/item/edit.js | 4 ++-- app/controllers/admin/keys/key/delete.js | 2 +- app/controllers/admin/keys/key/edit.js | 2 +- app/services/{toasts.js => toaster.js} | 2 +- tests/integration/components/toasts-container-test.js | 2 +- tests/unit/services/{toasts-test.js => toaster-test.js} | 4 ++-- 14 files changed, 24 insertions(+), 24 deletions(-) rename app/services/{toasts.js => toaster.js} (95%) rename tests/unit/services/{toasts-test.js => toaster-test.js} (68%) diff --git a/app/components/index-setting.js b/app/components/index-setting.js index 515930f..c63ef66 100644 --- a/app/components/index-setting.js +++ b/app/components/index-setting.js @@ -5,7 +5,7 @@ import ActionInvoker from '../lib/action-invoker'; import { inject as service } from '@ember/service'; export default class FormIndexSettingComponent extends Component { - @service toasts; + @service toaster; @tracked value; @tracked error; @@ -25,7 +25,7 @@ export default class FormIndexSettingComponent extends Component { try { return this.args.index .updateSetting(this.args.name, JSON.parse(newValue)) - .then(this.toasts.taskToast); + .then(this.toaster.taskToast); } catch (error) { this.error = error.error || error; } @@ -44,7 +44,7 @@ export default class FormIndexSettingComponent extends Component { try { return this.args.index .resetSetting(this.args.name) - .then(this.toasts.taskToast); + .then(this.toaster.taskToast); } catch (error) { this.error = error.error || error; } diff --git a/app/components/toast.hbs b/app/components/toast.hbs index f9c07c1..4de891d 100644 --- a/app/components/toast.hbs +++ b/app/components/toast.hbs @@ -1,4 +1,4 @@ -{{#in-element this.toasts.destinationElement insertBefore=null}} +{{#in-element this.toaster.destinationElement insertBefore=null}}