2018-05-02 00:05:36 +00:00
|
|
|
{#if status}
|
|
|
|
<Status {index} {length} {timelineType} {timelineValue} {focusSelector}
|
|
|
|
{status} {notification} on:recalculateHeight
|
2018-02-04 18:05:01 +00:00
|
|
|
/>
|
2018-05-02 00:05:36 +00:00
|
|
|
{:else}
|
2018-02-04 18:05:01 +00:00
|
|
|
<article class="notification-article"
|
|
|
|
tabindex="0"
|
2018-05-02 00:05:36 +00:00
|
|
|
aria-posinset={index}
|
|
|
|
aria-setsize={length} >
|
|
|
|
<StatusHeader {notification} {notificationId} {status} {statusId} {timelineType}
|
|
|
|
{account} {accountId} {uuid} isStatusInNotification="true" />
|
2018-02-04 18:05:01 +00:00
|
|
|
</article>
|
2018-05-02 00:05:36 +00:00
|
|
|
{/if}
|
2018-02-04 18:05:01 +00:00
|
|
|
<style>
|
|
|
|
.notification-article {
|
|
|
|
width: 560px;
|
|
|
|
max-width: calc(100vw - 40px);
|
|
|
|
padding: 10px 20px;
|
|
|
|
border-bottom: 1px solid var(--main-border);
|
|
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
|
|
.notification-article {
|
|
|
|
padding: 10px 10px;
|
|
|
|
max-width: calc(100vw - 20px);
|
2018-02-25 19:29:19 +00:00
|
|
|
width: 580px;
|
2018-02-04 18:05:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
2018-02-04 18:05:26 +00:00
|
|
|
import Status from './Status.html'
|
|
|
|
import StatusHeader from './StatusHeader.html'
|
2018-03-16 03:04:24 +00:00
|
|
|
import { store } from '../../_store/store'
|
|
|
|
|
2018-02-04 18:05:01 +00:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Status,
|
|
|
|
StatusHeader
|
2018-03-16 03:04:24 +00:00
|
|
|
},
|
|
|
|
store: () => store,
|
|
|
|
computed: {
|
2018-05-02 00:05:36 +00:00
|
|
|
account: ({ notification }) => notification.account,
|
|
|
|
accountId: ({ account }) => account.id,
|
|
|
|
notificationId: ({ notification }) => notification.id,
|
|
|
|
status: ({ notification }) => notification.status,
|
|
|
|
statusId: ({ status }) => status && status.id,
|
|
|
|
uuid: ({ $currentInstance, timelineType, timelineValue, notificationId, statusId }) => {
|
2018-03-16 03:04:24 +00:00
|
|
|
return `${$currentInstance}/${timelineType}/${timelineValue}/${notificationId}/${statusId || ''}`
|
2018-04-20 04:38:01 +00:00
|
|
|
}
|
2018-02-04 18:05:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|