FIX: remove bookmark from user stream
This commit is contained in:
parent
aef575aad0
commit
b8c8348e5b
|
@ -1,7 +1,13 @@
|
|||
import { actionDescription } from 'discourse/components/small-action';
|
||||
import { actionDescription } from "discourse/components/small-action";
|
||||
|
||||
export default Ember.Component.extend({
|
||||
classNameBindings: [':item', 'item.hidden', 'item.deleted', 'moderatorAction'],
|
||||
moderatorAction: Discourse.computed.propertyEqual('item.post_type', 'site.post_types.moderator_action'),
|
||||
actionDescription: actionDescription('item.action_code', 'item.created_at')
|
||||
classNameBindings: [":item", "item.hidden", "item.deleted", "moderatorAction"],
|
||||
moderatorAction: Discourse.computed.propertyEqual("item.post_type", "site.post_types.moderator_action"),
|
||||
actionDescription: actionDescription("item.action_code", "item.created_at"),
|
||||
|
||||
actions: {
|
||||
removeBookmark(userAction) {
|
||||
this.sendAction("removeBookmark", userAction);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
export default Discourse.Route.extend({
|
||||
model: function() {
|
||||
return this.modelFor('user');
|
||||
model() {
|
||||
return this.modelFor("user");
|
||||
},
|
||||
|
||||
setupController: function(controller, user) {
|
||||
this.controllerFor('user-activity').set('model', user);
|
||||
setupController(controller, user) {
|
||||
this.controllerFor("user-activity").set("model", user);
|
||||
|
||||
// Bring up a draft
|
||||
const composerController = this.controllerFor('composer');
|
||||
controller.set('model', user);
|
||||
const composerController = this.controllerFor("composer");
|
||||
controller.set("model", user);
|
||||
if (this.currentUser) {
|
||||
Discourse.Draft.get('new_private_message').then(function(data) {
|
||||
Discourse.Draft.get("new_private_message").then(function(data) {
|
||||
if (data.draft) {
|
||||
composerController.open({
|
||||
draft: data.draft,
|
||||
draftKey: 'new_private_message',
|
||||
draftKey: "new_private_message",
|
||||
ignoreIfChanged: true,
|
||||
draftSequence: data.draft_sequence
|
||||
});
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
<p class='excerpt'>{{{item.excerpt}}}</p>
|
||||
|
||||
|
||||
{{#each item.children as |child|}}
|
||||
<div class='child-actions'>
|
||||
<i class="icon {{child.icon}}"></i>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{#each model.content as |item|}}
|
||||
{{stream-item item=item}}
|
||||
{{stream-item item=item removeBookmark="removeBookmark"}}
|
||||
{{/each}}
|
||||
|
|
Loading…
Reference in New Issue