mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Display subscription information
This commit is contained in:
parent
53e4861ded
commit
9ee9526a47
6 changed files with 708 additions and 684 deletions
|
@ -12,9 +12,9 @@
|
|||
import $ from 'jquery';
|
||||
import { htmlSafe } from '@ember/string';
|
||||
import { resolve } from 'rsvp';
|
||||
import Service, { inject as service } from '@ember/service';
|
||||
import miscUtil from '../utils/misc';
|
||||
import config from '../config/environment';
|
||||
import Service, { inject as service } from '@ember/service';
|
||||
|
||||
export default Service.extend({
|
||||
ajax: service(),
|
||||
|
@ -29,9 +29,6 @@ export default Service.extend({
|
|||
version: '',
|
||||
message: '',
|
||||
edition: 'Community',
|
||||
// for major.minor semver release detection
|
||||
// for bugfix releases, only admin is made aware of new release and end users see no What's New messaging
|
||||
updateAvailable: false,
|
||||
valid: true,
|
||||
allowAnonymousAccess: false,
|
||||
authProvider: null,
|
||||
|
@ -40,6 +37,10 @@ export default Service.extend({
|
|||
secureMode: false,
|
||||
maxTags: 3,
|
||||
|
||||
// for major.minor semver release detection
|
||||
// for bugfix releases, only admin is made aware of new release and end users see no What's New messaging
|
||||
updateAvailable: false,
|
||||
|
||||
invalidLicense() {
|
||||
return this.valid === false;
|
||||
},
|
||||
|
|
|
@ -12,13 +12,29 @@
|
|||
<div class="view-customize">
|
||||
<form class="mt-5 ">
|
||||
<div class="form-group">
|
||||
<label for="product-license-xml">Enterprise Edition license (optional)</label>
|
||||
<label for="product-license-xml">Optional Enterprise Edition License Key</label>
|
||||
{{textarea id="product-license-xml" value=license rows="18" class=(if LicenseError 'form-control is-invalid' 'form-control')}}
|
||||
<small class="form-text text-muted ">XML format</small>
|
||||
{{#if appMeta.valid}}
|
||||
<p class="mt-2 color-green">Valid</p>
|
||||
{{#if (eq appMeta.edition "Enterprise")}}
|
||||
<p class="mt-2 color-green">Registered to {{appMeta.license.email}} @ {{appMeta.license.name}}</p>
|
||||
<p class="mt-2 color-green">{{appMeta.license.package}} package up to {{appMeta.license.seats}} users</p>
|
||||
{{#if appMeta.license.trial}}
|
||||
<p class="mt-2 color-red">Trial expiry {{formatted-date appMeta.license.end}}</p>
|
||||
{{else}}
|
||||
<p class="mt-2 color-green">Subscribed to {{formatted-date appMeta.license.end}}</p>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<small class="form-text text-muted">License key is XML format and activates Enterprise edition</small>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p class="mt-2 color-red">Invalid</p>
|
||||
<p class="mt-2 color-red">License is not valid — check user count and expirty date</p>
|
||||
<p class="mt-2 color-gray">Registered to {{appMeta.license.email}} @ {{appMeta.license.name}}</p>
|
||||
<p class="mt-2 color-gray">{{appMeta.license.package}} package up to {{appMeta.license.seats}} users</p>
|
||||
{{#if appMeta.license.trial}}
|
||||
<p class="mt-2 color-gray">Trial expiry {{formatted-date appMeta.license.end}}</p>
|
||||
{{else}}
|
||||
<p class="mt-2 color-gray">Subscribed to {{formatted-date appMeta.license.end}}</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="btn btn-success mt-3" {{action 'saveLicense'}}>Save</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue