1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 00:47:00 +02:00

Initial commit

This commit is contained in:
Toby Zerner
2015-05-07 22:26:02 +09:30
commit 3787cc413e
22 changed files with 624 additions and 0 deletions

View File

@@ -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())]
});
}
}

View File

@@ -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.']);
}
}