Client - minor refacto w/ import order rules
This commit is contained in:
@ -15,13 +15,13 @@
|
||||
<script lang="ts">
|
||||
import { computed, ComputedRef, defineComponent, onBeforeMount } from 'vue'
|
||||
|
||||
import { ROOT_STORE } from '@/store/constants'
|
||||
import { useStore } from '@/use/useStore'
|
||||
import { IAppConfig } from '@/store/modules/root/interfaces'
|
||||
import Footer from '@/components/Footer.vue'
|
||||
import Loader from '@/components/Common/Loader.vue'
|
||||
import Footer from '@/components/Footer.vue'
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import NoConfig from '@/components/NoConfig.vue'
|
||||
import { ROOT_STORE } from '@/store/constants'
|
||||
import { IAppConfig } from '@/store/modules/root/interfaces'
|
||||
import { useStore } from '@/use/useStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'App',
|
||||
|
@ -27,8 +27,8 @@
|
||||
import { ComputedRef, PropType, defineComponent, computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { IAuthUserProfile } from '@/store/modules/user/interfaces'
|
||||
import UserStatCard from '@/components/Dashboard/UserStatCard.vue'
|
||||
import { IAuthUserProfile } from '@/store/modules/user/interfaces'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'UserStats',
|
||||
|
@ -77,12 +77,12 @@
|
||||
import { ComputedRef, computed, defineComponent, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import Dropdown from '@/components/Common/Dropdown.vue'
|
||||
import { IDropdownOption } from '@/interfaces'
|
||||
import { ROOT_STORE, USER_STORE } from '@/store/constants'
|
||||
import { IAuthUserProfile } from '@/store/modules/user/interfaces'
|
||||
import { useStore } from '@/use/useStore'
|
||||
import { capitalize, getApiUrl } from '@/utils'
|
||||
import Dropdown from '@/components/Common/Dropdown.vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'NavBar',
|
||||
|
@ -62,13 +62,13 @@
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import AlertMessage from '@/components/Common/AlertMessage.vue'
|
||||
import ErrorMessage from '@/components/Common/ErrorMessage.vue'
|
||||
import { IFormData } from '@/interfaces'
|
||||
import router from '@/router'
|
||||
import { ROOT_STORE, USER_STORE } from '@/store/constants'
|
||||
import { IAppConfig } from '@/store/modules/root/interfaces'
|
||||
import { useStore } from '@/use/useStore'
|
||||
import AlertMessage from '@/components/Common/AlertMessage.vue'
|
||||
import ErrorMessage from '@/components/Common/ErrorMessage.vue'
|
||||
import router from '@/router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'LoginOrRegisterForm',
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
|
||||
|
||||
import { USER_STORE } from '@/store/constants'
|
||||
import store from '@/store'
|
||||
import { USER_STORE } from '@/store/constants'
|
||||
import Dashboard from '@/views/DashBoard.vue'
|
||||
import LoginOrRegister from '@/views/LoginOrRegister.vue'
|
||||
import NotFound from '@/views/NotFound.vue'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { createStore } from 'vuex'
|
||||
|
||||
import { IRootState } from '@/store/modules/root/interfaces'
|
||||
import root from '@/store/modules/root'
|
||||
import { IRootState } from '@/store/modules/root/interfaces'
|
||||
|
||||
const store = createStore<IRootState>(root)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { ActionContext, ActionTree } from 'vuex'
|
||||
|
||||
import authApi from '@/api/authApi'
|
||||
import { ROOT_STORE } from '@/store/constants'
|
||||
import { IRootActions, IRootState } from '@/store/modules/root/interfaces'
|
||||
import authApi from '@/api/authApi'
|
||||
import { handleError } from '@/utils'
|
||||
|
||||
export const actions: ActionTree<IRootState, IRootState> & IRootActions = {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { ROOT_STORE } from '@/store/constants'
|
||||
import { ActionContext } from 'vuex'
|
||||
|
||||
import { ROOT_STORE } from '@/store/constants'
|
||||
|
||||
export interface IAppStatistics {
|
||||
sports: number
|
||||
uploads_dir_size: number
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { IRootState } from '@/store/modules/root/interfaces'
|
||||
import { IApplication } from '@/store/modules/root/interfaces'
|
||||
import { IRootState, IApplication } from '@/store/modules/root/interfaces'
|
||||
|
||||
export const state: IRootState = {
|
||||
root: true,
|
||||
|
@ -1,5 +1,8 @@
|
||||
import { ActionContext, ActionTree } from 'vuex'
|
||||
|
||||
import authApi from '@/api/authApi'
|
||||
import api from '@/api/defaultApi'
|
||||
import router from '@/router'
|
||||
import { ROOT_STORE, USER_STORE } from '@/store/constants'
|
||||
import { IRootState } from '@/store/modules/root/interfaces'
|
||||
import {
|
||||
@ -8,9 +11,6 @@ import {
|
||||
IUserState,
|
||||
} from '@/store/modules/user/interfaces'
|
||||
import { handleError } from '@/utils'
|
||||
import authApi from '@/api/authApi'
|
||||
import api from '@/api/defaultApi'
|
||||
import router from '@/router'
|
||||
|
||||
export const actions: ActionTree<IUserState, IRootState> & IUserActions = {
|
||||
[USER_STORE.ACTIONS.CHECK_AUTH_USER](
|
||||
|
@ -4,8 +4,8 @@ import { IRootState } from '@/store/modules/root/interfaces'
|
||||
import { actions } from '@/store/modules/user/actions'
|
||||
import { getters } from '@/store/modules/user/getters'
|
||||
import { IUserState } from '@/store/modules/user/interfaces'
|
||||
import { userState } from '@/store/modules/user/state.ts'
|
||||
import { mutations } from '@/store/modules/user/mutations'
|
||||
import { userState } from '@/store/modules/user/state.ts'
|
||||
|
||||
const user: Module<IUserState, IRootState> = {
|
||||
state: userState,
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { AxiosError } from 'axios'
|
||||
import { ActionContext } from 'vuex'
|
||||
|
||||
import { ROOT_STORE } from '@/store/constants'
|
||||
import { IUserState } from '@/store/modules/user/interfaces'
|
||||
import { IRootState } from '@/store/modules/root/interfaces'
|
||||
import { IUserState } from '@/store/modules/user/interfaces'
|
||||
|
||||
export const getApiUrl = (): string => {
|
||||
return process.env.NODE_ENV === 'production'
|
||||
|
@ -9,10 +9,10 @@
|
||||
<script lang="ts">
|
||||
import { computed, ComputedRef, defineComponent } from 'vue'
|
||||
|
||||
import UserStats from '@/components/Dashboard/UserStats.vue'
|
||||
import { USER_STORE } from '@/store/constants'
|
||||
import { IAuthUserProfile } from '@/store/modules/user/interfaces'
|
||||
import { useStore } from '@/use/useStore'
|
||||
import UserStats from '@/components/Dashboard/UserStats.vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Dashboard',
|
||||
|
Reference in New Issue
Block a user