mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 21:15:15 +00:00
botControls to typescript
This commit is contained in:
parent
8fcbc62af7
commit
54463d7452
|
@ -17,27 +17,30 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions, mapState } from 'vuex';
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { namespace } from 'vuex-class';
|
||||
import { BotState } from '@/store/types';
|
||||
import ForceBuyForm from './ForceBuyForm.vue';
|
||||
|
||||
export default {
|
||||
name: 'BotControls',
|
||||
components: { ForceBuyForm },
|
||||
computed: {
|
||||
...mapState('ftbot', ['botState']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
forcebuyShow: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
...mapActions('ftbot', ['startBot', 'stopBot', 'stopBuy', 'reloadConfig']),
|
||||
const ftbot = namespace('ftbot');
|
||||
|
||||
@Component({ components: { ForceBuyForm } })
|
||||
export default class BotControls extends Vue {
|
||||
forcebuyShow = false;
|
||||
|
||||
@ftbot.State botState: BotState;
|
||||
|
||||
@ftbot.Action startBot;
|
||||
|
||||
@ftbot.Action stopBot;
|
||||
|
||||
@ftbot.Action stopBuy;
|
||||
|
||||
@ftbot.Action reloadConfig;
|
||||
|
||||
initiateForcebuy() {
|
||||
console.log('Forcebuy started');
|
||||
this.$bvModal.show('forcebuy-modal');
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { namespace } from 'vuex-class';
|
||||
import BotState from '@/store/types';
|
||||
import { BotState } from '@/store/types';
|
||||
|
||||
const ftbot = namespace('ftbot');
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user