mirror of
https://github.com/flarum/core.git
synced 2025-08-07 00:47:00 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import Notification from 'flarum/components/notification';
|
||||
import username from 'flarum/helpers/username';
|
||||
|
||||
export default class NotificationDiscussionStickied extends Notification {
|
||||
view() {
|
||||
var notification = this.props.notification;
|
||||
var discussion = notification.subject();
|
||||
|
||||
return super.view({
|
||||
href: app.route('discussion.near', {
|
||||
id: discussion.id(),
|
||||
slug: discussion.slug(),
|
||||
near: notification.content().postNumber
|
||||
}),
|
||||
config: m.route,
|
||||
title: discussion.title(),
|
||||
icon: 'thumb-tack',
|
||||
content: ['Stickied by ', username(notification.sender())]
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
import PostActivity from 'flarum/components/post-activity';
|
||||
|
||||
export default class PostDiscussionStickied extends PostActivity {
|
||||
view() {
|
||||
var post = this.props.post;
|
||||
|
||||
return super.view('thumb-tack', [post.content().sticky ? 'stickied' : 'unstickied', ' the discussion.']);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user