mirror of
https://github.com/flarum/framework.git
synced 2025-04-27 15:14:04 +08:00
Remove unused component
This commit is contained in:
parent
190aa925ac
commit
f00d2b1363
@ -1,66 +0,0 @@
|
|||||||
import Component from 'flarum/Component';
|
|
||||||
import humanTime from 'flarum/helpers/humanTime';
|
|
||||||
import avatar from 'flarum/helpers/avatar';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `Activity` component represents a piece of activity of a user's activity
|
|
||||||
* feed. Subclasses should implement the `description` and `content` methods.
|
|
||||||
*
|
|
||||||
* ### Props
|
|
||||||
*
|
|
||||||
* - `activity`
|
|
||||||
*
|
|
||||||
* @abstract
|
|
||||||
*/
|
|
||||||
export default class Activity extends Component {
|
|
||||||
view() {
|
|
||||||
const activity = this.props.activity;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="Activity">
|
|
||||||
{avatar(this.user(), {className: 'Activity-avatar'})}
|
|
||||||
|
|
||||||
<div className="Activity-header">
|
|
||||||
<strong className="Activity-description">{this.description()}</strong>
|
|
||||||
{humanTime(this.time())}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{this.content()}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the user whose avatar should be displayed.
|
|
||||||
*
|
|
||||||
* @return {User}
|
|
||||||
* @abstract
|
|
||||||
*/
|
|
||||||
user() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the time of the activity.
|
|
||||||
*
|
|
||||||
* @return {Date}
|
|
||||||
* @abstract
|
|
||||||
*/
|
|
||||||
time() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the description of the activity.
|
|
||||||
*
|
|
||||||
* @return {VirtualElement}
|
|
||||||
*/
|
|
||||||
description() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the content to show below the activity description.
|
|
||||||
*
|
|
||||||
* @return {VirtualElement}
|
|
||||||
*/
|
|
||||||
content() {
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user