aboutsummaryrefslogtreecommitdiff
path: root/src/components/status/status.vue
blob: 1c5dc4583ba25711043af608bcdee755ed32ac5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<template>
  <div class="status-el">
    <div v-if="retweet" class="media container retweet-info">
      <div class="media-left">
        <i class='fa icon-retweet'></i>
      </div>
      <div class="media-body">
        Retweeted by {{retweeter}}
      </div>
    </div>
    <div class="media status container" ng-class="{compact: compact, notify: notify}">
      <div class="media-left">
        <a href="#">
          <img class='avatar' :src="status.user.profile_image_url_original">
        </a>
      </div>
      <div class="media-body">
        <h4 class="media-heading">
          <strong>{{status.user.name}}</strong>
          <small>{{status.user.screen_name}}</small>
          <small v-if="status.in_reply_to_screen_name"> &gt; {{status.in_reply_to_screen_name}}</small>
          -
          <small>{{status.created_at_parsed}}</small>
        </h4>

        <p>
          <div v-html="status.statusnet_html"></div>
        </p>

        <div v-if='status.attachments' class='attachments'>
          <attachment :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments">
          </attachment>
        </div>

        <div v-if="loggedIn">
          <div class='status-actions'>
            <div>
              <a href="#" v-on:click.prevent="toggleReplying">
                <i class='fa icon-reply'></i>
              </a>
            </div>
            <div>
              <i class='fa icon-retweet'></i>
            </div>
            <favorite-button :status=status></favorite-button>
          </div>

          <post-status-form v-if="replying" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"></post-status-form>
        </div>
      </div>
    </div>
  </div>
</template>

<script src="./status.js" ></script>

<style lang="scss">
 .status-el {
     word-wrap: break-word;
     word-break: break-word;

     a {
         word-break: break-all;
     }
 }

 .status-actions {
     padding-top: 5px;
 }
</style>