mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
Fixed "invoking component by passing its name" deprecations for newsletter modals
no issue - in future Ember build tooling components must be imported directly rather than passing a name at runtime
This commit is contained in:
parent
d1a061e5a7
commit
86751f902c
@ -1,6 +1,7 @@
|
|||||||
import Component from '@glimmer/component';
|
import Component from '@glimmer/component';
|
||||||
import ConfirmArchiveModal from '../../modals/newsletters/confirm-archive';
|
import ConfirmArchiveModal from '../../modals/newsletters/confirm-archive';
|
||||||
import ConfirmUnarchiveModal from '../../modals/newsletters/confirm-unarchive';
|
import ConfirmUnarchiveModal from '../../modals/newsletters/confirm-unarchive';
|
||||||
|
import MultipleNewslettersLimitModal from '../../modals/limits/multiple-newsletters';
|
||||||
import {action} from '@ember/object';
|
import {action} from '@ember/object';
|
||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
import {task} from 'ember-concurrency';
|
import {task} from 'ember-concurrency';
|
||||||
@ -98,7 +99,7 @@ export default class NewsletterManagementComponent extends Component {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.errorType === 'HostLimitError') {
|
if (error.errorType === 'HostLimitError') {
|
||||||
// Not allowed: we reached the limit here
|
// Not allowed: we reached the limit here
|
||||||
this.modals.open('modals/limits/multiple-newsletters', {
|
this.modals.open(MultipleNewslettersLimitModal, {
|
||||||
message: error.message
|
message: error.message
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import AdminRoute from 'ghost-admin/routes/admin';
|
import AdminRoute from 'ghost-admin/routes/admin';
|
||||||
|
import MultipleNewslettersLimitModal from '../../../components/modals/limits/multiple-newsletters';
|
||||||
import NewNewsletterModal from '../../../components/modals/newsletters/new';
|
import NewNewsletterModal from '../../../components/modals/newsletters/new';
|
||||||
import {action} from '@ember/object';
|
import {action} from '@ember/object';
|
||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
@ -21,7 +22,7 @@ export default class NewNewsletterRoute extends AdminRoute {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.errorType === 'HostLimitError') {
|
if (error.errorType === 'HostLimitError') {
|
||||||
// Not allowed: we reached the limit here
|
// Not allowed: we reached the limit here
|
||||||
this.modals.open('modals/limits/multiple-newsletters', {
|
this.modals.open(MultipleNewslettersLimitModal, {
|
||||||
message: error.message
|
message: error.message
|
||||||
});
|
});
|
||||||
return this.replaceWith('settings.newsletters');
|
return this.replaceWith('settings.newsletters');
|
||||||
|
Loading…
Reference in New Issue
Block a user