make code prettier 🎀
This commit is contained in:
parent
6d6e026e3c
commit
f55ac892e4
|
@ -6,7 +6,7 @@ export default Ember.Component.extend({
|
|||
showModal("admin-uploaded-image-list", {
|
||||
admin: true,
|
||||
title: `admin.site_settings.${setting.setting}.title`,
|
||||
model: { value, setting },
|
||||
model: { value, setting }
|
||||
}).setProperties({
|
||||
save: v => this.set("value", v)
|
||||
});
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { on, observes } from "ember-addons/ember-computed-decorators";
|
||||
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
|
||||
export default Ember.Controller.extend(ModalFunctionality, {
|
||||
|
||||
@on("init")
|
||||
@observes("model.value")
|
||||
_setup() {
|
||||
|
|
|
@ -10,7 +10,7 @@ const CUSTOM_TYPES = [
|
|||
"category_list",
|
||||
"value_list",
|
||||
"category",
|
||||
"uploaded_image_list",
|
||||
"uploaded_image_list"
|
||||
];
|
||||
|
||||
export default Ember.Mixin.create({
|
||||
|
|
|
@ -7,7 +7,9 @@ export default Em.Component.extend(UploadMixin, {
|
|||
|
||||
@computed("uploading")
|
||||
uploadButtonText(uploading) {
|
||||
return uploading ? I18n.t("uploading") : I18n.t("user.change_avatar.upload_picture");
|
||||
return uploading
|
||||
? I18n.t("uploading")
|
||||
: I18n.t("user.change_avatar.upload_picture");
|
||||
},
|
||||
|
||||
validateUploadedFilesOptions() {
|
||||
|
@ -16,5 +18,5 @@ export default Em.Component.extend(UploadMixin, {
|
|||
|
||||
uploadDone(upload) {
|
||||
this.sendAction("done", upload);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
|
@ -520,9 +520,11 @@ const User = RestModel.extend({
|
|||
},
|
||||
|
||||
isAllowedToUploadAFile(type) {
|
||||
return this.get("staff") ||
|
||||
return (
|
||||
this.get("staff") ||
|
||||
this.get("trust_level") > 0 ||
|
||||
Discourse.SiteSettings[`newuser_max_${type}s`] > 0;
|
||||
Discourse.SiteSettings[`newuser_max_${type}s`] > 0
|
||||
);
|
||||
},
|
||||
|
||||
createInvite(email, group_names, custom_message) {
|
||||
|
|
|
@ -38,8 +38,9 @@ export default RestrictedUserRoute.extend({
|
|||
controller.setProperties(props);
|
||||
|
||||
if (this.siteSettings.selectable_avatars_enabled) {
|
||||
ajax("/site/selectable-avatars.json")
|
||||
.then(avatars => controller.set("selectableAvatars", avatars));
|
||||
ajax("/site/selectable-avatars.json").then(avatars =>
|
||||
controller.set("selectableAvatars", avatars)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -106,4 +106,3 @@
|
|||
color: $danger;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -191,7 +191,9 @@ QUnit.test("selectable avatars", assert => {
|
|||
|
||||
click(".pref-avatar .btn");
|
||||
andThen(() => {
|
||||
assert.ok(exists(".selectable-avatars", "opens the avatar selection modal"));
|
||||
assert.ok(
|
||||
exists(".selectable-avatars", "opens the avatar selection modal")
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue