mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15:24 +02:00
Reafctor client side (EJS) constants
This commit is contained in:
parent
8fb001422a
commit
bde0091a4a
23 changed files with 118 additions and 367 deletions
|
@ -14,7 +14,6 @@ import { computed } from '@ember/object';
|
|||
import { schedule } from '@ember/runloop';
|
||||
import { A } from '@ember/array';
|
||||
import { inject as service } from '@ember/service';
|
||||
import constants from '../../utils/constants';
|
||||
import TooltipMixin from '../../mixins/tooltip';
|
||||
import ModalMixin from '../../mixins/modal';
|
||||
import AuthMixin from '../../mixins/auth';
|
||||
|
@ -51,7 +50,7 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
dropzone: null,
|
||||
|
||||
spaceTypeOptions: A([]),
|
||||
spaceType: constants.FolderType.Private,
|
||||
spaceType: 0,
|
||||
likes: '',
|
||||
allowLikes: false,
|
||||
|
||||
|
@ -69,6 +68,7 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
let constants = this.get('constants');
|
||||
|
||||
let folder = this.get('space');
|
||||
let targets = _.reject(this.get('spaces'), {id: folder.get('id')});
|
||||
|
|
|
@ -13,7 +13,6 @@ import $ from 'jquery';
|
|||
import { notEmpty } from '@ember/object/computed';
|
||||
import { inject as service } from '@ember/service'
|
||||
import ModalMixin from '../../mixins/modal';
|
||||
import constants from '../../utils/constants';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(ModalMixin, {
|
||||
|
@ -31,6 +30,8 @@ export default Component.extend(ModalMixin, {
|
|||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
let constants = this.get('constants');
|
||||
|
||||
this.pins = [];
|
||||
|
||||
if (this.get('appMeta.authProvider') === constants.AuthProvider.Keycloak) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue