diff --git a/src/components/chat_new/chat_new.js b/src/components/chat_new/chat_new.js index 92adf379e..b683a6eb7 100644 --- a/src/components/chat_new/chat_new.js +++ b/src/components/chat_new/chat_new.js @@ -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' diff --git a/src/components/edit_status_modal/edit_status_modal.js b/src/components/edit_status_modal/edit_status_modal.js index 45231fefb..8ebbe9a2d 100644 --- a/src/components/edit_status_modal/edit_status_modal.js +++ b/src/components/edit_status_modal/edit_status_modal.js @@ -1,4 +1,5 @@ import { get } from 'lodash' +import { mapState } from 'pinia' import { defineAsyncComponent } from 'vue' import Modal from 'src/components/modal/modal.vue' diff --git a/src/components/lists_user_search/lists_user_search.js b/src/components/lists_user_search/lists_user_search.js index 3c3f54bdf..22568135a 100644 --- a/src/components/lists_user_search/lists_user_search.js +++ b/src/components/lists_user_search/lists_user_search.js @@ -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) diff --git a/src/components/mobile_post_status_button/mobile_post_status_button.js b/src/components/mobile_post_status_button/mobile_post_status_button.js index b42af3fa0..0ffab6f78 100644 --- a/src/components/mobile_post_status_button/mobile_post_status_button.js +++ b/src/components/mobile_post_status_button/mobile_post_status_button.js @@ -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' diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js index a4f6560e5..b241d913c 100644 --- a/src/components/post_status_modal/post_status_modal.js +++ b/src/components/post_status_modal/post_status_modal.js @@ -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' diff --git a/src/components/settings_modal/settings_modal_user_content.js b/src/components/settings_modal/settings_modal_user_content.js index f070e1e03..8fc8c3ebd 100644 --- a/src/components/settings_modal/settings_modal_user_content.js +++ b/src/components/settings_modal/settings_modal_user_content.js @@ -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' diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 045a9346f..521de0775 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -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) diff --git a/src/stores/users.js b/src/stores/users.js index 742e18bf0..90c87c0f3 100644 --- a/src/stores/users.js +++ b/src/stores/users.js @@ -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 diff --git a/test/unit/specs/stores/users.spec.js b/test/unit/specs/stores/users.spec.js index ed74fbbde..c44c749f3 100644 --- a/test/unit/specs/stores/users.spec.js +++ b/test/unit/specs/stores/users.spec.js @@ -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)