aboutsummaryrefslogtreecommitdiff
path: root/src/components/status/status.vue
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2017-11-13 18:17:34 +0000
committerlambda <pleromagit@rogerbraun.net>2017-11-13 18:17:34 +0000
commit024b9ca724c90f8ab9ed573a553349e4002b7b95 (patch)
tree991c6ec3665f4ceea4c3cfc772bd5daa26a31242 /src/components/status/status.vue
parent8fdedb4c79e4f569b89496ad323d5d69bd39625a (diff)
parentab1d1b3dd0f2ea1c44f4ae7a5f08c52d7ea8520c (diff)
Merge branch 'feature/in-reply-to-preview-on-timeline' into 'develop'
In-reply-to previews for posts on timeline See merge request pleroma/pleroma-fe!157
Diffstat (limited to 'src/components/status/status.vue')
-rw-r--r--src/components/status/status.vue55
1 files changed, 53 insertions, 2 deletions
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 84397bfa..c9194ab4 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -54,7 +54,7 @@
{{status.in_reply_to_screen_name}}
</router-link>
</small>
- <template v-if="isReply && !expandable">
+ <template v-if="isReply">
<small>
<a href="#" @click.prevent="gotoOriginal(status.in_reply_to_status_id)"><i class="icon-reply" @mouseenter="replyEnter(status.in_reply_to_status_id, $event)" @mouseout="replyLeave()"></i></a>
</small>
@@ -83,6 +83,20 @@
</div>
</div>
+ <div class="status-preview base00-background base03-border" v-if="showPreview && preview">
+ <img class="avatar" :src="preview.user.profile_image_url_original">
+ <div class="text">
+ <h4>
+ {{ preview.user.name }}
+ <small><a>{{ preview.user.screen_name}}</a></small>
+ </h4>
+ <div @click.prevent="linkClicked" class="status-content" v-html="preview.statusnet_html"></div>
+ </div>
+ </div>
+ <div class="status-preview status-preview-loading base00-background base03-border" v-else-if="showPreview">
+ <i class="fa icon-spin4 animate-spin"></i>
+ </div>
+
<div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div>
<div v-if='status.attachments' class='attachments'>
@@ -120,7 +134,44 @@
status-text-container {
display: block;
-}
+ }
+
+ .status-preview {
+ position: absolute;
+ max-width: 34em;
+ padding: 0.5em;
+ display: flex;
+ border-color: inherit;
+ border-style: solid;
+ border-width: 1px;
+ border-radius: 4px;
+ box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
+ margin-top: 0.5em;
+ margin-left: 1em;
+
+ .avatar {
+ flex-shrink: 0;
+ width: 32px;
+ height: 32px;
+ border-radius: 50%;
+ }
+ .text {
+ h4 {
+ margin-bottom: 0.4em;
+ small {
+ font-weight: lighter;
+ }
+ }
+ padding: 0 0.5em 0.5em 0.5em;
+ }
+ }
+
+ .status-preview-loading {
+ display: block;
+ font-size: 2em;
+ min-width: 8em;
+ text-align: center;
+ }
.status-el {
hyphens: auto;