PLT-5703 Update license expiry timing and text (#5602)
* Update license expiry timing and text * Updating error bar (#5632)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
3f070fe4b8
Коммит
f8aaf312c1
@@ -885,8 +885,6 @@ export const Constants = {
|
||||
BOT_NAME: 'BOT',
|
||||
MAX_PREV_MSGS: 100,
|
||||
POST_COLLAPSE_TIMEOUT: 1000 * 60 * 5, // five minutes
|
||||
LICENSE_EXPIRY_NOTIFICATION: 1000 * 60 * 60 * 24 * 15, // 15 days
|
||||
LICENSE_GRACE_PERIOD: 1000 * 60 * 60 * 24 * 15, // 15 days
|
||||
PERMISSIONS_ALL: 'all',
|
||||
PERMISSIONS_CHANNEL_ADMIN: 'channel_admin',
|
||||
PERMISSIONS_TEAM_ADMIN: 'team_admin',
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
import Constants from 'utils/constants.jsx';
|
||||
|
||||
import LocalizationStore from 'stores/localization_store.jsx';
|
||||
|
||||
const LICENSE_EXPIRY_NOTIFICATION = 1000 * 60 * 60 * 24 * 60; // 60 days
|
||||
const LICENSE_GRACE_PERIOD = 1000 * 60 * 60 * 24 * 15; // 15 days
|
||||
|
||||
export function isLicenseExpiring() {
|
||||
if (window.mm_license.IsLicensed !== 'true') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const timeDiff = parseInt(global.window.mm_license.ExpiresAt, 10) - Date.now();
|
||||
return timeDiff <= Constants.LICENSE_EXPIRY_NOTIFICATION;
|
||||
return timeDiff <= LICENSE_EXPIRY_NOTIFICATION;
|
||||
}
|
||||
|
||||
export function isLicenseExpired() {
|
||||
@@ -29,7 +30,7 @@ export function isLicensePastGracePeriod() {
|
||||
}
|
||||
|
||||
const timeDiff = Date.now() - parseInt(global.window.mm_license.ExpiresAt, 10);
|
||||
return timeDiff > Constants.LICENSE_GRACE_PERIOD;
|
||||
return timeDiff > LICENSE_GRACE_PERIOD;
|
||||
}
|
||||
|
||||
export function displayExpiryDate() {
|
||||
|
||||
Ссылка в новой задаче
Block a user