mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FEATURE: Allow group owners to edit group name and avatar flair.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||
import { propertyEqual } from 'discourse/lib/computed';
|
||||
import { escapeExpression } from 'discourse/lib/utilities';
|
||||
import computed from 'ember-addons/ember-computed-decorators';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
adminGroupsType: Ember.inject.controller(),
|
||||
@@ -37,43 +35,6 @@ export default Ember.Controller.extend({
|
||||
];
|
||||
}.property(),
|
||||
|
||||
@computed
|
||||
demoAvatarUrl() {
|
||||
return Discourse.getURL('/images/avatar.png');
|
||||
},
|
||||
|
||||
@computed('model.flair_url')
|
||||
flairPreviewIcon() {
|
||||
return this.get('model.flair_url') && this.get('model.flair_url').substr(0,3) === 'fa-';
|
||||
},
|
||||
|
||||
@computed('flairPreviewIcon')
|
||||
flairPreviewImage() {
|
||||
return this.get('model.flair_url') && !this.get('flairPreviewIcon');
|
||||
},
|
||||
|
||||
@computed('flairPreviewImage', 'model.flair_url', 'model.flairBackgroundHexColor', 'model.flairHexColor')
|
||||
flairPreviewStyle() {
|
||||
var style = '';
|
||||
if (this.get('flairPreviewImage')) {
|
||||
style += 'background-image: url(' + escapeExpression(this.get('model.flair_url')) + '); ';
|
||||
}
|
||||
if (this.get('model.flairBackgroundHexColor')) {
|
||||
style += 'background-color: #' + this.get('model.flairBackgroundHexColor') + ';';
|
||||
}
|
||||
if (this.get('model.flairHexColor')) {
|
||||
style += 'color: #' + this.get('model.flairHexColor') + ';';
|
||||
}
|
||||
return style;
|
||||
},
|
||||
|
||||
@computed('model.flairBackgroundHexColor')
|
||||
flairPreviewClasses() {
|
||||
if (this.get('model.flairBackgroundHexColor')) {
|
||||
return 'rounded';
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
next() {
|
||||
if (this.get("showingLast")) { return; }
|
||||
|
||||
Reference in New Issue
Block a user