Add inConversation prop to status

This commit is contained in:
wakarimasen 2017-03-05 14:34:14 +01:00
parent 6bcbed38d0
commit c921662036
5 changed files with 9 additions and 8 deletions

View file

@ -8,7 +8,7 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="timeline"> <div class="timeline">
<status v-for="status in conversation" :key="status.id" v-bind:statusoid="status":expandable='false'></status> <status v-for="status in conversation" :key="status.id" v-bind:statusoid="status":expandable='false':inConversation='true'></status>
</div> </div>
</div> </div>
</div> </div>

View file

@ -13,7 +13,7 @@
<ul class="setting-list"> <ul class="setting-list">
<li> <li>
<input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal"> <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal">
<label for="hideAttachments">Hide attachments on timeline</label> <label for="hideAttachments">Hide attachments in timeline</label>
</li> </li>
<li> <li>
<input type="checkbox" id="hideAttachmentsInConv" v-model="hideAttachmentsInConvLocal"> <input type="checkbox" id="hideAttachmentsInConv" v-model="hideAttachmentsInConvLocal">

View file

@ -8,7 +8,8 @@ import UserCardContent from '../user_card_content/user_card_content.vue'
const Status = { const Status = {
props: [ props: [
'statusoid', 'statusoid',
'expandable' 'expandable',
'inConversation'
], ],
data: () => ({ data: () => ({
replying: false, replying: false,
@ -18,8 +19,8 @@ const Status = {
}), }),
computed: { computed: {
hideAttachments () { hideAttachments () {
return (this.$store.state.config.hideAttachments && this.expandable) || return (this.$store.state.config.hideAttachments && !this.inConversation) ||
(this.$store.state.config.hideAttachmentsInConv && !this.expandable) (this.$store.state.config.hideAttachmentsInConv && this.inConversation)
}, },
retweet () { return !!this.statusoid.retweeted_status }, retweet () { return !!this.statusoid.retweeted_status },
retweeter () { return this.statusoid.user.name }, retweeter () { return this.statusoid.user.name },

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="status-el base00-background" v-if="!status.deleted" v-bind:class="{ 'expanded-status': !expandable }"> <div class="status-el base00-background" v-if="!status.deleted" v-bind:class="{ 'status-conversation': inConversation }">
<template v-if="muted"> <template v-if="muted">
<div class="media status container muted"> <div class="media status container muted">
<small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small> <small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
@ -121,7 +121,7 @@
} }
} }
.expanded-status { .status-conversation {
border-left: 4px solid rgba(255, 48, 16, 0.65); border-left: 4px solid rgba(255, 48, 16, 0.65);
} }

View file

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation> <conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation>
<status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :statusoid="statusoid"></status> <status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :inConversation="false" :statusoid="statusoid"></status>
</div> </div>
</template> </template>