mirror of
https://ghfast.top/https://github.com/discourse/discourse-follow.git
synced 2026-07-15 11:36:38 +08:00
This commit adds a nav item under the Activity tab in user profile to show a feed of posts made by followed users.
15 lines
527 B
JavaScript
15 lines
527 B
JavaScript
import Component from "@ember/component";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
import { propertyEqual } from "discourse/lib/computed";
|
|
import { notEmpty } from "@ember/object/computed";
|
|
|
|
export default Component.extend({
|
|
hasUsers: notEmpty("users"),
|
|
viewingSelf: propertyEqual("user.username", "currentUser.username"),
|
|
|
|
@discourseComputed("type", "viewingSelf")
|
|
noneMessage(type, viewingSelf) {
|
|
let key = viewingSelf ? "none" : "none_other";
|
|
return `user.${type}.${key}`;
|
|
},
|
|
});
|