Client - refactor types

This commit is contained in:
Sam
2021-08-21 18:36:44 +02:00
parent f60847cc5f
commit db9ea49998
19 changed files with 81 additions and 84 deletions

View File

@ -1,28 +1,7 @@
import { ActionContext } from 'vuex'
import { ROOT_STORE } from '@/store/constants'
export interface IAppStatistics {
sports: number
uploads_dir_size: number
users: number
workouts: number
}
export interface IAppConfig {
federation_enabled: boolean
gpx_limit_import: number | null
is_registration_enabled: boolean
map_attribution: string
max_single_file_size: number | null
max_users: number | null
max_zip_file_size: number | null
}
export interface IApplication {
statistics: IAppStatistics
config: IAppConfig
}
import { IAppConfig, IApplication } from '@/types/application'
export interface IRootState {
root: boolean

View File

@ -1,8 +1,9 @@
import { MutationTree } from 'vuex'
import { ROOT_STORE } from '@/store/constants'
import { IAppConfig, IRootState } from '@/store/modules/root/interfaces'
import { IRootState } from '@/store/modules/root/interfaces'
import { TRootMutations } from '@/store/modules/root/types'
import { IAppConfig } from '@/types/application'
export const mutations: MutationTree<IRootState> & TRootMutations = {
[ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES](state: IRootState) {

View File

@ -1,4 +1,5 @@
import { IRootState, IApplication } from '@/store/modules/root/interfaces'
import { IRootState } from '@/store/modules/root/interfaces'
import { IApplication } from '@/types/application'
export const state: IRootState = {
root: true,