mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Replaced underscore.js & is.js with lodash.js
This commit is contained in:
parent
df8e843bf5
commit
566807bc14
93 changed files with 17379 additions and 2056 deletions
|
@ -23,13 +23,11 @@ export default SimpleAuthSession.extend({
|
|||
localStorage: service(),
|
||||
folderPermissions: null,
|
||||
currentFolder: null,
|
||||
isMac: false,
|
||||
isMobile: false,
|
||||
|
||||
secureToken: '',
|
||||
hasSecureToken: computed('secureToken', function () {
|
||||
let st = this.get('secureToken');
|
||||
return is.not.null(st) && is.not.undefined(st) && st.length > 0;
|
||||
return !_.isNull(st) && !_.isUndefined(st) && st.length > 0;
|
||||
}),
|
||||
|
||||
hasAccounts: computed('isAuthenticated', 'session.content.authenticated.user', function () {
|
||||
|
@ -51,7 +49,7 @@ export default SimpleAuthSession.extend({
|
|||
}),
|
||||
|
||||
authenticated: computed('session.content.authenticated.user', function () {
|
||||
if (is.null(this.get('session.authenticator')) || this.get('appMeta.secureMode')) return false;
|
||||
if (_.isNull(this.get('session.authenticator')) || this.get('appMeta.secureMode')) return false;
|
||||
return this.get('session.authenticator') !== 'authenticator:anonymous' && this.get('session.content.authenticated.user.id') !== '0';
|
||||
}),
|
||||
|
||||
|
@ -92,7 +90,7 @@ export default SimpleAuthSession.extend({
|
|||
}),
|
||||
|
||||
authToken: computed('session.content.authenticated.user', function () {
|
||||
if (is.null(this.get('session.authenticator')) ||
|
||||
if (_.isNull(this.get('session.authenticator')) ||
|
||||
this.get('appMeta.secureMode')) return '';
|
||||
|
||||
if (this.get('session.authenticator') === 'authenticator:anonymous' ||
|
||||
|
@ -103,9 +101,6 @@ export default SimpleAuthSession.extend({
|
|||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.set('isMac', is.mac());
|
||||
this.set('isMobile', is.mobile());
|
||||
},
|
||||
|
||||
logout() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue