chore: auto-import formatters

This commit is contained in:
Matthias 2024-07-05 14:27:43 +02:00
parent 0428ecbe6a
commit 6846367f7c
36 changed files with 59 additions and 53 deletions

View File

@ -8,8 +8,6 @@
</template>
<script setup lang="ts">
import { setTimezone } from './shared/formatters';
import { useSettingsStore } from './stores/settings';
import { useColorStore } from './stores/colors';
const settingsStore = useSettingsStore();

54
src/auto-imports.d.ts vendored
View File

@ -36,6 +36,8 @@ declare global {
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
const customRef: typeof import('vue')['customRef']
const dateFromString: typeof import('./utils/formatters/timeformat')['dateFromString']
const dateStringToTimeRange: typeof import('./utils/formatters/timeformat')['dateStringToTimeRange']
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
const deepClone: typeof import('./utils/deepClone')['deepClone']
@ -44,17 +46,23 @@ declare global {
const defineStore: typeof import('pinia')['defineStore']
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
const effectScope: typeof import('vue')['effectScope']
const exportForTesting: typeof import('./utils/formatters/timeformat')['exportForTesting']
const extendRef: typeof import('@vueuse/core')['extendRef']
const findGridLayout: typeof import('./stores/layout')['findGridLayout']
const formatPercent: typeof import('./utils/formatters/numberformat')['formatPercent']
const formatPrice: typeof import('./utils/formatters/numberformat')['formatPrice']
const formatPriceCurrency: typeof import('./utils/formatters/numberformat')['formatPriceCurrency']
const getActivePinia: typeof import('pinia')['getActivePinia']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const humanizeDurationFromSeconds: typeof import('./utils/formatters/timeformat')['humanizeDurationFromSeconds']
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
const initBots: typeof import('./stores/ftbotwrapper')['initBots']
const inject: typeof import('vue')['inject']
const injectLocal: typeof import('@vueuse/core')['injectLocal']
const isDefined: typeof import('@vueuse/core')['isDefined']
const isNotUndefined: typeof import('./utils/formatters/numberformat')['isNotUndefined']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
@ -67,6 +75,7 @@ declare global {
const mapWritableState: typeof import('pinia')['mapWritableState']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const numberformat: typeof import('./utils/formatters/numberformat')['default']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
@ -109,15 +118,24 @@ declare global {
const roundTimeframe: typeof import('./utils/roundTimeframe')['default']
const setActivePinia: typeof import('pinia')['setActivePinia']
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
const setTimezone: typeof import('./utils/formatters/timeformat')['setTimezone']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const splitTradePair: typeof import('./utils/formatters/pairFormat')['splitTradePair']
const storeToRefs: typeof import('pinia')['storeToRefs']
const syncRef: typeof import('@vueuse/core')['syncRef']
const syncRefs: typeof import('@vueuse/core')['syncRefs']
const templateRef: typeof import('@vueuse/core')['templateRef']
const throttledRef: typeof import('@vueuse/core')['throttledRef']
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
const timeformat: typeof import('./utils/formatters/timeformat')['default']
const timestampHour: typeof import('./utils/formatters/timeformat')['timestampHour']
const timestampToDateString: typeof import('./utils/formatters/timeformat')['timestampToDateString']
const timestampToTimeRangeString: typeof import('./utils/formatters/timeformat')['timestampToTimeRangeString']
const timestampms: typeof import('./utils/formatters/timeformat')['timestampms']
const timestampmsOrNa: typeof import('./utils/formatters/timeformat')['timestampmsOrNa']
const timestampmsWithTimezone: typeof import('./utils/formatters/timeformat')['timestampmsWithTimezone']
const toRaw: typeof import('vue')['toRaw']
const toReactive: typeof import('@vueuse/core')['toReactive']
const toRef: typeof import('vue')['toRef']
@ -362,6 +380,8 @@ declare module 'vue' {
readonly createTemplatePromise: UnwrapRef<typeof import('@vueuse/core')['createTemplatePromise']>
readonly createUnrefFn: UnwrapRef<typeof import('@vueuse/core')['createUnrefFn']>
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
readonly dateFromString: UnwrapRef<typeof import('./utils/formatters/timeformat')['dateFromString']>
readonly dateStringToTimeRange: UnwrapRef<typeof import('./utils/formatters/timeformat')['dateStringToTimeRange']>
readonly debouncedRef: UnwrapRef<typeof import('@vueuse/core')['debouncedRef']>
readonly debouncedWatch: UnwrapRef<typeof import('@vueuse/core')['debouncedWatch']>
readonly deepClone: UnwrapRef<typeof import('./utils/deepClone')['deepClone']>
@ -370,17 +390,23 @@ declare module 'vue' {
readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
readonly eagerComputed: UnwrapRef<typeof import('@vueuse/core')['eagerComputed']>
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
readonly exportForTesting: UnwrapRef<typeof import('./utils/formatters/timeformat')['exportForTesting']>
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
readonly findGridLayout: UnwrapRef<typeof import('./stores/layout')['findGridLayout']>
readonly formatPercent: UnwrapRef<typeof import('./utils/formatters/numberformat')['formatPercent']>
readonly formatPrice: UnwrapRef<typeof import('./utils/formatters/numberformat')['formatPrice']>
readonly formatPriceCurrency: UnwrapRef<typeof import('./utils/formatters/numberformat')['formatPriceCurrency']>
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
readonly h: UnwrapRef<typeof import('vue')['h']>
readonly humanizeDurationFromSeconds: UnwrapRef<typeof import('./utils/formatters/timeformat')['humanizeDurationFromSeconds']>
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
readonly initBots: UnwrapRef<typeof import('./stores/ftbotwrapper')['initBots']>
readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
readonly isNotUndefined: UnwrapRef<typeof import('./utils/formatters/numberformat')['isNotUndefined']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
@ -393,6 +419,7 @@ declare module 'vue' {
readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
readonly numberformat: UnwrapRef<typeof import('./utils/formatters/numberformat')['default']>
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
@ -435,15 +462,24 @@ declare module 'vue' {
readonly roundTimeframe: UnwrapRef<typeof import('./utils/roundTimeframe')['default']>
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
readonly setTimezone: UnwrapRef<typeof import('./utils/formatters/timeformat')['setTimezone']>
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
readonly splitTradePair: UnwrapRef<typeof import('./utils/formatters/pairFormat')['splitTradePair']>
readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
readonly syncRef: UnwrapRef<typeof import('@vueuse/core')['syncRef']>
readonly syncRefs: UnwrapRef<typeof import('@vueuse/core')['syncRefs']>
readonly templateRef: UnwrapRef<typeof import('@vueuse/core')['templateRef']>
readonly throttledRef: UnwrapRef<typeof import('@vueuse/core')['throttledRef']>
readonly throttledWatch: UnwrapRef<typeof import('@vueuse/core')['throttledWatch']>
readonly timeformat: UnwrapRef<typeof import('./utils/formatters/timeformat')['default']>
readonly timestampHour: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampHour']>
readonly timestampToDateString: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampToDateString']>
readonly timestampToTimeRangeString: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampToTimeRangeString']>
readonly timestampms: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampms']>
readonly timestampmsOrNa: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampmsOrNa']>
readonly timestampmsWithTimezone: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampmsWithTimezone']>
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
readonly toReactive: UnwrapRef<typeof import('@vueuse/core')['toReactive']>
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
@ -680,6 +716,8 @@ declare module '@vue/runtime-core' {
readonly createTemplatePromise: UnwrapRef<typeof import('@vueuse/core')['createTemplatePromise']>
readonly createUnrefFn: UnwrapRef<typeof import('@vueuse/core')['createUnrefFn']>
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
readonly dateFromString: UnwrapRef<typeof import('./utils/formatters/timeformat')['dateFromString']>
readonly dateStringToTimeRange: UnwrapRef<typeof import('./utils/formatters/timeformat')['dateStringToTimeRange']>
readonly debouncedRef: UnwrapRef<typeof import('@vueuse/core')['debouncedRef']>
readonly debouncedWatch: UnwrapRef<typeof import('@vueuse/core')['debouncedWatch']>
readonly deepClone: UnwrapRef<typeof import('./utils/deepClone')['deepClone']>
@ -688,17 +726,23 @@ declare module '@vue/runtime-core' {
readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
readonly eagerComputed: UnwrapRef<typeof import('@vueuse/core')['eagerComputed']>
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
readonly exportForTesting: UnwrapRef<typeof import('./utils/formatters/timeformat')['exportForTesting']>
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
readonly findGridLayout: UnwrapRef<typeof import('./stores/layout')['findGridLayout']>
readonly formatPercent: UnwrapRef<typeof import('./utils/formatters/numberformat')['formatPercent']>
readonly formatPrice: UnwrapRef<typeof import('./utils/formatters/numberformat')['formatPrice']>
readonly formatPriceCurrency: UnwrapRef<typeof import('./utils/formatters/numberformat')['formatPriceCurrency']>
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
readonly h: UnwrapRef<typeof import('vue')['h']>
readonly humanizeDurationFromSeconds: UnwrapRef<typeof import('./utils/formatters/timeformat')['humanizeDurationFromSeconds']>
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
readonly initBots: UnwrapRef<typeof import('./stores/ftbotwrapper')['initBots']>
readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
readonly isNotUndefined: UnwrapRef<typeof import('./utils/formatters/numberformat')['isNotUndefined']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
@ -711,6 +755,7 @@ declare module '@vue/runtime-core' {
readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
readonly numberformat: UnwrapRef<typeof import('./utils/formatters/numberformat')['default']>
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
@ -753,15 +798,24 @@ declare module '@vue/runtime-core' {
readonly roundTimeframe: UnwrapRef<typeof import('./utils/roundTimeframe')['default']>
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
readonly setTimezone: UnwrapRef<typeof import('./utils/formatters/timeformat')['setTimezone']>
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
readonly splitTradePair: UnwrapRef<typeof import('./utils/formatters/pairFormat')['splitTradePair']>
readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
readonly syncRef: UnwrapRef<typeof import('@vueuse/core')['syncRef']>
readonly syncRefs: UnwrapRef<typeof import('@vueuse/core')['syncRefs']>
readonly templateRef: UnwrapRef<typeof import('@vueuse/core')['templateRef']>
readonly throttledRef: UnwrapRef<typeof import('@vueuse/core')['throttledRef']>
readonly throttledWatch: UnwrapRef<typeof import('@vueuse/core')['throttledWatch']>
readonly timeformat: UnwrapRef<typeof import('./utils/formatters/timeformat')['default']>
readonly timestampHour: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampHour']>
readonly timestampToDateString: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampToDateString']>
readonly timestampToTimeRangeString: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampToTimeRangeString']>
readonly timestampms: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampms']>
readonly timestampmsOrNa: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampmsOrNa']>
readonly timestampmsWithTimezone: UnwrapRef<typeof import('./utils/formatters/timeformat')['timestampmsWithTimezone']>
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
readonly toReactive: UnwrapRef<typeof import('@vueuse/core')['toReactive']>
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>

View File

@ -24,7 +24,6 @@ import { use } from 'echarts/core';
import { LabelLayout } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';
import { formatPriceCurrency } from '@/shared/formatters';
import { useSettingsStore } from '@/stores/settings';
import { BalanceValues } from '@/types';
import { useElementSize } from '@vueuse/core';

View File

@ -43,7 +43,6 @@ import {
} from 'echarts/components';
import { use } from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers';
import { timestampms } from '@/shared/formatters';
use([
AxisPointerComponent,

View File

@ -35,8 +35,6 @@ import {
} from '@/types';
import type { ComputedRefWithControl } from '@vueuse/core';
import { formatPrice, timestampToDateString } from '@/shared/formatters';
use([
BarChart,
LineChart,

View File

@ -12,7 +12,6 @@ import ECharts from 'vue-echarts';
import { useSettingsStore } from '@/stores/settings';
import { Trade } from '@/types';
import { timestampHour } from '@/shared/formatters';
import { EChartsOption } from 'echarts';
import { use } from 'echarts/core';

View File

@ -27,7 +27,6 @@ import {
import { ClosedTrade } from '@/types';
import { useSettingsStore } from '@/stores/settings';
import { timestampms } from '@/shared/formatters';
import { dataZoomPartial } from '@/shared/charts/chartZoom';
import { useColorStore } from '@/stores/colors';

View File

@ -106,7 +106,6 @@
<script setup lang="ts">
import MessageBox, { MsgBoxObject } from '@/components/general/MessageBox.vue';
import { timestampms, timestampToTimeRangeString } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
import { BacktestHistoryEntry } from '@/types';
import InfoBox from '../general/InfoBox.vue';

View File

@ -14,7 +14,6 @@
</template>
<script setup lang="ts">
import { formatPercent } from '@/shared/formatters';
import { BacktestResultInMemory } from '@/types';
defineProps({

View File

@ -1,5 +1,4 @@
<script setup lang="ts">
import { formatPercent, formatPrice } from '@/shared/formatters';
import type { ExitReasonResults, PairResult } from '@/types';
import { TableItem } from 'bootstrap-vue-next';

View File

@ -61,7 +61,6 @@
</template>
<script setup lang="ts">
import { formatPercent, formatPrice } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
import { BalanceValues } from '@/types';
import { TableField } from 'bootstrap-vue-next';

View File

@ -72,8 +72,6 @@
</template>
<script setup lang="ts">
import { formatPrice, formatPercent } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
import { ProfitInterface, ComparisonTableItems } from '@/types';
import { TableField, TableItem } from 'bootstrap-vue-next';

View File

@ -1,6 +1,4 @@
<script setup lang="ts">
import { formatPrice } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
import { TableField } from 'bootstrap-vue-next';

View File

@ -8,8 +8,6 @@
</template>
<script setup lang="ts">
import { formatPercent, formatPriceCurrency, timestampms } from '@/shared/formatters';
import { ProfitInterface } from '@/types';
import { TableField, TableItem } from 'bootstrap-vue-next';

View File

@ -86,8 +86,6 @@
</template>
<script setup lang="ts">
import { formatPercent, formatPriceCurrency } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
const botStore = useBotStore();

View File

@ -24,7 +24,6 @@
</template>
<script setup lang="ts">
import { timestampms } from '@/shared/formatters';
import { Lock } from '@/types';
import { showAlert } from '@/shared/alerts';

View File

@ -37,7 +37,6 @@
</template>
<script setup lang="ts">
import { formatPercent, timestampms } from '@/shared/formatters';
import { Lock, Trade } from '@/types';
import { useBotStore } from '@/stores/ftbotwrapper';

View File

@ -33,7 +33,6 @@
</template>
<script setup lang="ts">
import { formatPercent, formatPrice } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
import { TableField } from 'bootstrap-vue-next';

View File

@ -39,8 +39,6 @@
</template>
<script setup lang="ts">
import { dateFromString, dateStringToTimeRange, timestampToDateString } from '@/shared/formatters';
import Datepicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css';
import { useSettingsStore } from '@/stores/settings';

View File

@ -141,7 +141,6 @@
</template>
<script setup lang="ts">
import { formatPercent, formatPriceCurrency, formatPrice, timestampms } from '@/shared/formatters';
import { Trade } from '@/types';
const colorStore = useColorStore();

View File

@ -93,7 +93,6 @@
</template>
<script setup lang="ts">
import { formatPercent, formatPrice } from '@/shared/formatters';
import { MultiDeletePayload, MultiForcesellPayload, Trade } from '@/types';
import { useBotStore } from '@/stores/ftbotwrapper';

View File

@ -8,7 +8,6 @@
</template>
<script setup lang="ts">
import { formatPercent, timestampms } from '@/shared/formatters';
import { Trade } from '@/types';
type modes = 'default' | 'total' | 'realized';

View File

@ -3,12 +3,6 @@
</template>
<script setup lang="ts">
import {
timestampmsOrNa,
timestampmsWithTimezone,
timestampToDateString,
} from '@/shared/formatters';
const props = defineProps({
date: { required: true, type: Number },
showTimezone: { required: false, type: Boolean, default: false },

View File

@ -20,8 +20,6 @@
</template>
<script setup lang="ts">
import { formatPercent, formatPrice, formatPriceCurrency } from '@/shared/formatters';
const props = defineProps({
profitRatio: { required: false, default: undefined, type: Number },
profitAbs: { required: false, default: undefined, type: Number },

View File

@ -1,11 +1,4 @@
import { StrategyBacktestResult, Trade } from '@/types';
import {
formatPercent,
formatPrice,
humanizeDurationFromSeconds,
isNotUndefined,
timestampms,
} from './formatters';
function getSortedTrades(trades: Trade[]): Trade[] {
const sortedTrades = trades.slice().sort((a, b) => a.profit_ratio - b.profit_ratio);

View File

@ -1,5 +1,5 @@
import { formatPercent, formatPriceCurrency, splitTradePair } from '@/shared/formatters';
import { Order, PairHistory, Trade, BTOrder } from '@/types';
import { ScatterSeriesOption } from 'echarts';
function buildTooltipCost(order: Order | BTOrder, quoteCurrency: string): string {

View File

@ -1,3 +0,0 @@
export * from './numberformat';
export * from './pairFormat';
export * from './timeformat';

View File

@ -13,7 +13,6 @@ import {
} from '@/types';
import { showAlert } from '../shared/alerts';
import { isNotUndefined } from '@/shared/formatters';
export const usePairlistConfigStore = defineStore(
'pairlistConfig',

View File

@ -152,7 +152,6 @@
</template>
<script setup lang="ts">
import { formatPercent } from '@/shared/formatters';
import { useBtStore } from '@/stores/btStore';
import { useBotStore } from '@/stores/ftbotwrapper';

View File

@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
import { splitTradePair } from '@/shared/formatters';
import { splitTradePair } from '@/utils/formatters/pairFormat';
describe('splitTradePair', () => {
it('Extracts stake and quote currencies from spot pairs', () => {

View File

@ -1,5 +1,5 @@
import { formatPercent, formatPrice, formatPriceCurrency } from '@/utils/formatters/numberformat';
import { describe, it, expect } from 'vitest';
import { formatPercent, formatPrice, formatPriceCurrency } from '@/shared/formatters';
describe('formatters.ts', () => {
it('Format percent correctly', () => {

View File

@ -10,7 +10,7 @@ import {
timestampHour,
dateFromString,
timestampmsOrNa,
} from '@/shared/formatters';
} from '@/utils/formatters/timeformat';
const { getTimeZone } = exportForTesting;

View File

@ -37,7 +37,7 @@ export default defineConfig({
AutoImport({
imports: ['vue', 'vue-router', '@vueuse/core', 'pinia'],
dts: 'src/auto-imports.d.ts',
dirs: ['src/composables', 'src/stores', 'src/utils'],
dirs: ['src/composables', 'src/stores', 'src/utils/**'],
vueTemplate: true,
}),
],