pleroma-fe/src/components/status/status.vue

71 lines
2.1 KiB
Vue
Raw Normal View History

2016-10-28 13:19:42 +00:00
<template>
<div class="status-el">
2016-10-28 16:08:03 +00:00
<div v-if="retweet" class="media container retweet-info">
2016-10-28 13:19:42 +00:00
<div class="media-left">
2016-11-03 15:59:27 +00:00
<i class='fa icon-retweet'></i>
2016-10-28 13:19:42 +00:00
</div>
<div class="media-body">
2016-10-28 16:08:03 +00:00
Retweeted by {{retweeter}}
2016-10-28 13:19:42 +00:00
</div>
</div>
<div class="media status container" ng-class="{compact: compact, notify: notify}">
<div class="media-left">
2016-11-07 15:42:29 +00:00
<a :href="status.user.statusnet_profile_url">
2016-10-28 13:19:42 +00:00
<img class='avatar' :src="status.user.profile_image_url_original">
</a>
</div>
<div class="media-body">
2016-10-28 16:08:03 +00:00
<h4 class="media-heading">
2016-10-28 13:19:42 +00:00
<strong>{{status.user.name}}</strong>
2016-11-07 15:42:29 +00:00
<small><a :href="status.user.statusnet_profile_url">{{status.user.screen_name}}</a></small>
<small v-if="status.in_reply_to_screen_name"> &gt; <a :href="status.in_reply_to_profileurl">{{status.in_reply_to_screen_name}}</a></small>
2016-10-28 13:19:42 +00:00
-
2016-10-28 16:08:03 +00:00
<small>{{status.created_at_parsed}}</small>
2016-10-28 13:19:42 +00:00
</h4>
2016-10-30 15:12:35 +00:00
<p>
<div v-html="status.statusnet_html"></div>
</p>
2016-10-28 13:19:42 +00:00
2016-10-28 16:08:03 +00:00
<div v-if='status.attachments' class='attachments'>
2016-10-28 23:38:41 +00:00
<attachment :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments">
2016-10-28 13:19:42 +00:00
</attachment>
</div>
2016-11-06 19:45:26 +00:00
<div v-if="loggedIn">
2016-10-28 13:19:42 +00:00
<div class='status-actions'>
2016-11-03 15:59:27 +00:00
<div>
2016-11-03 16:35:49 +00:00
<a href="#" v-on:click.prevent="toggleReplying">
2016-11-03 15:59:27 +00:00
<i class='fa icon-reply'></i>
</a>
2016-10-28 13:19:42 +00:00
</div>
<div>
2016-10-30 15:12:35 +00:00
<i class='fa icon-retweet'></i>
2016-10-28 13:19:42 +00:00
</div>
2016-10-30 15:12:35 +00:00
<favorite-button :status=status></favorite-button>
2016-10-28 13:19:42 +00:00
</div>
2016-11-03 16:35:49 +00:00
<post-status-form v-if="replying" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"></post-status-form>
2016-10-28 13:19:42 +00:00
</div>
</div>
</div>
</div>
</template>
<script src="./status.js" ></script>
2016-10-28 23:38:41 +00:00
<style lang="scss">
.status-el {
word-wrap: break-word;
2016-11-03 15:59:27 +00:00
word-break: break-word;
2016-10-28 23:38:41 +00:00
a {
word-break: break-all;
}
}
2016-11-02 17:38:30 +00:00
.status-actions {
padding-top: 5px;
}
2016-10-28 23:38:41 +00:00
</style>