2020-05-06 04:38:57 +00:00
|
|
|
<template>
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
2020-05-15 17:28:20 +00:00
|
|
|
<button class="btn-primary col-md-5 m-1" @click="startBot()">Start</button>
|
|
|
|
<button class="btn-primary col-md-5 m-1" @click="stopBot()">Stop</button>
|
|
|
|
<button class="btn-primary col-md-5 m-1" @click="stopBuy()">StopBuy</button>
|
|
|
|
<button class="btn-primary col-md-5 m-1" @click="reloadConfig()">Reload Config</button>
|
|
|
|
<button
|
|
|
|
class="btn-primary col-md-5 m-1"
|
|
|
|
v-if="botState.forcebuy_enabled"
|
|
|
|
@click="initiate_forcebuy"
|
|
|
|
>
|
2020-05-14 16:10:57 +00:00
|
|
|
Forcebuy
|
|
|
|
</button>
|
|
|
|
<ForceBuyForm :modalShow="forcebuy_show" @close="this.$bvModal.hide('forcebuy-modal')" />
|
2020-05-06 04:38:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-05-14 16:10:57 +00:00
|
|
|
import { mapActions, mapState } from 'vuex';
|
|
|
|
import ForceBuyForm from './ForceBuyForm.vue';
|
2020-05-06 04:38:57 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BotControls',
|
2020-05-14 16:10:57 +00:00
|
|
|
components: { ForceBuyForm },
|
|
|
|
computed: {
|
|
|
|
...mapState('ftbot', ['botState']),
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
forcebuy_show: false,
|
|
|
|
};
|
|
|
|
},
|
2020-05-06 04:38:57 +00:00
|
|
|
methods: {
|
2020-05-06 17:38:52 +00:00
|
|
|
...mapActions('ftbot', ['startBot', 'stopBot', 'stopBuy', 'reloadConfig']),
|
2020-05-14 16:10:57 +00:00
|
|
|
initiate_forcebuy() {
|
|
|
|
console.log('Forcebuy started');
|
|
|
|
this.$bvModal.show('forcebuy-modal');
|
|
|
|
},
|
2020-05-06 04:38:57 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|