mirror of
https://github.com/flarum/core.git
synced 2025-02-25 19:53:48 +01:00
Add notification excerpts to help distinguish posts
This commit is contained in:
parent
4e8f69a18c
commit
52bf8b3c1c
@ -26,6 +26,9 @@ export default class Notification extends Component {
|
|||||||
{icon(this.icon(), {className: 'Notification-icon'})}
|
{icon(this.icon(), {className: 'Notification-icon'})}
|
||||||
<span className="Notification-content">{this.content()}</span>
|
<span className="Notification-content">{this.content()}</span>
|
||||||
{humanTime(notification.time())}
|
{humanTime(notification.time())}
|
||||||
|
<div className="Notification-excerpt">
|
||||||
|
{this.excerpt()}
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -58,6 +61,15 @@ export default class Notification extends Component {
|
|||||||
content() {
|
content() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the excerpt of the notification.
|
||||||
|
*
|
||||||
|
* @return {VirtualElement}
|
||||||
|
* @abstract
|
||||||
|
*/
|
||||||
|
excerpt() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark the notification as read.
|
* Mark the notification as read.
|
||||||
*/
|
*/
|
||||||
|
@ -114,3 +114,11 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.Notification-excerpt {
|
||||||
|
color: @muted-more-color;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-top: 5px;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user