Fix bot-entry toggle missbehaving

This commit is contained in:
Matthias 2024-03-10 13:54:23 +01:00
parent c9e5067aef
commit 609779b0a4

View File

@ -9,7 +9,7 @@
title="AutoRefresh"
variant="secondary"
switch
@change="changeEvent"
@update:model-value="changeEvent"
>
<div
v-if="botStore.botStores[bot.botId].isBotLoggedIn"
@ -57,6 +57,7 @@
<script setup lang="ts">
import { useBotStore } from '@/stores/ftbotwrapper';
import { BotDescriptor } from '@/types';
import type { CheckboxValue } from 'bootstrap-vue-next';
const props = defineProps({
bot: { required: true, type: Object as () => BotDescriptor },
@ -65,8 +66,8 @@ const props = defineProps({
defineEmits(['edit', 'editLogin']);
const botStore = useBotStore();
const changeEvent = (v) => {
botStore.botStores[props.bot.botId].setAutoRefresh(v);
const changeEvent = (v: CheckboxValue) => {
botStore.botStores[props.bot.botId].setAutoRefresh(v as boolean);
};
const botRemoveModalVisible = ref(false);