2016-10-26 17:03:55 +00:00
|
|
|
<template>
|
2017-08-21 17:25:01 +00:00
|
|
|
<div class="timeline panel panel-default" v-if="viewing == 'statuses'">
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="panel-heading timeline-heading">
|
2017-03-05 17:00:35 +00:00
|
|
|
<div class="title">
|
|
|
|
{{title}}
|
2016-10-28 13:40:13 +00:00
|
|
|
</div>
|
2018-03-31 18:14:36 +00:00
|
|
|
<button @click.prevent="showNewStatuses" class="loadmore-button" v-if="timeline.newStatusCount > 0 && !timelineError">
|
2017-11-21 22:47:20 +00:00
|
|
|
{{$t('timeline.show_new')}}{{newStatusCountStr}}
|
2017-03-05 17:00:35 +00:00
|
|
|
</button>
|
2018-03-31 18:14:36 +00:00
|
|
|
<div @click.prevent class="loadmore-text" v-if="timelineError">
|
2017-11-07 14:14:37 +00:00
|
|
|
{{$t('timeline.error_fetching')}}
|
2017-06-21 14:15:45 +00:00
|
|
|
</div>
|
2018-03-31 18:14:36 +00:00
|
|
|
<div @click.prevent class="loadmore-text" v-if="!timeline.newStatusCount > 0 && !timelineError">
|
2017-11-07 14:14:37 +00:00
|
|
|
{{$t('timeline.up_to_date')}}
|
2017-06-21 14:15:45 +00:00
|
|
|
</div>
|
2017-03-05 17:00:35 +00:00
|
|
|
</div>
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="panel-body">
|
2017-03-01 19:36:37 +00:00
|
|
|
<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">
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="new-status-notification text-center">{{$t('timeline.load_older')}}</div>
|
2017-03-01 19:36:37 +00:00
|
|
|
</a>
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="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>
|
2017-08-21 17:25:01 +00:00
|
|
|
<div class="timeline panel panel-default" v-else-if="viewing == 'followers'">
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="panel-heading timeline-heading">
|
2017-08-21 17:25:01 +00:00
|
|
|
<div class="title">
|
2017-11-07 14:14:37 +00:00
|
|
|
{{$t('user_card.followers')}}
|
2017-08-21 17:25:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="panel-body">
|
2017-08-21 17:25:01 +00:00
|
|
|
<div class="timeline">
|
2018-02-04 15:26:46 +00:00
|
|
|
<user-card v-for="follower in followers" :key="follower.id" :user="follower" :showFollows="false"></user-card>
|
2017-08-21 17:25:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="timeline panel panel-default" v-else-if="viewing == 'friends'">
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="panel-heading timeline-heading">
|
2017-08-21 17:25:01 +00:00
|
|
|
<div class="title">
|
2017-11-07 14:14:37 +00:00
|
|
|
{{$t('user_card.followees')}}
|
2017-08-21 17:25:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="panel-body">
|
2017-08-21 17:25:01 +00:00
|
|
|
<div class="timeline">
|
2018-02-04 15:26:46 +00:00
|
|
|
<user-card v-for="friend in friends" :key="friend.id" :user="friend" :showFollows="true"></user-card>
|
2017-08-21 17:25:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-26 17:03:55 +00:00
|
|
|
</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;
|
2017-06-21 14:15:45 +00:00
|
|
|
font-size: 14px;
|
2017-03-11 01:23:34 +00:00
|
|
|
|
2017-03-05 17:00:35 +00:00
|
|
|
min-width: 6em;
|
2017-03-11 01:23:34 +00:00
|
|
|
height: 1.8em;
|
|
|
|
line-height: 100%;
|
2017-03-05 17:00:35 +00:00
|
|
|
}
|
2017-06-21 14:15:45 +00:00
|
|
|
.loadmore-text {
|
|
|
|
position: absolute;
|
|
|
|
right: 0.6em;
|
|
|
|
font-size: 14px;
|
|
|
|
min-width: 6em;
|
|
|
|
border-radius: 5px;
|
2018-03-31 18:14:36 +00:00
|
|
|
background-color: transparent;
|
|
|
|
color: var(--faint);
|
2017-06-21 14:32:41 +00:00
|
|
|
font-family: sans-serif;
|
2017-06-21 14:15:45 +00:00
|
|
|
text-align: center;
|
|
|
|
padding: 0 0.5em 0 0.5em;
|
|
|
|
opacity: 0.8;
|
|
|
|
}
|
2017-03-07 16:27:12 +00:00
|
|
|
.error {
|
2018-03-31 18:14:36 +00:00
|
|
|
color: var(--lightFg);
|
|
|
|
background-color: var(--cRed);
|
2017-03-07 16:27:12 +00:00
|
|
|
}
|
2017-03-05 17:00:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.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;
|
2018-03-31 18:14:36 +00:00
|
|
|
border-color: var(--border);
|
2017-03-05 17:00:35 +00:00
|
|
|
padding: 10px;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
2017-01-15 14:44:56 +00:00
|
|
|
</style>
|