Placeholders only in settings.js to stop misleading developers.
This commit is contained in:
Родитель
069d7a516e
Коммит
5b5b0379df
|
@ -10,9 +10,16 @@ var app = (function (win) {
|
|||
showAlert(message);
|
||||
};
|
||||
|
||||
var isApiKeySet = (appSettings.everlive.apiKey !== '$EVERLIVE_API_KEY$');
|
||||
var isNullOrEmpty = function (value) {
|
||||
return typeof value === 'undefined' || value === null || value === '';
|
||||
};
|
||||
|
||||
if (!isApiKeySet) {
|
||||
var isKeySet = function (key) {
|
||||
var regEx = /^\$[A-Z_]+\$$/;
|
||||
return !isNullOrEmpty(key) && !regEx.test(key);
|
||||
};
|
||||
|
||||
if (!isKeySet(appSettings.everlive.apiKey)) {
|
||||
alert('Backend Services API Key is not set.');
|
||||
return;
|
||||
}
|
||||
|
@ -93,6 +100,7 @@ var app = (function (win) {
|
|||
return {
|
||||
showAlert: showAlert,
|
||||
showError: showError,
|
||||
isKeySet: isKeySet,
|
||||
mobileApp: mobileApp,
|
||||
helper: AppHelper,
|
||||
everlive: el,
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
|
||||
(function (a, win, doc) {
|
||||
|
||||
// var analytics = win.analytics = win.analytics || {};
|
||||
|
||||
a.isAnalytics = function () {
|
||||
return appSettings.eqatec.productKey !== '$EQATEC_PRODUCT_KEY$';
|
||||
return win.app.isKeySet(appSettings.eqatec.productKey);
|
||||
};
|
||||
|
||||
a.Start = function() {
|
||||
|
|
|
@ -12,10 +12,11 @@ app.Login = (function () {
|
|||
var $loginUsername;
|
||||
var $loginPassword;
|
||||
var isHttp = (appSettings.everlive.scheme === 'http');
|
||||
var isFacebookLogin = (appSettings.facebook.appId !== '$FACEBOOK_APP_ID$' && appSettings.facebook.redirectUri !== '$FACEBOOK_REDIRECT_URI$');
|
||||
var isGoogleLogin = (appSettings.google.clientId !== '$GOOGLE_CLIENT_ID$' && appSettings.google.redirectUri !== '$GOOGLE_REDIRECT_URI$');
|
||||
var isLiveIdLogin = (appSettings.liveId.clientId !== '$LIVEID_CLIENT_ID$' && appSettings.liveId.redirectUri !== '$LIVEID_CLIENT_ID$');
|
||||
var isAdfsLogin = (appSettings.adfs.adfsRealm !== '$ADFS_REALM$' && appSettings.adfs.adfsEndpoint !== '$ADFS_ENDPOINT$');
|
||||
|
||||
var isFacebookLogin = app.isKeySet(appSettings.facebook.appId) && app.isKeySet(appSettings.facebook.redirectUri);
|
||||
var isGoogleLogin = app.isKeySet(appSettings.google.clientId) && app.isKeySet(appSettings.google.redirectUri);
|
||||
var isLiveIdLogin = app.isKeySet(appSettings.liveId.clientId) && app.isKeySet(appSettings.liveId.redirectUri);
|
||||
var isAdfsLogin = app.isKeySet(appSettings.adfs.adfsRealm) && app.isKeySet(appSettings.adfs.adfsEndpoint);
|
||||
var isAnalytics = analytics.isAnalytics();
|
||||
|
||||
var init = function () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче