forked from AkkomaGang/akkoma-fe
Merge branch 'wakarimasen/pleroma-fe-develop' into 'develop'
Wakarimasen/pleroma fe develop See merge request !55
This commit is contained in:
commit
33f72ab2c2
8 changed files with 32 additions and 9 deletions
|
@ -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':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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,6 +4,7 @@ const settings = {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
hideAttachmentsLocal: this.$store.state.config.hideAttachments,
|
hideAttachmentsLocal: this.$store.state.config.hideAttachments,
|
||||||
|
hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv,
|
||||||
hideNsfwLocal: this.$store.state.config.hideNsfw
|
hideNsfwLocal: this.$store.state.config.hideNsfw
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -14,6 +15,9 @@ const settings = {
|
||||||
hideAttachmentsLocal (value) {
|
hideAttachmentsLocal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'hideAttachments', value })
|
this.$store.dispatch('setOption', { name: 'hideAttachments', value })
|
||||||
},
|
},
|
||||||
|
hideAttachmentsInConvLocal (value) {
|
||||||
|
this.$store.dispatch('setOption', { name: 'hideAttachmentsInConv', value })
|
||||||
|
},
|
||||||
hideNsfwLocal (value) {
|
hideNsfwLocal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,20 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<h2>Attachments</h2>
|
<h2>Attachments</h2>
|
||||||
|
<ul class="setting-list">
|
||||||
|
<li>
|
||||||
<input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal">
|
<input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal">
|
||||||
<label for="hideAttachments">Hide Attachments</label>
|
<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">
|
<input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal">
|
||||||
<label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label>
|
<label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,4 +36,7 @@
|
||||||
.setting-item {
|
.setting-item {
|
||||||
margin: 1em 1em 1.4em;
|
margin: 1em 1em 1.4em;
|
||||||
}
|
}
|
||||||
|
.setting-list {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -9,6 +9,7 @@ const Status = {
|
||||||
props: [
|
props: [
|
||||||
'statusoid',
|
'statusoid',
|
||||||
'expandable',
|
'expandable',
|
||||||
|
'inConversation',
|
||||||
'focused'
|
'focused'
|
||||||
],
|
],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
|
@ -18,7 +19,10 @@ const Status = {
|
||||||
userExpanded: false
|
userExpanded: false
|
||||||
}),
|
}),
|
||||||
computed: {
|
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 },
|
retweet () { return !!this.statusoid.retweeted_status },
|
||||||
retweeter () { return this.statusoid.user.name },
|
retweeter () { return this.statusoid.user.name },
|
||||||
status () {
|
status () {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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">
|
<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>
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.expanded-status {
|
.status-conversation {
|
||||||
border-left-style: solid;
|
border-left-style: solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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" :focused="false"></status>
|
<status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :inConversation="false" :focused="false" :statusoid="statusoid"></status>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ Vue.use(VueTimeago, {
|
||||||
const persistedStateOptions = {
|
const persistedStateOptions = {
|
||||||
paths: [
|
paths: [
|
||||||
'config.hideAttachments',
|
'config.hideAttachments',
|
||||||
|
'config.hideAttachmentsInConv',
|
||||||
'config.hideNsfw',
|
'config.hideNsfw',
|
||||||
'statuses.notifications',
|
'statuses.notifications',
|
||||||
'users.users'
|
'users.users'
|
||||||
|
|
|
@ -5,6 +5,7 @@ const defaultState = {
|
||||||
name: 'Pleroma FE',
|
name: 'Pleroma FE',
|
||||||
colors: {},
|
colors: {},
|
||||||
hideAttachments: false,
|
hideAttachments: false,
|
||||||
|
hideAttachmentsInConv: false,
|
||||||
hideNsfw: true
|
hideNsfw: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue