This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/images-uploader.js.es6
2018-07-18 13:09:16 +02:00

23 lines
510 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);
}
});