2018-02-04 20:49:42 +00:00
|
|
|
<div class="status-header {{isStatusInNotification ? 'status-in-notification' : ''}}">
|
2018-03-31 00:30:30 +00:00
|
|
|
<div class="status-header-avatar {{timelineType === 'pinned' ? 'hidden' : ''}}">
|
|
|
|
<Avatar :account size="extra-small"/>
|
|
|
|
</div>
|
2018-03-16 15:42:10 +00:00
|
|
|
<svg class="status-header-svg">
|
2018-02-11 18:35:25 +00:00
|
|
|
<use xlink:href="{{icon}}"/>
|
2018-02-04 18:05:01 +00:00
|
|
|
</svg>
|
2018-03-23 04:36:19 +00:00
|
|
|
<span class="status-header-span">
|
2018-02-11 18:35:25 +00:00
|
|
|
{{#if timelineType === 'pinned'}}
|
|
|
|
Pinned toot
|
|
|
|
{{else}}
|
2018-03-16 03:04:24 +00:00
|
|
|
<a href="/accounts/{{accountId}}"
|
2018-03-23 04:36:19 +00:00
|
|
|
class="status-header-a"
|
2018-03-20 01:05:51 +00:00
|
|
|
title="{{'@' + account.acct}}"
|
2018-02-11 18:35:25 +00:00
|
|
|
focus-key="{{focusKey}}" >
|
2018-03-16 03:04:24 +00:00
|
|
|
{{account.display_name || account.username}}
|
2018-02-11 18:35:25 +00:00
|
|
|
</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}}
|
2018-02-04 18:05:01 +00:00
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
.status-header {
|
2018-02-10 04:07:48 +00:00
|
|
|
grid-area: header;
|
2018-02-04 18:05:01 +00:00
|
|
|
margin: 5px 10px 5px 5px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
2018-03-31 00:30:30 +00:00
|
|
|
.status-header-avatar {
|
2018-03-23 04:36:19 +00:00
|
|
|
margin-left: 19px; /* offset for avatar, 48px - 24px - 5px */
|
|
|
|
}
|
|
|
|
|
2018-03-16 15:42:10 +00:00
|
|
|
.status-header-svg {
|
2018-03-23 04:36:19 +00:00
|
|
|
margin-left: 20px;
|
2018-02-04 18:05:01 +00:00
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
fill: var(--deemphasized-text-color);
|
|
|
|
}
|
2018-02-04 20:49:42 +00:00
|
|
|
|
2018-03-23 04:36:19 +00:00
|
|
|
@media (max-width: 767px) {
|
|
|
|
.status-header-svg {
|
|
|
|
margin-left: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-16 15:42:10 +00:00
|
|
|
.status-header.status-in-notification .status-header-svg {
|
2018-02-04 20:49:42 +00:00
|
|
|
fill: var(--body-text-color);
|
|
|
|
}
|
2018-03-23 04:36:19 +00:00
|
|
|
|
|
|
|
.status-header-span {
|
|
|
|
margin-left: 5px;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-header-span,
|
|
|
|
.status-header-a,
|
|
|
|
.status-header-a:visited,
|
|
|
|
.status-header-a:hover {
|
|
|
|
color: var(--deemphasized-text-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-in-notification .status-header-span,
|
|
|
|
.status-in-notification .status-header-a,
|
|
|
|
.status-in-notification .status-header-a:visited,
|
|
|
|
.status-in-notification .status-header-a:hover {
|
|
|
|
color: var(--body-text-color);
|
|
|
|
}
|
2018-02-04 18:05:01 +00:00
|
|
|
</style>
|
|
|
|
<script>
|
2018-03-23 04:36:19 +00:00
|
|
|
|
|
|
|
import Avatar from '../Avatar.html'
|
|
|
|
|
2018-02-04 18:05:01 +00:00
|
|
|
export default {
|
2018-03-23 04:36:19 +00:00
|
|
|
components: {
|
|
|
|
Avatar
|
|
|
|
},
|
2018-02-10 21:57:04 +00:00
|
|
|
computed: {
|
2018-03-16 03:04:24 +00:00
|
|
|
focusKey: (uuid) => `status-header-${uuid}`,
|
2018-02-11 18:35:25 +00:00
|
|
|
icon: (notification, status, timelineType) => {
|
|
|
|
if (timelineType === 'pinned') {
|
|
|
|
return '#fa-thumb-tack'
|
|
|
|
} else if ((notification && notification.type === 'reblog') || (status && status.reblog)) {
|
2018-02-04 18:05:01 +00:00
|
|
|
return '#fa-retweet'
|
|
|
|
} else if (notification && notification.type === 'follow') {
|
|
|
|
return '#fa-user-plus'
|
|
|
|
}
|
|
|
|
return '#fa-star'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|