mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Add "Recently read topics" tab to user activity page (#12047)
This commit is contained in:
parent
66151d8056
commit
12b57c0dee
@ -102,6 +102,11 @@ export default Controller.extend(CanCheckEmails, {
|
||||
return viewingSelf;
|
||||
},
|
||||
|
||||
@discourseComputed("viewingSelf")
|
||||
showRead(viewingSelf) {
|
||||
return viewingSelf;
|
||||
},
|
||||
|
||||
@discourseComputed("viewingSelf", "currentUser.admin")
|
||||
showPrivateMessages(viewingSelf, isAdmin) {
|
||||
return (
|
||||
|
@ -125,6 +125,7 @@ export default function () {
|
||||
});
|
||||
this.route("pending");
|
||||
this.route("drafts");
|
||||
this.route("read");
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
import UserAction from "discourse/models/user-action";
|
||||
import UserTopicListRoute from "discourse/routes/user-topic-list";
|
||||
|
||||
export default UserTopicListRoute.extend({
|
||||
userActionType: UserAction.TYPES.topics,
|
||||
|
||||
model() {
|
||||
return this.store.findFiltered("topicList", {
|
||||
filter: "read",
|
||||
});
|
||||
},
|
||||
});
|
@ -9,6 +9,11 @@
|
||||
<li>
|
||||
{{#link-to "userActivity.replies"}}{{i18n "user_action_groups.5"}}{{/link-to}}
|
||||
</li>
|
||||
{{#if user.showRead}}
|
||||
<li>
|
||||
{{#link-to "userActivity.read" title=(i18n "user.read_help")}}{{i18n "user.read"}}{{/link-to}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if user.showDrafts}}
|
||||
<li>
|
||||
{{#link-to "userActivity.drafts"}}{{i18n "user_action_groups.15"}}{{/link-to}}
|
||||
|
@ -31,6 +31,9 @@ module("Unit | Model | user-stream", function () {
|
||||
// defaults to posts/topics
|
||||
assert.equal(stream.get("filterParam"), "4,5");
|
||||
|
||||
stream.set("filter", UserAction.TYPES.topics);
|
||||
assert.equal(stream.get("filterParam"), "4");
|
||||
|
||||
stream.set("filter", UserAction.TYPES.likes_given);
|
||||
assert.equal(stream.get("filterParam"), UserAction.TYPES.likes_given);
|
||||
|
||||
|
@ -967,6 +967,8 @@ en:
|
||||
sunday: "Sunday"
|
||||
to: "to"
|
||||
activity_stream: "Activity"
|
||||
read: "Read"
|
||||
read_help: "Recently read topics"
|
||||
preferences: "Preferences"
|
||||
feature_topic_on_profile:
|
||||
open_search: "Select a New Topic"
|
||||
|
Loading…
Reference in New Issue
Block a user