first pass of migration - states and obvious replacements
This commit is contained in:
parent
02f952047d
commit
24ce2dc0a5
66 changed files with 398 additions and 568 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { shuffle } from 'lodash'
|
||||
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import apiService from '../../services/api/api.service.js'
|
||||
|
||||
function showWhoToFollow(panel, reply) {
|
||||
|
|
@ -8,7 +9,7 @@ function showWhoToFollow(panel, reply) {
|
|||
|
||||
panel.usersToFollow.forEach((toFollow, index) => {
|
||||
const user = shuffled[index]
|
||||
const img = user.avatar || this.$store.state.instance.defaultAvatar
|
||||
const img = user.avatar || useInstanceStore().defaultAvatar
|
||||
const name = user.acct
|
||||
|
||||
toFollow.img = img
|
||||
|
|
@ -46,7 +47,7 @@ const WhoToFollowPanel = {
|
|||
return this.$store.state.users.currentUser.screen_name
|
||||
},
|
||||
suggestionsEnabled() {
|
||||
return this.$store.state.instance.suggestionsEnabled
|
||||
return useInstanceStore().suggestionsEnabled
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -54,7 +55,7 @@ const WhoToFollowPanel = {
|
|||
return generateProfileLink(
|
||||
id,
|
||||
name,
|
||||
this.$store.state.instance.restrictedNicknames,
|
||||
useInstanceStore().restrictedNicknames,
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
@ -67,7 +68,7 @@ const WhoToFollowPanel = {
|
|||
},
|
||||
mounted: function () {
|
||||
this.usersToFollow = new Array(3).fill().map(() => ({
|
||||
img: this.$store.state.instance.defaultAvatar,
|
||||
img: useInstanceStore().defaultAvatar,
|
||||
name: '',
|
||||
id: 0,
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue