This commit is contained in:
Henry Jameson 2026-08-28 23:14:59 +03:00
commit 42900f6336
9 changed files with 20 additions and 12 deletions

View file

@ -4,8 +4,8 @@ import BasicUserCard from 'src/components/basic_user_card/basic_user_card.vue'
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
import { useOAuthStore } from 'src/stores/oauth.js'
import { useUsersStore } from 'src/stores/users.js'
import { useSearchStore } from 'src/stores/search.js'
import { useUsersStore } from 'src/stores/users.js'
import { chats } from 'src/api/chats.js'

View file

@ -1,4 +1,5 @@
import { get } from 'lodash'
import { mapState } from 'pinia'
import { defineAsyncComponent } from 'vue'
import Modal from 'src/components/modal/modal.vue'

View file

@ -2,9 +2,10 @@ import { debounce } from 'lodash'
import Checkbox from 'src/components/checkbox/checkbox.vue'
import { useSearchStore } from 'src/stores/search.js'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faChevronLeft, faSearch } from '@fortawesome/free-solid-svg-icons'
import { useSearchStore } from 'src/stores/search.js'
library.add(faSearch, faChevronLeft)

View file

@ -1,4 +1,5 @@
import { debounce } from 'lodash'
import { mapState } from 'pinia'
import { useMergedConfigStore } from 'src/stores/merged_config.js'
import { usePostStatusStore } from 'src/stores/post_status.js'

View file

@ -1,4 +1,5 @@
import { get } from 'lodash'
import { mapState } from 'pinia'
import Modal from 'src/components/modal/modal.vue'
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'

View file

@ -1,3 +1,5 @@
import { mapState } from 'pinia'
import VerticalTabSwitcher from './helpers/vertical_tab_switcher.jsx'
import AppearanceTab from './tabs/appearance_tab.vue'
import ClutterTab from './tabs/clutter_tab.vue'

View file

@ -49,10 +49,7 @@ const UserProfile = {
return useTimelinesStore().media
},
isUs() {
return (
this.userId &&
this.userId === useUsersStore().currentUser?.id
)
return this.userId && this.userId === useUsersStore().currentUser?.id
},
user() {
return useUsersStore().findUser(this.userId)

View file

@ -209,7 +209,9 @@ export const useUsersStore = defineStore('users', {
updateUserAdminData(id, data) {
const user = this.users.get(id)
if (!user) {
console.warn(`User id ${id} somehow not found during admin data update!`)
console.warn(
`User id ${id} somehow not found during admin data update!`,
)
return
}
user.adminData = data

View file

@ -808,11 +808,14 @@ describe('Users store', () => {
)
.mockResolvedValueOnce(
// Revoke Token
new Response(JSON.stringify('Oopsie-woopsie pleroma made a fucky-wucky'), {
status: 500,
statusText: 'Internal Server Error',
headers: { 'Content-Type': 'application/json' },
}),
new Response(
JSON.stringify('Oopsie-woopsie pleroma made a fucky-wucky'),
{
status: 500,
statusText: 'Internal Server Error',
headers: { 'Content-Type': 'application/json' },
},
),
)
vi.stubGlobal('fetch', revokeApi)