logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 33f72ab2c215ebd7709edaf7a63062aabe8363cc
parent: bfbbb527677ba4648b1be376bb02b0bd3c3e29ba
Author: Shpuld Shpuldson <shpuld@gmail.com>
Date:   Fri, 10 Mar 2017 07:12:04 -0500

Merge branch 'wakarimasen/pleroma-fe-develop' into 'develop'

Wakarimasen/pleroma fe develop

See merge request !55

Diffstat:

Msrc/components/conversation/conversation.vue2+-
Msrc/components/settings/settings.js4++++
Msrc/components/settings/settings.vue21+++++++++++++++++----
Msrc/components/status/status.js6+++++-
Msrc/components/status/status.vue4++--
Msrc/components/status_or_conversation/status_or_conversation.vue2+-
Msrc/main.js1+
Msrc/modules/config.js1+
8 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue @@ -8,7 +8,7 @@ </div> <div class="panel-body"> <div class="timeline"> - <status v-for="status in conversation" :key="status.id" v-bind:statusoid="status":expandable='false':focused="focused(status.id)"></status> + <status v-for="status in conversation" :key="status.id" :statusoid="status" :expandable='false' :focused="focused(status.id)" :inConversation='true'></status> </div> </div> </div> diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js @@ -4,6 +4,7 @@ const settings = { data () { return { hideAttachmentsLocal: this.$store.state.config.hideAttachments, + hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv, hideNsfwLocal: this.$store.state.config.hideNsfw } }, @@ -14,6 +15,9 @@ const settings = { hideAttachmentsLocal (value) { this.$store.dispatch('setOption', { name: 'hideAttachments', value }) }, + hideAttachmentsInConvLocal (value) { + this.$store.dispatch('setOption', { name: 'hideAttachmentsInConv', value }) + }, hideNsfwLocal (value) { this.$store.dispatch('setOption', { name: 'hideNsfw', value }) } diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue @@ -10,10 +10,20 @@ </div> <div class="setting-item"> <h2>Attachments</h2> - <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal"> - <label for="hideAttachments">Hide Attachments</label> - <input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal"> - <label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label> + <ul class="setting-list"> + <li> + <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal"> + <label for="hideAttachments">Hide attachments in timeline</label> + </li> + <li> + <input type="checkbox" id="hideAttachmentsInConv" v-model="hideAttachmentsInConvLocal"> + <label for="hideAttachmentsInConv">Hide attachments in conversations</label> + </li> + <li> + <input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal"> + <label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label> + </li> + </ul> </div> </div> </div> @@ -26,4 +36,7 @@ .setting-item { margin: 1em 1em 1.4em; } + .setting-list { + list-style-type: none; + } </style> diff --git a/src/components/status/status.js b/src/components/status/status.js @@ -9,6 +9,7 @@ const Status = { props: [ 'statusoid', 'expandable', + 'inConversation', 'focused' ], data: () => ({ @@ -18,7 +19,10 @@ const Status = { userExpanded: false }), computed: { - hideAttachments () { return this.$store.state.config.hideAttachments }, + hideAttachments () { + return (this.$store.state.config.hideAttachments && !this.inConversation) || + (this.$store.state.config.hideAttachmentsInConv && this.inConversation) + }, retweet () { return !!this.statusoid.retweeted_status }, retweeter () { return this.statusoid.user.name }, status () { diff --git a/src/components/status/status.vue b/src/components/status/status.vue @@ -1,5 +1,5 @@ <template> - <div class="status-el base00-background base03-border" v-if="!status.deleted" v-bind:class="[{ 'expanded-status': !expandable }, { 'base01-background': focused }]" > + <div class="status-el base00-background base03-border" v-if="!status.deleted" v-bind:class="[{ 'base01-background': focused }, { 'status-conversation': inConversation }]" > <template v-if="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> @@ -131,7 +131,7 @@ } } - .expanded-status { + .status-conversation { border-left-style: solid; } diff --git a/src/components/status_or_conversation/status_or_conversation.vue b/src/components/status_or_conversation/status_or_conversation.vue @@ -1,7 +1,7 @@ <template> <div> <conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation> - <status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :statusoid="statusoid" :focused="false"></status> + <status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :inConversation="false" :focused="false" :statusoid="statusoid"></status> </div> </template> diff --git a/src/main.js b/src/main.js @@ -31,6 +31,7 @@ Vue.use(VueTimeago, { const persistedStateOptions = { paths: [ 'config.hideAttachments', + 'config.hideAttachmentsInConv', 'config.hideNsfw', 'statuses.notifications', 'users.users' diff --git a/src/modules/config.js b/src/modules/config.js @@ -5,6 +5,7 @@ const defaultState = { name: 'Pleroma FE', colors: {}, hideAttachments: false, + hideAttachmentsInConv: false, hideNsfw: true }