Client - upgrade Vue to 3.3 and move to Vite
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import { ActionContext, ActionTree } from 'vuex'
|
||||
import type { ActionContext, ActionTree } from 'vuex'
|
||||
|
||||
import authApi from '@/api/authApi'
|
||||
import router from '@/router'
|
||||
import { AUTH_USER_STORE, ROOT_STORE, USERS_STORE } from '@/store/constants'
|
||||
import { IAuthUserState } from '@/store/modules/authUser/types'
|
||||
import { IRootState } from '@/store/modules/root/types'
|
||||
import { IUsersActions, IUsersState } from '@/store/modules/users/types'
|
||||
import { TPaginationPayload } from '@/types/api'
|
||||
import { IAdminUserPayload, IUserDeletionPayload } from '@/types/user'
|
||||
import type { IAuthUserState } from '@/store/modules/authUser/types'
|
||||
import type { IRootState } from '@/store/modules/root/types'
|
||||
import type { IUsersActions, IUsersState } from '@/store/modules/users/types'
|
||||
import type { TPaginationPayload } from '@/types/api'
|
||||
import type { IAdminUserPayload, IUserDeletionPayload } from '@/types/user'
|
||||
import { handleError } from '@/utils'
|
||||
|
||||
export const deleteUserAccount = (
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { GetterTree } from 'vuex'
|
||||
import type { GetterTree } from 'vuex'
|
||||
|
||||
import { USERS_STORE } from '@/store/constants'
|
||||
import { IRootState } from '@/store/modules/root/types'
|
||||
import { IUsersGetters, IUsersState } from '@/store/modules/users/types'
|
||||
import type { IRootState } from '@/store/modules/root/types'
|
||||
import type { IUsersGetters, IUsersState } from '@/store/modules/users/types'
|
||||
|
||||
export const getters: GetterTree<IUsersState, IRootState> & IUsersGetters = {
|
||||
[USERS_STORE.GETTERS.USER]: (state: IUsersState) => {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Module } from 'vuex'
|
||||
import type { Module } from 'vuex'
|
||||
|
||||
import { IRootState } from '@/store/modules/root/types'
|
||||
import type { IRootState } from '@/store/modules/root/types'
|
||||
import { actions } from '@/store/modules/users/actions'
|
||||
import { getters } from '@/store/modules/users/getters'
|
||||
import { mutations } from '@/store/modules/users/mutations'
|
||||
import { usersState } from '@/store/modules/users/state'
|
||||
import { IUsersState } from '@/store/modules/users/types'
|
||||
import type { IUsersState } from '@/store/modules/users/types'
|
||||
|
||||
const users: Module<IUsersState, IRootState> = {
|
||||
state: usersState,
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { MutationTree } from 'vuex'
|
||||
import type { MutationTree } from 'vuex'
|
||||
|
||||
import { USERS_STORE } from '@/store/constants'
|
||||
import { IUsersState, TUsersMutations } from '@/store/modules/users/types'
|
||||
import { IPagination } from '@/types/api'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import type { IUsersState, TUsersMutations } from '@/store/modules/users/types'
|
||||
import type { IPagination } from '@/types/api'
|
||||
import type { IUserProfile } from '@/types/user'
|
||||
|
||||
export const mutations: MutationTree<IUsersState> & TUsersMutations = {
|
||||
[USERS_STORE.MUTATIONS.UPDATE_USER](state: IUsersState, user: IUserProfile) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IUsersState } from '@/store/modules/users/types'
|
||||
import { IPagination } from '@/types/api'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import type { IUsersState } from '@/store/modules/users/types'
|
||||
import type { IPagination } from '@/types/api'
|
||||
import type { IUserProfile } from '@/types/user'
|
||||
|
||||
export const usersState: IUsersState = {
|
||||
user: <IUserProfile>{},
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
ActionContext,
|
||||
CommitOptions,
|
||||
DispatchOptions,
|
||||
@ -6,9 +6,9 @@ import {
|
||||
} from 'vuex'
|
||||
|
||||
import { USERS_STORE } from '@/store/constants'
|
||||
import { IRootState } from '@/store/modules/root/types'
|
||||
import { IPagination, TPaginationPayload } from '@/types/api'
|
||||
import {
|
||||
import type { IRootState } from '@/store/modules/root/types'
|
||||
import type { IPagination, TPaginationPayload } from '@/types/api'
|
||||
import type {
|
||||
IAdminUserPayload,
|
||||
IUserDeletionPayload,
|
||||
IUserProfile,
|
||||
@ -86,7 +86,7 @@ export type TUsersStoreModule<S = IUsersState> = Omit<
|
||||
} & {
|
||||
commit<
|
||||
K extends keyof TUsersMutations,
|
||||
P extends Parameters<TUsersMutations[K]>[1]
|
||||
P extends Parameters<TUsersMutations[K]>[1],
|
||||
>(
|
||||
key: K,
|
||||
payload?: P,
|
||||
|
Reference in New Issue
Block a user