Data import, user panel, who to follow: Reduxify.

This commit is contained in:
lain 2020-06-30 14:50:33 +02:00
parent 9b437c4e56
commit 30149f55f4
4 changed files with 9 additions and 9 deletions

View File

@ -51,12 +51,12 @@ const DataImportExportTab = {
// Get addresses // Get addresses
return users.map((user) => { return users.map((user) => {
// check is it's a local user // check is it's a local user
if (user && user.is_local) { if (user && user.redux.is_local) {
// append the instance address // append the instance address
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
return user.screen_name + '@' + location.hostname return user.redux.acct + '@' + location.hostname
} }
return user.screen_name return user.redux.acct
}).join('\n') }).join('\n')
} }
} }

View File

@ -5,7 +5,7 @@ import { mapState } from 'vuex'
const UserPanel = { const UserPanel = {
computed: { computed: {
signedIn () { return this.user }, signedIn () { return this.redux.user },
...mapState({ user: state => state.users.currentUser }) ...mapState({ user: state => state.users.currentUser })
}, },
components: { components: {

View File

@ -6,7 +6,7 @@
<div class="panel-body"> <div class="panel-body">
<FollowCard <FollowCard
v-for="user in users" v-for="user in users"
:key="user.id" :key="user.redux.id"
:user="user" :user="user"
class="list-item" class="list-item"
/> />

View File

@ -9,12 +9,12 @@
<div class="who-to-follow"> <div class="who-to-follow">
<p <p
v-for="user in usersToFollow" v-for="user in usersToFollow"
:key="user.id" :key="user.redux.id"
class="who-to-follow-items" class="who-to-follow-items"
> >
<img :src="user.img"> <img :src="user.redux.avatar">
<router-link :to="userProfileLink(user.id, user.name)"> <router-link :to="userProfileLink(user.redux.id, user.redux.display_name)">
{{ user.name }} {{ user.redux.display_name }}
</router-link><br> </router-link><br>
</p> </p>
<p class="who-to-follow-more"> <p class="who-to-follow-more">