Remove default vue imports in favor of autoimports

This commit is contained in:
Matthias 2023-11-14 06:34:16 +01:00
parent 76715734f1
commit fa2f271404
62 changed files with 19 additions and 72 deletions

View File

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

View File

@ -57,7 +57,6 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { BotDescriptor } from '@/types';
import { computed, ref } from 'vue';
const props = defineProps({
bot: { required: true, type: Object as () => BotDescriptor },

View File

@ -40,7 +40,6 @@ import LoginModal from '@/views/LoginModal.vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { AuthStorageWithBotId, BotDescriptor } from '@/types';
import { useSortable } from '@vueuse/integrations/useSortable';
import { computed, ref } from 'vue';
defineProps({
small: { default: false, type: Boolean },

View File

@ -86,7 +86,6 @@
import { useUserService } from '@/shared/userService';
import { AuthPayload, AuthStorageWithBotId } from '@/types';
import { computed, ref } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { useRoute, useRouter } from 'vue-router';
import axios from 'axios';

View File

@ -24,7 +24,6 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { BotDescriptor } from '@/types';
import { onMounted, ref } from 'vue';
const props = defineProps({
bot: { type: Object as () => BotDescriptor, required: true },

View File

@ -7,7 +7,6 @@
<script setup lang="ts">
import { useSettingsStore } from '@/stores/settings';
import { useColorMode } from 'bootstrap-vue-next';
import { onMounted, ref } from 'vue';
const mode = useColorMode();

View File

@ -28,7 +28,6 @@ import { formatPriceCurrency } from '@/shared/formatters';
import { useSettingsStore } from '@/stores/settings';
import { BalanceValues } from '@/types';
import { useElementSize } from '@vueuse/core';
import { computed, ref } from 'vue';
use([
PieChart,

View File

@ -17,7 +17,7 @@ import {
Trade,
} from '@/types';
import { format } from 'date-fns-tz';
import { computed, onMounted, ref, watch } from 'vue';
import ECharts from 'vue-echarts';
import { calculateDiff, getDiffColumnsFromPlotConfig } from '@/shared/charts/areaPlotDataset';

View File

@ -107,7 +107,7 @@ import { ChartSliderPosition, LoadingStatus, PairHistory, Trade } from '@/types'
import vSelect from 'vue-select';
import { useBotStore } from '@/stores/ftbotwrapper';
import { computed, onMounted, ref, watch } from 'vue';
import { useColorStore } from '@/stores/colors';
const props = defineProps({

View File

@ -28,7 +28,7 @@ import {
Trade,
} from '@/types';
import { watchThrottled } from '@vueuse/core';
import { computed, onMounted, ref, watch } from 'vue';
import { formatPrice } from '@/shared/formatters';
import { useColorStore } from '@/stores/colors';

View File

@ -10,7 +10,6 @@
<script setup lang="ts">
import ECharts from 'vue-echarts';
import { useSettingsStore } from '@/stores/settings';
import { computed } from 'vue';
import { Trade } from '@/types';
import { timestampHour } from '@/shared/formatters';

View File

@ -162,7 +162,7 @@ import { IndicatorConfig, PlotConfig } from '@/types';
import { deepClone } from '@/shared/deepClone';
import { useBotStore } from '@/stores/ftbotwrapper';
import { usePlotConfigStore } from '@/stores/plotConfig';
import { computed, ref, watch } from 'vue';
import randomColor from '@/shared/randomColor';
const props = defineProps({

View File

@ -44,7 +44,7 @@
<script setup lang="ts">
import { ChartType, IndicatorConfig } from '@/types';
import randomColor from '@/shared/randomColor';
import { computed, ref, watch } from 'vue';
import { watchDebounced } from '@vueuse/core';
const props = defineProps({

View File

@ -17,7 +17,6 @@
</template>
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import vSelect from 'vue-select';
const props = defineProps({

View File

@ -25,7 +25,6 @@
</template>
<script setup lang="ts">
import { computed } from 'vue';
import ECharts from 'vue-echarts';
import { EChartsOption } from 'echarts';

View File

@ -10,7 +10,6 @@
</template>
<script setup lang="ts">
import { computed, ComputedRef, ref } from 'vue';
import ECharts from 'vue-echarts';
// import { EChartsOption } from 'echarts';

View File

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

View File

@ -46,7 +46,6 @@
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import MessageBox, { MsgBoxObject } from '@/components/general/MessageBox.vue';
import { timestampms } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';

View File

@ -52,7 +52,6 @@
import { StrategyBacktestResult } from '@/types';
import { formatObjectForTable } from '@/shared/objectToTableItems';
import { computed } from 'vue';
import { formatPercent, formatPrice } from '@/shared/formatters';
import { generateBacktestMetricRows, generateBacktestSettingRows } from '@/shared/backtestMetrics';
import { TableField, TableItem } from 'bootstrap-vue-next';

View File

@ -72,7 +72,7 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { ref } from 'vue';
import { ChartSliderPosition, Trade } from '@/types';
defineProps({

View File

@ -31,7 +31,6 @@
import { BacktestResultInMemory } from '@/types';
import { formatObjectForTable } from '@/shared/objectToTableItems';
import { computed } from 'vue';
import { generateBacktestMetricRows } from '@/shared/backtestMetrics';
import { TableField } from 'bootstrap-vue-next';

View File

@ -1,7 +1,6 @@
<script setup lang="ts">
import { PeriodicBreakdown } from '@/types';
import { TableField, TableItem } from 'bootstrap-vue-next';
import { computed, ref } from 'vue';
defineProps({
periodicBreakdown: {

View File

@ -65,7 +65,6 @@ import { formatPercent, formatPrice } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
import { BalanceValues } from '@/types';
import { TableField } from 'bootstrap-vue-next';
import { computed, ref } from 'vue';
const botStore = useBotStore();
const hideSmallBalances = ref(true);

View File

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

View File

@ -68,7 +68,6 @@ forceexit
import MessageBox, { MsgBoxObject } from '@/components/general/MessageBox.vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { ForceSellPayload } from '@/types';
import { computed, ref } from 'vue';
import ForceEntryForm from './ForceEntryForm.vue';

View File

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

View File

@ -12,7 +12,6 @@ import { formatPercent, formatPriceCurrency, timestampms } from '@/shared/format
import { ProfitInterface } from '@/types';
import { TableField, TableItem } from 'bootstrap-vue-next';
import { computed } from 'vue';
const props = defineProps({
profit: { required: true, type: Object as () => ProfitInterface },

View File

@ -35,7 +35,7 @@
<script setup lang="ts">
import { Trade } from '@/types';
import { computed, ref } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
const props = defineProps({

View File

@ -25,7 +25,7 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { computed, onMounted, watch } from 'vue';
import { ExchangeSelection } from '@/types';
const exchangeModel = defineModel({

View File

@ -121,8 +121,6 @@
import { useBotStore } from '@/stores/ftbotwrapper';
import { ForceEnterPayload, OrderSides } from '@/types';
import { computed, nextTick, ref } from 'vue';
const props = defineProps({
modelValue: { required: true, default: false, type: Boolean },
pair: { type: String, default: '' },

View File

@ -62,8 +62,6 @@
import { useBotStore } from '@/stores/ftbotwrapper';
import { ForceSellPayload, Trade } from '@/types';
import { ref, computed } from 'vue';
const props = defineProps({
trade: {
type: Object as () => Trade,

View File

@ -18,7 +18,6 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { computed, onMounted } from 'vue';
const props = defineProps({
modelValue: { type: String, required: true },

View File

@ -9,7 +9,6 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { onMounted, computed } from 'vue';
const botStore = useBotStore();

View File

@ -102,7 +102,6 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { onMounted, ref } from 'vue';
const newblacklistpair = ref('');
const blackListShow = ref(false);

View File

@ -32,7 +32,7 @@
<script setup lang="ts">
import { formatPercent, timestampms } from '@/shared/formatters';
import { Lock, Trade } from '@/types';
import { computed, ref } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
interface CombinedPairList {

View File

@ -49,7 +49,6 @@
</b-card>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue';
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
const pairlistStore = usePairlistConfigStore();
const copyFromConfig = ref('');

View File

@ -57,7 +57,6 @@
<script setup lang="ts">
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
import { Pairlist } from '@/types';
import { computed } from 'vue';
const pairlistStore = usePairlistConfigStore();

View File

@ -40,7 +40,6 @@
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
import ChartView from '@/views/ChartsView.vue';

View File

@ -91,7 +91,6 @@
</template>
<script setup lang="ts">
import { computed, onMounted, ref, watch } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { usePairlistConfigStore } from '@/stores/pairlistConfig';
import PairlistConfigItem from './PairlistConfigItem.vue';

View File

@ -36,7 +36,6 @@
import { formatPercent, formatPrice } from '@/shared/formatters';
import { useBotStore } from '@/stores/ftbotwrapper';
import { TableField } from 'bootstrap-vue-next';
import { computed, onMounted, ref } from 'vue';
import { TimeSummaryOptions } from '@/types';

View File

@ -18,7 +18,6 @@
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
const botStore = useBotStore();

View File

@ -24,7 +24,6 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { computed, onMounted } from 'vue';
const props = defineProps({
modelValue: { type: String, required: true },

View File

@ -38,7 +38,7 @@
<script setup lang="ts">
import { dateFromString, dateStringToTimeRange, timestampToDateString } from '@/shared/formatters';
import { ref, computed, onMounted, watch } from 'vue';
import Datepicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css';
import { useSettingsStore } from '@/stores/settings';

View File

@ -8,8 +8,6 @@
</template>
<script setup lang="ts">
import { computed, ref } from 'vue';
const props = defineProps({
value: { default: '', type: String },
belowTimeframe: { required: false, default: '', type: String },

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { Trade } from '@/types';
import { ref } from 'vue';
import TradeActions from './TradeActions.vue';
defineProps({

View File

@ -89,7 +89,6 @@
import { formatPercent, formatPrice } from '@/shared/formatters';
import { MultiDeletePayload, MultiForcesellPayload, Trade } from '@/types';
import { ref, computed, watch, onMounted } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { useRouter } from 'vue-router';
import { TableField, TableItem } from 'bootstrap-vue-next';

View File

@ -59,7 +59,7 @@
<script setup lang="ts">
import { Trade } from '@/types';
import { computed, ref, watch } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
const props = defineProps({

View File

@ -11,8 +11,6 @@
import { formatPercent, timestampms } from '@/shared/formatters';
import { Trade } from '@/types';
import { computed, PropType } from 'vue';
type modes = 'default' | 'total' | 'realized';
const props = defineProps({

View File

@ -9,8 +9,6 @@ import {
timestampToDateString,
} from '@/shared/formatters';
import { computed } from 'vue';
const props = defineProps({
date: { required: true, type: Number },
showTimezone: { required: false, type: Boolean, default: false },

View File

@ -61,8 +61,6 @@
</template>
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
const props = defineProps({
modelValue: {
type: String,

View File

@ -13,8 +13,6 @@
</template>
<script setup lang="ts">
import { ref } from 'vue';
export interface MsgBoxObject {
title: string;
message: string;

View File

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

View File

@ -5,8 +5,6 @@
</template>
<script setup lang="ts">
import { computed } from 'vue';
const props = defineProps({
profit: { type: Number, required: true },
});

View File

@ -134,7 +134,7 @@
<script setup lang="ts">
import LoginModal from '@/views/LoginModal.vue';
import Favico from 'favico.js';
import { ref, onBeforeUnmount, onMounted, watch } from 'vue';
import { OpenTradeVizOptions, useSettingsStore } from '@/stores/settings';
import { useLayoutStore } from '@/stores/layout';
import { useBotStore } from '@/stores/ftbotwrapper';

View File

@ -1,6 +1,6 @@
import { createPinia, PiniaVuePlugin } from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import { createApp } from 'vue';
import App from './App.vue';
// Eensure Bootstrap css still loads
import './plugins/bootstrap-vue';

View File

@ -12,7 +12,7 @@ import {
PairlistsPayload,
TradingMode,
} from '@/types';
import { computed, ref, toRaw, watch } from 'vue';
import { showAlert } from '../shared/alerts';
import { isNotUndefined } from '@/shared/formatters';

View File

@ -1,6 +1,5 @@
/* eslint-disable max-classes-per-file */
// declare module 'vue-grid-layout' {
// import Vue from 'vue';
// export class GridLayout extends Vue {}

View File

@ -155,7 +155,6 @@
import { formatPercent } from '@/shared/formatters';
import { useBtStore } from '@/stores/btStore';
import { useBotStore } from '@/stores/ftbotwrapper';
import { computed, onMounted, ref, watch } from 'vue';
enum BtRunModes {
run = 'run',

View File

@ -40,7 +40,6 @@
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
const botStore = useBotStore();

View File

@ -157,8 +157,6 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue';
import { DashboardLayout, findGridLayout, useLayoutStore } from '@/stores/layout';
import { useBotStore } from '@/stores/ftbotwrapper';
import { GridItemData } from '@/types';

View File

@ -20,7 +20,6 @@
<script setup lang="ts">
import BotLogin from '@/components/BotLogin.vue';
import { AuthStorageWithBotId } from '@/types';
import { nextTick, ref } from 'vue';
defineProps({
loginText: { required: false, default: 'Login', type: String },

View File

@ -148,7 +148,6 @@
<script setup lang="ts">
import { GridItemData } from '@/types';
import { ref, computed } from 'vue';
import { useLayoutStore, findGridLayout, TradeLayout } from '@/stores/layout';
import { useBotStore } from '@/stores/ftbotwrapper';