migration
This commit is contained in:
parent
32b9c4a14d
commit
7d4ced15c6
90 changed files with 311 additions and 1165 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import { showDesktopNotification } from '../desktop_notification_utils/desktop_notification_utils.js'
|
||||
|
||||
import { useUsersStore } from 'src/stores/users.js'
|
||||
|
||||
export const maybeShowChatNotification = (chat) => {
|
||||
if (!chat.lastMessage) return
|
||||
if (window.vuex.state.users.currentUser.id === chat.lastMessage.account_id)
|
||||
return
|
||||
if (useUsersStore().currentUser.id === chat.lastMessage.account_id) return
|
||||
|
||||
const opts = {
|
||||
tag: chat.lastMessage.id,
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export const parseUser = (data) => {
|
|||
|
||||
output.screen_name = data.acct
|
||||
output.fqn = data.fqn
|
||||
output.url = data.url
|
||||
output.statusnet_profile_url = data.url
|
||||
|
||||
if (Object.hasOwn(data, 'mute_expires_at')) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { map } from 'lodash'
|
||||
|
||||
import { useUsersStore } from 'src/stores/users.js'
|
||||
|
||||
import {
|
||||
editStatus as apiEditStatus,
|
||||
postStatus as apiPostStatus,
|
||||
|
|
@ -24,7 +26,7 @@ const postStatus = ({
|
|||
const mediaIds = map(media, 'id')
|
||||
|
||||
return apiPostStatus({
|
||||
credentials: store.state.users.currentUser.credentials,
|
||||
credentials: useUsersStore().currentUser.credentials,
|
||||
status,
|
||||
spoilerText,
|
||||
visibility,
|
||||
|
|
@ -63,7 +65,7 @@ const editStatus = ({
|
|||
|
||||
return apiEditStatus({
|
||||
id: statusId,
|
||||
credentials: store.state.users.currentUser.credentials,
|
||||
credentials: useUsersStore().currentUser.credentials,
|
||||
status,
|
||||
spoilerText,
|
||||
sensitive,
|
||||
|
|
@ -90,12 +92,12 @@ const editStatus = ({
|
|||
}
|
||||
|
||||
const uploadMedia = ({ store, formData }) => {
|
||||
const credentials = store.state.users.currentUser.credentials
|
||||
const credentials = useUsersStore().currentUser.credentials
|
||||
return apiUploadMedia({ credentials, formData }).then(({ data }) => data)
|
||||
}
|
||||
|
||||
const setMediaDescription = ({ store, id, description }) => {
|
||||
const credentials = store.state.users.currentUser.credentials
|
||||
const credentials = useUsersStore().currentUser.credentials
|
||||
return apiSetMediaDescription({ credentials, id, description }).then(
|
||||
({ data }) => data,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { promiseInterval } from '../promise_interval/promise_interval.js'
|
|||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useUsersStore } from 'src/stores/users.js'
|
||||
|
||||
import { fetchTimeline } from 'src/api/timelines.js'
|
||||
|
||||
|
|
@ -48,7 +49,7 @@ const fetchAndUpdate = ({
|
|||
const timelineData = rootState.statuses.timelines[camelCase(timeline)]
|
||||
const { hideMutedPosts, replyVisibility } =
|
||||
useMergedConfigStore().mergedConfig
|
||||
const loggedIn = !!rootState.users.currentUser
|
||||
const loggedIn = !!useUsersStore().currentUser
|
||||
|
||||
if (older) {
|
||||
// When minId = 0 we need to fetch without maxId param
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue