mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
21 lines
499 B
JavaScript
21 lines
499 B
JavaScript
import computed from "ember-addons/ember-computed-decorators";
|
|
import UploadMixin from "discourse/mixins/upload";
|
|
|
|
export default Em.Component.extend(UploadMixin, {
|
|
type: "avatar",
|
|
tagName: "span",
|
|
|
|
@computed("uploading")
|
|
uploadButtonText(uploading) {
|
|
return uploading ? I18n.t("uploading") : I18n.t("user.change_avatar.upload_picture");
|
|
},
|
|
|
|
validateUploadedFilesOptions() {
|
|
return { imagesOnly: true };
|
|
},
|
|
|
|
uploadDone(upload) {
|
|
this.sendAction("done", upload);
|
|
},
|
|
});
|