mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Show admins incomplete config indicator
SMTP checks to start with.
This commit is contained in:
parent
b2cd375936
commit
80f0876b51
7 changed files with 31 additions and 4 deletions
|
@ -11,10 +11,12 @@
|
|||
|
||||
import $ from 'jquery';
|
||||
import { empty } from '@ember/object/computed';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Notifier from '../../mixins/notifier';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(Notifier, {
|
||||
appMeta: service(),
|
||||
SMTPHostEmptyError: empty('model.smtp.host'),
|
||||
SMTPPortEmptyError: empty('model.smtp.port'),
|
||||
SMTPSenderEmptyError: empty('model.smtp.sender'),
|
||||
|
@ -55,6 +57,8 @@ export default Component.extend(Notifier, {
|
|||
this.set('buttonText', 'Save & Test');
|
||||
this.set('testSMTP', result);
|
||||
|
||||
this.set('appMeta.configured', true);
|
||||
|
||||
if (result.success) {
|
||||
this.notifySuccess(result.message);
|
||||
} else {
|
||||
|
|
|
@ -162,6 +162,14 @@ export default Component.extend(Modals, {
|
|||
}
|
||||
|
||||
this.get('router').transitionTo('customize.billing');
|
||||
},
|
||||
|
||||
onConfigured() {
|
||||
if (!this.get('session.isAdmin')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.get('router').transitionTo('customize.smtp');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -34,6 +34,7 @@ export default Service.extend({
|
|||
allowAnonymousAccess: false,
|
||||
authProvider: null,
|
||||
authConfig: null,
|
||||
configured: true,
|
||||
setupMode: false,
|
||||
secureMode: false,
|
||||
maxTags: 3,
|
||||
|
|
|
@ -40,7 +40,13 @@
|
|||
{{#unless appMeta.valid}}
|
||||
<div class="option invalid-plan" {{action "onBilling"}}>
|
||||
<i class={{concat "dicon " constants.Icon.Announce}} />
|
||||
{{#attach-tooltip}}Invalid product plan{{/attach-tooltip}}
|
||||
{{#attach-tooltip}}Missing activation key{{/attach-tooltip}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{#unless appMeta.configured}}
|
||||
<div class="option invalid-plan" {{action "onConfigured"}}>
|
||||
<i class={{concat "dicon " constants.Icon.Announce}} />
|
||||
{{#attach-tooltip}}Missing mail server settings{{/attach-tooltip}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue