mirror of
https://github.com/documize/community.git
synced 2025-07-23 07:09:43 +02:00
Normalized remaining space options into settings admin
Moved space naming and category management into space settings.
This commit is contained in:
parent
29534273b8
commit
d689cbc281
16 changed files with 174 additions and 331 deletions
|
@ -13,6 +13,7 @@ import { A } from '@ember/array';
|
|||
import { inject as service } from '@ember/service';
|
||||
import { schedule } from '@ember/runloop';
|
||||
import { computed } from '@ember/object';
|
||||
import { empty } from '@ember/object/computed';
|
||||
import AuthMixin from '../../mixins/auth';
|
||||
import Notifier from '../../mixins/notifier';
|
||||
import Component from '@ember/component';
|
||||
|
@ -26,6 +27,8 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage');
|
||||
}),
|
||||
|
||||
spaceName: '',
|
||||
hasNameError: empty('spaceName'),
|
||||
spaceTypeOptions: A([]),
|
||||
spaceType: 0,
|
||||
likes: '',
|
||||
|
@ -51,6 +54,8 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
} else {
|
||||
this.set('likes', 'Did this help you?');
|
||||
}
|
||||
|
||||
this.set('spaceName', this.get('space.name'));
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
@ -75,6 +80,10 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
let allowLikes = this.get('allowLikes');
|
||||
space.set('likes', allowLikes ? this.get('likes') : '');
|
||||
|
||||
let spaceName = this.get('spaceName').trim();
|
||||
if (spaceName.length === 0) return;
|
||||
space.set('name', spaceName);
|
||||
|
||||
this.showWait();
|
||||
|
||||
this.get('spaceSvc').save(space).then(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue