2016-10-26 19:03:55 +02:00
|
|
|
<template>
|
2020-10-28 08:53:23 +02:00
|
|
|
<div :class="[classes.root, 'Timeline']">
|
2018-12-17 19:14:38 +03:00
|
|
|
<div :class="classes.header">
|
2020-07-28 09:40:04 +03:00
|
|
|
<TimelineMenu v-if="!embedded" />
|
2019-07-05 10:17:44 +03:00
|
|
|
<button
|
2020-11-10 12:52:54 +02:00
|
|
|
v-if="showLoadButton"
|
2020-11-24 12:32:42 +02:00
|
|
|
class="button-default loadmore-button"
|
2019-07-05 10:17:44 +03:00
|
|
|
@click.prevent="showNewStatuses"
|
|
|
|
|
>
|
2020-06-30 17:37:36 +03:00
|
|
|
{{ loadButtonString }}
|
2018-09-03 22:12:18 +03:00
|
|
|
</button>
|
2019-07-05 10:17:44 +03:00
|
|
|
<div
|
2020-06-30 17:02:38 +03:00
|
|
|
v-else
|
2019-07-05 10:17:44 +03:00
|
|
|
class="loadmore-text faint"
|
|
|
|
|
@click.prevent
|
|
|
|
|
>
|
|
|
|
|
{{ $t('timeline.up_to_date') }}
|
2017-06-21 17:15:45 +03:00
|
|
|
</div>
|
2017-03-05 19:00:35 +02:00
|
|
|
</div>
|
2018-12-17 19:14:38 +03:00
|
|
|
<div :class="classes.body">
|
2020-09-29 10:18:37 +00:00
|
|
|
<div
|
|
|
|
|
ref="timeline"
|
|
|
|
|
class="timeline"
|
|
|
|
|
>
|
2019-07-19 22:40:37 -04:00
|
|
|
<template v-for="statusId in pinnedStatusIds">
|
|
|
|
|
<conversation
|
|
|
|
|
v-if="timeline.statusesObject[statusId]"
|
2019-07-19 22:46:11 -04:00
|
|
|
:key="statusId + '-pinned'"
|
2019-07-19 22:40:37 -04:00
|
|
|
class="status-fadein"
|
2019-09-03 13:19:14 -04:00
|
|
|
:status-id="statusId"
|
2019-07-19 22:40:37 -04:00
|
|
|
:collapsable="true"
|
2019-08-15 13:16:55 -04:00
|
|
|
:pinned-status-ids-object="pinnedStatusIdsObject"
|
2019-09-13 16:55:17 -04:00
|
|
|
:in-profile="inProfile"
|
2019-11-25 12:25:01 -05:00
|
|
|
:profile-user-id="userId"
|
2019-07-19 22:40:37 -04:00
|
|
|
/>
|
|
|
|
|
</template>
|
2019-07-20 16:54:30 -04:00
|
|
|
<template v-for="status in timeline.visibleStatuses">
|
|
|
|
|
<conversation
|
|
|
|
|
v-if="!excludedStatusIdsObject[status.id]"
|
|
|
|
|
:key="status.id"
|
|
|
|
|
class="status-fadein"
|
2019-09-03 13:19:14 -04:00
|
|
|
:status-id="status.id"
|
2019-07-20 16:54:30 -04:00
|
|
|
:collapsable="true"
|
2019-09-13 16:55:17 -04:00
|
|
|
:in-profile="inProfile"
|
2019-11-25 12:25:01 -05:00
|
|
|
:profile-user-id="userId"
|
2020-09-29 10:18:37 +00:00
|
|
|
:virtual-hidden="virtualScrollingEnabled && !statusesToDisplay.includes(status.id)"
|
2019-07-20 16:54:30 -04:00
|
|
|
/>
|
|
|
|
|
</template>
|
2016-11-06 17:44:05 +01:00
|
|
|
</div>
|
2017-03-01 20:36:37 +01:00
|
|
|
</div>
|
2018-12-17 19:14:38 +03:00
|
|
|
<div :class="classes.footer">
|
2019-07-05 10:17:44 +03:00
|
|
|
<div
|
|
|
|
|
v-if="count===0"
|
|
|
|
|
class="new-status-notification text-center panel-footer faint"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('timeline.no_statuses') }}
|
2019-02-20 10:13:28 -05:00
|
|
|
</div>
|
2019-07-05 10:17:44 +03:00
|
|
|
<div
|
|
|
|
|
v-else-if="bottomedOut"
|
|
|
|
|
class="new-status-notification text-center panel-footer faint"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('timeline.no_more_statuses') }}
|
2019-01-29 21:04:52 +02:00
|
|
|
</div>
|
2020-11-24 12:32:42 +02:00
|
|
|
<button
|
2020-11-10 12:52:54 +02:00
|
|
|
v-else-if="!timeline.loading"
|
2020-11-24 14:52:01 +02:00
|
|
|
class="button-unstyled -link -fullwidth"
|
2019-07-05 10:17:44 +03:00
|
|
|
@click.prevent="fetchOlderStatuses()"
|
|
|
|
|
>
|
2020-11-24 16:10:03 +02:00
|
|
|
<div class="new-status-notification text-center panel-footer">
|
|
|
|
|
{{ $t('timeline.load_older') }}
|
|
|
|
|
</div>
|
2020-11-24 12:32:42 +02:00
|
|
|
</button>
|
2019-07-05 10:17:44 +03:00
|
|
|
<div
|
|
|
|
|
v-else
|
|
|
|
|
class="new-status-notification text-center panel-footer"
|
|
|
|
|
>
|
2020-10-21 00:31:16 +03:00
|
|
|
<FAIcon
|
|
|
|
|
icon="circle-notch"
|
|
|
|
|
spin
|
|
|
|
|
size="lg"
|
|
|
|
|
/>
|
2019-01-29 21:04:52 +02:00
|
|
|
</div>
|
2018-04-11 19:34:40 +03:00
|
|
|
</div>
|
2016-10-26 19:03:55 +02:00
|
|
|
</div>
|
|
|
|
|
</template>
|
2018-12-17 19:14:38 +03:00
|
|
|
|
2016-10-26 19:03:55 +02:00
|
|
|
<script src="./timeline.js"></script>
|
2017-01-15 15:44:56 +01:00
|
|
|
|
|
|
|
|
<style lang="scss">
|
2018-04-01 05:28:20 +03:00
|
|
|
@import '../../_variables.scss';
|
2017-01-15 15:44:56 +01:00
|
|
|
|
2020-10-28 08:53:23 +02:00
|
|
|
.Timeline {
|
2018-04-07 19:30:27 +03:00
|
|
|
.loadmore-text {
|
2018-11-26 03:19:04 +03:00
|
|
|
opacity: 1;
|
2018-04-13 23:04:31 +03:00
|
|
|
}
|
2020-10-28 08:53:23 +02:00
|
|
|
|
|
|
|
|
&.-blocked {
|
2020-11-02 23:43:32 +02:00
|
|
|
cursor: progress;
|
2020-10-28 08:53:23 +02:00
|
|
|
}
|
2018-04-01 05:28:20 +03:00
|
|
|
}
|
2020-07-03 12:56:31 +03:00
|
|
|
|
|
|
|
|
.timeline-heading {
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
.loadmore-button {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
.loadmore-text {
|
|
|
|
|
flex-shrink: 0;
|
2020-07-09 12:49:16 +03:00
|
|
|
line-height: 1em;
|
2020-07-03 12:56:31 +03:00
|
|
|
}
|
|
|
|
|
}
|
2017-01-15 15:44:56 +01:00
|
|
|
</style>
|