mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
3b7cbaef05
refs https://github.com/TryGhost/Team/issues/599 - Previously user received genetic limit error after putting in integration name and clicking "create" button. This created a little frustrating experience. - The updated flow does the check before loading the integration modal, so the user receives communication about needed upgrade before doing any work
28 lines
674 B
JavaScript
28 lines
674 B
JavaScript
import Controller from '@ember/controller';
|
|
import {alias} from '@ember/object/computed';
|
|
import {computed} from '@ember/object';
|
|
|
|
export default Controller.extend({
|
|
integration: alias('model.integration'),
|
|
hostLimitError: alias('model.hostLimitError'),
|
|
|
|
showUpgradeModal: computed('hostLimitError', function () {
|
|
if (this.hostLimitError) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}),
|
|
|
|
actions: {
|
|
save() {
|
|
return this.integration.save();
|
|
},
|
|
|
|
cancel() {
|
|
// 'new' route's dectivate hook takes care of rollback
|
|
this.transitionToRoute('integrations');
|
|
}
|
|
}
|
|
});
|