Fix some type errors

This commit is contained in:
Matthias 2022-04-26 22:00:21 +02:00
parent 8ab726bbd7
commit 3347d055f0
5 changed files with 10 additions and 6 deletions

View File

@ -36,6 +36,7 @@ import axios from 'axios';
import ThemeLightDark from 'vue-material-design-icons/Brightness6.vue';
import { FTHTMLStyleElement } from '@/types/styleElement';
import { useSettingsStore } from '@/stores/settings';
import { ThemeType } from '@/shared/themes';
export default defineComponent({
name: 'BootswatchThemeSelect',
@ -48,7 +49,7 @@ export default defineComponent({
},
setup(props) {
const activeTheme = ref('');
const themeList = ref([]);
const themeList = ref<ThemeType[]>([]);
const settingsStore = useSettingsStore();
const setTheme = (themeName) => {

View File

@ -42,7 +42,7 @@ export default defineComponent({
EditIcon,
},
props: {
bot: { required: true, type: Object },
bot: { required: true, type: Object as () => BotDescriptor },
noButtons: { default: false, type: Boolean },
},
emits: ['edit'],

View File

@ -5,7 +5,7 @@ forceexit
class="btn btn-secondary btn-sm ml-1"
:disabled="!botStore.activeBot.isTrading || isRunning"
title="Start Trading"
@click="startBot()"
@click="botStore.activeBot.startBot()"
>
<PlayIcon />
</button>
@ -59,7 +59,7 @@ forceexit
:disabled="isTrading"
class="btn btn-secondary btn-sm ml-1"
title="Start Trading mode"
@click="startTrade()"
@click="botStore.activeBot.startTrade()"
>
<PlayIcon />
</button>

View File

@ -22,7 +22,10 @@
>,
<strong
>force entry:
{{ botStore.activeBot.botState.force_entry_enable || botState.forcebuy_enabled }}</strong
{{
botStore.activeBot.botState.force_entry_enable ||
botStore.activeBot.botState.forcebuy_enabled
}}</strong
>
</p>
<p>

View File

@ -229,7 +229,7 @@ export default defineComponent({
watch(
() => botStore.activeBot.detailTradeId,
(val: number) => {
(val) => {
const index = props.trades.findIndex((v) => v.trade_id === val);
// Unselect when another tradeTable is selected!
if (index < 0) {