diff options
| author | Roger Braun <roger@rogerbraun.net> | 2017-03-09 10:33:21 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2017-03-09 10:33:21 +0100 |
| commit | 0eeccb87cef4d137710e3c7fd215b94e45aff3d1 (patch) | |
| tree | 584085071af589e58f79ffb67051c49b6bd883bb /src/components/timeline/timeline.vue | |
| parent | 290180a987ecb4949fc877c512f3cff120bcbc70 (diff) | |
| parent | 64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff) | |
Merge branch 'develop' into feature/hash-routed
Diffstat (limited to 'src/components/timeline/timeline.vue')
| -rw-r--r-- | src/components/timeline/timeline.vue | 82 |
1 files changed, 59 insertions, 23 deletions
diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 45886f6c..ac074f3c 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -1,33 +1,69 @@ <template> - <div class="timeline"> - <a href="#" v-on:click.prevent='showNewStatuses()' v-if="timeline.newStatusCount > 0"> - <div class="base01-background base05-border new-status-notification"> - <p class="text-center" > - {{timeline.newStatusCount}} new statuses - </p> + <div class="timeline panel panel-default"> + <div class="panel-heading timeline-heading base01-background base04"> + <div class="title"> + {{title}} </div> - </a> - <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"> - <div class="base01-background base05-border new-status-notification"> - <p class="text-center" > - Load older statuses. - </p> + <button @click.prevent="showNewStatuses" class="base06 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timeline.error"> + Show new ({{timeline.newStatusCount}}) + </button> + <button @click.prevent class="base06 error no-press loadmore-button" v-if="timeline.error"> + Error fetching updates + </button> + <button @click.prevent class="base04 base01-background no-press loadmore-button" v-if="!timeline.newStatusCount > 0 && !timeline.error"> + Up-to-date + </button> + </div> + <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"> + <div class="base01-background base05-border new-status-notification text-center">Load older statuses.</div> + </a> + <div class="base01-background base05-border new-status-notification text-center" v-else>...</div> </div> - </a> + </div> </div> </template> <script src="./timeline.js"></script> <style lang="scss"> - .new-status-notification { - border-style: solid; - border-width: 1px 0 1px 0; - font-size: 1.1em; - p { - margin: 0px; - padding: 10px; - } - } + .timeline { + .timeline-heading { + position: relative; + display: flex; + } + .title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 70%; + } + .loadmore-button { + position: absolute; + right: 0.6em; + padding: 0.1em 0.3em 0.25em 0.3em; + min-width: 6em; + } + .error { + background-color: rgba(255, 48, 16, 0.65); + } + .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; + } </style> |
