mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
new UX for category management
This commit is contained in:
parent
1c08a7fbcf
commit
1f0fc844a8
29 changed files with 287 additions and 397 deletions
|
@ -14,6 +14,7 @@ import { inject as service } from '@ember/service';
|
|||
import { all } from 'rsvp';
|
||||
import { schedule } from '@ember/runloop';
|
||||
import { gt } from '@ember/object/computed';
|
||||
import { computed } from '@ember/object';
|
||||
import AuthMixin from '../../mixins/auth';
|
||||
|
||||
export default Component.extend(AuthMixin, {
|
||||
|
@ -23,6 +24,10 @@ export default Component.extend(AuthMixin, {
|
|||
localStorage: service('localStorage'),
|
||||
hasCategories: gt('categories.length', 0),
|
||||
filteredDocs: [],
|
||||
categoryLinkName: 'Manage',
|
||||
spaceSettings: computed('permissions', function() {
|
||||
return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage');
|
||||
}),
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
@ -50,6 +55,7 @@ export default Component.extend(AuthMixin, {
|
|||
});
|
||||
|
||||
this.set('categories', categories);
|
||||
this.set('categoryLinkName', categories.length > 0 ? 'manage' : 'add');
|
||||
|
||||
schedule('afterRender', () => {
|
||||
if (this.get('rootDocCount') > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue