Client - upgrade Vue to 3.3 and move to Vite
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { LocationQuery } from 'vue-router'
|
||||
import type { LocationQuery } from 'vue-router'
|
||||
|
||||
import { IQueryOptions, TPaginationPayload } from '@/types/api'
|
||||
import type { IQueryOptions, TPaginationPayload } from '@/types/api'
|
||||
|
||||
export const sortList: string[] = ['asc', 'desc']
|
||||
export const defaultPage = 1
|
||||
@ -66,7 +66,7 @@ export const workoutsPayloadKeys = [
|
||||
'duration_from',
|
||||
'duration_to',
|
||||
'sport_id',
|
||||
'title'
|
||||
'title',
|
||||
]
|
||||
|
||||
const getRange = (stop: number, start = 1): number[] => {
|
||||
|
@ -1,20 +1,20 @@
|
||||
import { AxiosError } from 'axios'
|
||||
import { ActionContext } from 'vuex'
|
||||
import type { ActionContext } from 'vuex'
|
||||
|
||||
import { AUTH_USER_STORE, ROOT_STORE } from '@/store/constants'
|
||||
import { IAuthUserState } from '@/store/modules/authUser/types'
|
||||
import { IOAuth2State } from '@/store/modules/oauth2/types'
|
||||
import { IRootState } from '@/store/modules/root/types'
|
||||
import { ISportsState } from '@/store/modules/sports/types'
|
||||
import { IStatisticsState } from '@/store/modules/statistics/types'
|
||||
import { IUsersState } from '@/store/modules/users/types'
|
||||
import { IWorkoutsState } from '@/store/modules/workouts/types'
|
||||
import { IApiErrorMessage } from '@/types/api'
|
||||
import type { IAuthUserState } from '@/store/modules/authUser/types'
|
||||
import type { IOAuth2State } from '@/store/modules/oauth2/types'
|
||||
import type { IRootState } from '@/store/modules/root/types'
|
||||
import type { ISportsState } from '@/store/modules/sports/types'
|
||||
import type { IStatisticsState } from '@/store/modules/statistics/types'
|
||||
import type { IUsersState } from '@/store/modules/users/types'
|
||||
import type { IWorkoutsState } from '@/store/modules/workouts/types'
|
||||
import type { IApiErrorMessage } from '@/types/api'
|
||||
|
||||
export const getApiUrl = (): string => {
|
||||
return process.env.NODE_ENV === 'production'
|
||||
return import.meta.env.PROD
|
||||
? '/api/'
|
||||
: `${process.env.VUE_APP_API_URL}/api/`
|
||||
: `${import.meta.env.VITE_APP_API_URL}/api/`
|
||||
}
|
||||
|
||||
export const handleError = (
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* eslint-disable import/no-duplicates */
|
||||
import { Locale } from 'date-fns'
|
||||
import type { Locale } from 'date-fns'
|
||||
import { de, enUS, es, fr, gl, it, nb, nl, pl } from 'date-fns/locale'
|
||||
|
||||
import createI18n from '@/i18n'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import createI18n from '@/i18n'
|
||||
import { ITranslatedSport } from '@/types/sports'
|
||||
import { TUnit } from '@/types/units'
|
||||
import { ICardRecord, IRecord, IRecordsBySports } from '@/types/workouts'
|
||||
import type { ITranslatedSport } from '@/types/sports'
|
||||
import type { TUnit } from '@/types/units'
|
||||
import type { ICardRecord, IRecord, IRecordsBySports } from '@/types/workouts'
|
||||
import { formatDate, getDateFormat } from '@/utils/dates'
|
||||
import { convertDistance, units } from '@/utils/units'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ISport, ITranslatedSport, TActiveStatus } from '@/types/sports'
|
||||
import { IWorkout } from '@/types/workouts'
|
||||
import type { ISport, ITranslatedSport, TActiveStatus } from '@/types/sports'
|
||||
import type { IWorkout } from '@/types/workouts'
|
||||
|
||||
export const sportColors: Record<string, string> = {
|
||||
'Cycling (Sport)': '#4c9792',
|
||||
|
@ -15,9 +15,9 @@ import {
|
||||
} from 'date-fns'
|
||||
|
||||
import createI18n from '@/i18n'
|
||||
import { IChartDataset } from '@/types/chart'
|
||||
import { ISport } from '@/types/sports'
|
||||
import {
|
||||
import type { IChartDataset } from '@/types/chart'
|
||||
import type { ISport } from '@/types/sports'
|
||||
import type {
|
||||
IStatisticsChartData,
|
||||
IStatisticsDateParams,
|
||||
TStatisticsDatasetKeys,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { TStatisticsDatasetKeys } from '@/types/statistics'
|
||||
import type { TStatisticsDatasetKeys } from '@/types/statistics'
|
||||
import { formatDuration } from '@/utils/duration'
|
||||
import { units } from '@/utils/units'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IUnit, TFactor, TUnit } from '@/types/units'
|
||||
import type { IUnit, TFactor, TUnit } from '@/types/units'
|
||||
|
||||
export const units: Record<string, IUnit> = {
|
||||
ft: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
IWorkout,
|
||||
IWorkoutApiChartData,
|
||||
IWorkoutChartData,
|
||||
|
Reference in New Issue
Block a user