diaspora/app/assets/javascripts/app/views/preview_post_view.js
Benjamin Neff dd6cbbbb8e
Remove avatar, name, timestamp and interactions from publisher preview
This doesn't add any value in the post preview:
* Avatar is already at the left-hand side of the publisher
* Timestamp is always "less than a minute ago"
* Interactions are disabled in the preview anyway

We don't display these things in the comment preview either, they only
need space and don't add any value to the preview.
2017-08-14 02:21:28 +02:00

30 lines
925 B
JavaScript

// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.PreviewPost = app.views.Post.extend({
templateName: "stream-element",
className: "stream-element loaded",
subviews: {
".post-content": "postContentView",
".oembed": "oEmbedView",
".opengraph": "openGraphView",
".poll": "pollView",
".status-message-location": "postLocationStreamView"
},
initialize: function() {
this.model.set("preview", true);
this.oEmbedView = new app.views.OEmbed({model: this.model});
this.openGraphView = new app.views.OpenGraph({model: this.model});
this.pollView = new app.views.Poll({model: this.model});
},
postContentView: function() {
return new app.views.StatusMessage({model: this.model});
},
postLocationStreamView: function() {
return new app.views.LocationStream({model: this.model});
}
});
// @license-end