2016-10-26 17:03:55 +00:00
|
|
|
<template>
|
2017-03-01 19:36:37 +00:00
|
|
|
<div class="timeline panel panel-default">
|
2017-03-06 21:51:39 +00:00
|
|
|
<div class="panel-heading timeline-heading base01-background base04">
|
2017-03-05 17:00:35 +00:00
|
|
|
<div class="title">
|
|
|
|
{{title}}
|
2016-10-28 13:40:13 +00:00
|
|
|
</div>
|
2017-03-09 12:38:32 +00:00
|
|
|
<button @click.prevent="showNewStatuses" class="base06 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timelineError">
|
2017-03-05 17:00:35 +00:00
|
|
|
Show new ({{timeline.newStatusCount}})
|
|
|
|
</button>
|
2017-03-09 12:38:32 +00:00
|
|
|
<button @click.prevent class="base06 error no-press loadmore-button" v-if="timelineError">
|
2017-03-07 16:27:12 +00:00
|
|
|
Error fetching updates
|
|
|
|
</button>
|
2017-03-09 12:38:32 +00:00
|
|
|
<button @click.prevent class="base04 base01-background no-press loadmore-button" v-if="!timeline.newStatusCount > 0 && !timelineError">
|
2017-03-05 17:00:35 +00:00
|
|
|
Up-to-date
|
|
|
|
</button>
|
|
|
|
</div>
|
2017-03-01 19:36:37 +00:00
|
|
|
<div class="panel-body">
|
|
|
|
<div class="timeline">
|
|
|
|
<status-or-conversation v-for="status in timeline.visibleStatuses" :key="status.id" v-bind:statusoid="status"></status-or-conversation>
|
|
|
|
<a href="#" v-on:click.prevent='fetchOlderStatuses()' v-if="!timeline.loading">
|
2017-03-08 23:13:37 +00:00
|
|
|
<div class="base01-background base03-border new-status-notification text-center">Load older statuses.</div>
|
2017-03-01 19:36:37 +00:00
|
|
|
</a>
|
2017-03-08 23:13:37 +00:00
|
|
|
<div class="base01-background base03-border new-status-notification text-center" v-else>...</div>
|
2016-11-06 16:44:05 +00:00
|
|
|
</div>
|
2017-03-01 19:36:37 +00:00
|
|
|
</div>
|
2016-10-26 17:03:55 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script src="./timeline.js"></script>
|
2017-01-15 14:44:56 +00:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
2017-03-06 21:51:39 +00:00
|
|
|
.timeline {
|
|
|
|
.timeline-heading {
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
}
|
2017-03-05 17:00:35 +00:00
|
|
|
.title {
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
max-width: 70%;
|
|
|
|
}
|
2017-03-06 21:51:39 +00:00
|
|
|
.loadmore-button {
|
2017-03-05 17:00:35 +00:00
|
|
|
position: absolute;
|
|
|
|
right: 0.6em;
|
|
|
|
padding: 0.1em 0.3em 0.25em 0.3em;
|
|
|
|
min-width: 6em;
|
|
|
|
}
|
2017-03-07 16:27:12 +00:00
|
|
|
.error {
|
|
|
|
background-color: rgba(255, 48, 16, 0.65);
|
|
|
|
}
|
2017-03-05 17:00:35 +00:00
|
|
|
.no-press {
|
|
|
|
opacity: 0.8;
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.new-status-notification {
|
|
|
|
position:relative;
|
|
|
|
margin-top: -1px;
|
|
|
|
font-size: 1.1em;
|
|
|
|
border-width: 1px 0 0 0;
|
|
|
|
border-style: solid;
|
|
|
|
border-radius: 0 0 10px 10px;
|
|
|
|
padding: 10px;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
2017-01-15 14:44:56 +00:00
|
|
|
</style>
|