User Profile: Reduxify

This commit is contained in:
lain 2020-06-30 15:23:40 +02:00
parent 1bfe811fc7
commit 63088deb2e
2 changed files with 8 additions and 8 deletions

View file

@ -14,7 +14,7 @@ const FollowCard = {
}, },
computed: { computed: {
isMe () { isMe () {
return this.$store.state.users.currentUser.id === this.user.id return this.$store.state.users.currentUser.id === this.user.redux.id
}, },
loggedIn () { loggedIn () {
return this.$store.state.users.currentUser return this.$store.state.users.currentUser

View file

@ -12,23 +12,23 @@
rounded="top" rounded="top"
/> />
<div <div
v-if="user.fields_html && user.fields_html.length > 0" v-if="user.redux.fields_html && user.redux.fields_html.length > 0"
class="user-profile-fields" class="user-profile-fields"
> >
<dl <dl
v-for="(field, index) in user.fields_html" v-for="(field, index) in user.redux.fields_html"
:key="index" :key="index"
class="user-profile-field" class="user-profile-field"
> >
<!-- eslint-disable vue/no-v-html --> <!-- eslint-disable vue/no-v-html -->
<dt <dt
:title="user.fields_text[index].name" :title="user.redux.fields_text[index].name"
class="user-profile-field-name" class="user-profile-field-name"
@click.prevent="linkClicked" @click.prevent="linkClicked"
v-html="field.name" v-html="field.name"
/> />
<dd <dd
:title="user.fields_text[index].value" :title="user.redux.fields_text[index].value"
class="user-profile-field-value" class="user-profile-field-value"
@click.prevent="linkClicked" @click.prevent="linkClicked"
v-html="field.value" v-html="field.value"
@ -44,7 +44,7 @@
<Timeline <Timeline
key="statuses" key="statuses"
:label="$t('user_card.statuses')" :label="$t('user_card.statuses')"
:count="user.statuses_count" :count="user.redux.statuses_count"
:embedded="true" :embedded="true"
:title="$t('user_profile.timeline_title')" :title="$t('user_profile.timeline_title')"
:timeline="timeline" :timeline="timeline"
@ -57,7 +57,7 @@
v-if="followsTabVisible" v-if="followsTabVisible"
key="followees" key="followees"
:label="$t('user_card.followees')" :label="$t('user_card.followees')"
:disabled="!user.friends_count" :disabled="!user.redux.following_count"
> >
<FriendList :user-id="userId"> <FriendList :user-id="userId">
<template <template
@ -72,7 +72,7 @@
v-if="followersTabVisible" v-if="followersTabVisible"
key="followers" key="followers"
:label="$t('user_card.followers')" :label="$t('user_card.followers')"
:disabled="!user.followers_count" :disabled="!user.redux.followers_count"
> >
<FollowerList :user-id="userId"> <FollowerList :user-id="userId">
<template <template