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