summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-06 20:36:20 -0500
committerCorey Hulen <corey@hulen.com>2017-03-06 20:36:20 -0500
commitf8aaf312c119d92ed0d9949e4315a4a1b1035e5f (patch)
tree0ddc03db788a632ae157f69390544949b7428bb5 /webapp/utils
parent3f070fe4b805e660cf796a5f851a0a1121a45fac (diff)
downloadchat-f8aaf312c119d92ed0d9949e4315a4a1b1035e5f.tar.gz
chat-f8aaf312c119d92ed0d9949e4315a4a1b1035e5f.tar.bz2
chat-f8aaf312c119d92ed0d9949e4315a4a1b1035e5f.zip
PLT-5703 Update license expiry timing and text (#5602)
* Update license expiry timing and text * Updating error bar (#5632)
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/constants.jsx2
-rw-r--r--webapp/utils/license_utils.jsx9
2 files changed, 5 insertions, 6 deletions
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index fafad9f44..cb55da9b8 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -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',
diff --git a/webapp/utils/license_utils.jsx b/webapp/utils/license_utils.jsx
index c4be1f25e..038e3ca29 100644
--- a/webapp/utils/license_utils.jsx
+++ b/webapp/utils/license_utils.jsx
@@ -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() {