Display status count by visibility scope

This commit is contained in:
Angelina Filippova 2020-03-18 21:46:14 +03:00
parent 1d21dc5192
commit 85664ffb54
2 changed files with 19 additions and 5 deletions

View file

@ -241,12 +241,16 @@ export default {
resendConfirmation: 'Resend confirmation email' resendConfirmation: 'Resend confirmation email'
}, },
statuses: { statuses: {
statuses: 'Statuses by instance', statuses: 'Statuses',
instanceFilter: 'Instance filter', instanceFilter: 'Instance filter',
loadMore: 'Load more', loadMore: 'Load more',
noInstances: 'No other instances found', noInstances: 'No other instances found',
onlyLocalStatuses: 'Show only local statuses', onlyLocalStatuses: 'Show only local statuses',
showPrivateStatuses: 'Show private statuses' showPrivateStatuses: 'Show private statuses',
direct: 'Direct',
private: 'Private',
public: 'Public',
unlisted: 'Unlisted'
}, },
userProfile: { userProfile: {
tags: 'Tags', tags: 'Tags',

View file

@ -3,6 +3,12 @@
<h1> <h1>
{{ $t('statuses.statuses') }} {{ $t('statuses.statuses') }}
</h1> </h1>
<el-button-group>
<el-button plain>{{ $t('statuses.direct') }}: {{ statusVisibility.direct }}</el-button>
<el-button plain>{{ $t('statuses.private') }}: {{ statusVisibility.private }}</el-button>
<el-button plain>{{ $t('statuses.public') }}: {{ statusVisibility.public }}</el-button>
<el-button plain>{{ $t('statuses.unlisted') }}: {{ statusVisibility.unlisted }}</el-button>
</el-button-group>
<div class="filter-container"> <div class="filter-container">
<el-select <el-select
v-model="selectedInstance" v-model="selectedInstance"
@ -111,10 +117,14 @@ export default {
}, },
statuses() { statuses() {
return this.$store.state.status.fetchedStatuses return this.$store.state.status.fetchedStatuses
},
statusVisibility() {
return this.$store.state.status.statusVisibility
} }
}, },
mounted() { mounted() {
this.$store.dispatch('FetchPeers') this.$store.dispatch('FetchPeers')
this.$store.dispatch('FetchStatusesCount')
}, },
methods: { methods: {
handleFilterChange() { handleFilterChange() {
@ -142,6 +152,9 @@ export default {
<style rel='stylesheet/scss' lang='scss'> <style rel='stylesheet/scss' lang='scss'>
.statuses-container { .statuses-container {
padding: 0 15px; padding: 0 15px;
h1 {
margin: 10px 0 15px 0;
}
.status-container { .status-container {
margin: 0 0 10px; margin: 0 0 10px;
} }
@ -163,9 +176,6 @@ export default {
padding: 15px 0; padding: 15px 0;
text-align: center; text-align: center;
} }
h1 {
margin: 22px 0 0 0;
}
@media only screen and (max-width:480px) { @media only screen and (max-width:480px) {
.checkbox-container { .checkbox-container {