rename favourite to favorite

This commit is contained in:
Brenden Bice 2019-04-02 12:13:55 -04:00
parent 6511166631
commit 8c9bcdc6c1
5 changed files with 13 additions and 13 deletions

View file

@ -121,7 +121,7 @@ const conversation = {
this.$store.state.api.backendInteractor.fetchConversation({id: this.status.id})
.then(({ancestors, descendants}) => {
const ancestorId = ancestors.length ? ancestors[0].id : this.status.id
this.fetchFavouritedByUsers(ancestorId)
this.fetchFavoritedByUsers(ancestorId)
this.fetchRebloggedByUsers(ancestorId)
this.$store.dispatch('addNewStatuses', { statuses: ancestors })
this.$store.dispatch('addNewStatuses', { statuses: descendants })
@ -152,8 +152,8 @@ const conversation = {
this.setHighlight(null)
}
},
fetchFavouritedByUsers (id) {
this.$store.dispatch('fetchFavouritedByUsers', { id })
fetchFavoritedByUsers (id) {
this.$store.dispatch('fetchFavoritedByUsers', { id })
},
fetchRebloggedByUsers (id) {
this.$store.dispatch('fetchRebloggedByUsers', { id })

View file

@ -133,7 +133,7 @@
<link-preview :card="status.card" :size="attachmentSize" :nsfw="nsfwClickthrough" />
</div>
<div class="favs-favourited-users" v-if="combinedFavsAndRepeatsAvatars.length > 0" :class="{ 'status-fadein': combinedFavsAndRepeatsAvatars.length > 0 }">
<div class="favs-favorited-users" v-if="combinedFavsAndRepeatsAvatars.length > 0" :class="{ 'status-fadein': combinedFavsAndRepeatsAvatars.length > 0 }">
<AvatarList :avatars='combinedFavsAndRepeatsAvatars'></AvatarList>
</div>
@ -616,7 +616,7 @@ a.unmute {
}
}
.favs-favourited-users {
.favs-favorited-users {
margin-top: 10px;
}

View file

@ -537,8 +537,8 @@ const statuses = {
credentials: rootState.users.currentUser.credentials
})
},
fetchFavouritedByUsers ({ rootState, commit }, { id }) {
rootState.api.backendInteractor.fetchFavouritedByUsers({id}).then((favoritedByUsers) => commit('addFavoritedByUsers', { favoritedByUsers, id }))
fetchFavoritedByUsers ({ rootState, commit }, { id }) {
rootState.api.backendInteractor.fetchFavoritedByUsers({id}).then((favoritedByUsers) => commit('addFavoritedByUsers', { favoritedByUsers, id }))
},
fetchRebloggedByUsers ({ rootState, commit }, { id }) {
rootState.api.backendInteractor.fetchRebloggedByUsers({id}).then((rebloggedByUsers) => commit('addRebloggedByUsers', { rebloggedByUsers, id }))

View file

@ -49,7 +49,7 @@ const MASTODON_MUTE_USER_URL = id => `/api/v1/accounts/${id}/mute`
const MASTODON_UNMUTE_USER_URL = id => `/api/v1/accounts/${id}/unmute`
const MASTODON_POST_STATUS_URL = '/api/v1/statuses'
const MASTODON_MEDIA_UPLOAD_URL = '/api/v1/media'
const MASTODON_STATUS_FAVOURITEDBY_URL = id => `/api/v1/statuses/${id}/favourited_by`
const MASTODON_STATUS_FAVORITEDBY_URL = id => `/api/v1/statuses/${id}/favourited_by`
const MASTODON_STATUS_REBLOGGEDBY_URL = id => `/api/v1/statuses/${id}/reblogged_by`
import { each, map } from 'lodash'
@ -724,8 +724,8 @@ const markNotificationsAsSeen = ({id, credentials}) => {
}).then((data) => data.json())
}
const fetchFavouritedByUsers = ({id}) => {
return promisedRequest(MASTODON_STATUS_FAVOURITEDBY_URL(id)).then((users) => users.map(parseUser))
const fetchFavoritedByUsers = ({id}) => {
return promisedRequest(MASTODON_STATUS_FAVORITEDBY_URL(id)).then((users) => users.map(parseUser))
}
const fetchRebloggedByUsers = ({id}) => {
@ -781,7 +781,7 @@ const apiService = {
denyUser,
suggestions,
markNotificationsAsSeen,
fetchFavouritedByUsers,
fetchFavoritedByUsers,
fetchRebloggedByUsers
}

View file

@ -112,7 +112,7 @@ const backendInteractorService = (credentials) => {
const deleteAccount = ({password}) => apiService.deleteAccount({credentials, password})
const changePassword = ({password, newPassword, newPasswordConfirmation}) => apiService.changePassword({credentials, password, newPassword, newPasswordConfirmation})
const fetchFavouritedByUsers = ({id}) => apiService.fetchFavouritedByUsers({id})
const fetchFavoritedByUsers = ({id}) => apiService.fetchFavoritedByUsers({id})
const fetchRebloggedByUsers = ({id}) => apiService.fetchRebloggedByUsers({id})
const backendInteractorServiceInstance = {
@ -156,7 +156,7 @@ const backendInteractorService = (credentials) => {
fetchFollowRequests,
approveUser,
denyUser,
fetchFavouritedByUsers,
fetchFavoritedByUsers,
fetchRebloggedByUsers
}