Merge branch 'feature/lockdown-timelines-private-mode' into 'develop'
interaction with BE private mode See merge request pleroma/pleroma-fe!989
This commit is contained in:
commit
0b49e798e0
8 changed files with 44 additions and 17 deletions
|
@ -1,20 +1,18 @@
|
|||
import { mapState } from 'vuex'
|
||||
|
||||
const NavPanel = {
|
||||
created () {
|
||||
if (this.currentUser && this.currentUser.locked) {
|
||||
this.$store.dispatch('startFetchingFollowRequest')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentUser () {
|
||||
return this.$store.state.users.currentUser
|
||||
},
|
||||
chat () {
|
||||
return this.$store.state.chat.channel
|
||||
},
|
||||
followRequestCount () {
|
||||
return this.$store.state.api.followRequests.length
|
||||
}
|
||||
}
|
||||
computed: mapState({
|
||||
currentUser: state => state.users.currentUser,
|
||||
chat: state => state.chat.channel,
|
||||
followRequestCount: state => state.api.followRequests.length,
|
||||
privateMode: state => state.instance.private,
|
||||
federating: state => state.instance.federating
|
||||
})
|
||||
}
|
||||
|
||||
export default NavPanel
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="currentUser || !privateMode">
|
||||
<router-link :to="{ name: 'public-timeline' }">
|
||||
<i class="button-icon icon-users" /> {{ $t("nav.public_tl") }}
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="federating && !privateMode">
|
||||
<router-link :to="{ name: 'public-external-timeline' }">
|
||||
<i class="button-icon icon-globe" /> {{ $t("nav.twkn") }}
|
||||
</router-link>
|
||||
|
|
|
@ -41,6 +41,12 @@ const SideDrawer = {
|
|||
},
|
||||
followRequestCount () {
|
||||
return this.$store.state.api.followRequests.length
|
||||
},
|
||||
privateMode () {
|
||||
return this.$store.state.instance.private
|
||||
},
|
||||
federating () {
|
||||
return this.$store.state.instance.federating
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -79,12 +79,18 @@
|
|||
</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li @click="toggleDrawer">
|
||||
<li
|
||||
v-if="currentUser || !privateMode"
|
||||
@click="toggleDrawer"
|
||||
>
|
||||
<router-link to="/main/public">
|
||||
<i class="button-icon icon-users" /> {{ $t("nav.public_tl") }}
|
||||
</router-link>
|
||||
</li>
|
||||
<li @click="toggleDrawer">
|
||||
<li
|
||||
v-if="federating && !privateMode"
|
||||
@click="toggleDrawer"
|
||||
>
|
||||
<router-link to="/main/all">
|
||||
<i class="button-icon icon-globe" /> {{ $t("nav.twkn") }}
|
||||
</router-link>
|
||||
|
@ -99,7 +105,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li @click="toggleDrawer">
|
||||
<li
|
||||
v-if="currentUser || !privateMode"
|
||||
@click="toggleDrawer"
|
||||
>
|
||||
<router-link :to="{ name: 'search' }">
|
||||
<i class="button-icon icon-search" /> {{ $t("nav.search") }}
|
||||
</router-link>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue