61 lines
1.6 KiB
HTML
61 lines
1.6 KiB
HTML
|
<div class="status-header">
|
||
|
<svg>
|
||
|
<use xlink:href="{{getIcon(notification, status)}}"/>
|
||
|
</svg>
|
||
|
<span>
|
||
|
<a href="/accounts/{{getAccount(notification, status).id}}">
|
||
|
{{getAccount(notification, status).display_name || ('@' + getAccount(notification, status).username)}}
|
||
|
</a>
|
||
|
{{#if notification && notification.type === 'reblog'}}
|
||
|
boosted your status
|
||
|
{{elseif notification && notification.type === 'favourite'}}
|
||
|
favorited your status
|
||
|
{{elseif notification && notification.type === 'follow'}}
|
||
|
followed you
|
||
|
{{elseif status && status.reblog}}
|
||
|
boosted
|
||
|
{{/if}}
|
||
|
</span>
|
||
|
</div>
|
||
|
<style>
|
||
|
.status-header span {
|
||
|
margin-left: 5px;
|
||
|
}
|
||
|
|
||
|
:global(.status-header span, .status-header a, .status-header a:visited, .status-header a:hover) {
|
||
|
color: var(--deemphasized-text-color);
|
||
|
}
|
||
|
|
||
|
.status-header {
|
||
|
grid-area: status-header;
|
||
|
margin: 5px 10px 5px 5px;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.status-header svg {
|
||
|
width: 18px;
|
||
|
height: 18px;
|
||
|
fill: var(--deemphasized-text-color);
|
||
|
}
|
||
|
</style>
|
||
|
<script>
|
||
|
export default {
|
||
|
helpers: {
|
||
|
getIcon(notification, status) {
|
||
|
if ((notification && notification.type === 'reblog') || (status && status.reblog)) {
|
||
|
return '#fa-retweet'
|
||
|
} else if (notification && notification.type === 'follow') {
|
||
|
return '#fa-user-plus'
|
||
|
}
|
||
|
return '#fa-star'
|
||
|
},
|
||
|
getAccount(notification, status) {
|
||
|
if (notification && notification.account) {
|
||
|
return notification.account
|
||
|
}
|
||
|
return status.account
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|