2020-06-12 17:40:18 +00:00
|
|
|
<template>
|
2021-09-26 07:15:06 +00:00
|
|
|
<div class="d-flex flex-align-center ml-2">
|
|
|
|
<b-form-checkbox
|
2021-08-29 12:39:52 +00:00
|
|
|
v-model="autoRefreshLoc"
|
2021-09-26 07:15:06 +00:00
|
|
|
class="ml-auto float-right my-auto"
|
2021-08-29 12:39:52 +00:00
|
|
|
title="AutoRefresh"
|
2021-09-26 07:15:06 +00:00
|
|
|
></b-form-checkbox>
|
|
|
|
<b-button
|
|
|
|
class="m-1"
|
2021-08-29 12:39:52 +00:00
|
|
|
variant="secondary"
|
2021-09-26 07:15:06 +00:00
|
|
|
size="sm"
|
|
|
|
title="Auto Refresh All bots"
|
2021-09-26 07:21:53 +00:00
|
|
|
@click="allRefreshFull"
|
2021-09-26 07:15:06 +00:00
|
|
|
>
|
|
|
|
<RefreshIcon :size="16" />
|
|
|
|
</b-button>
|
2020-06-12 17:40:18 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2020-07-19 13:30:34 +00:00
|
|
|
<script lang="ts">
|
2020-11-13 19:19:16 +00:00
|
|
|
import RefreshIcon from 'vue-material-design-icons/Refresh.vue';
|
2021-09-26 07:15:06 +00:00
|
|
|
import { MultiBotStoreGetters } from '@/store/modules/botStoreWrapper';
|
2021-12-20 19:12:57 +00:00
|
|
|
import StoreModules from '@/store/storeSubModules';
|
2022-04-15 18:09:28 +00:00
|
|
|
import { defineComponent, computed } from '@vue/composition-api';
|
|
|
|
import { useNamespacedActions, useNamespacedGetters } from 'vuex-composition-helpers';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
name: 'ReloadControl',
|
|
|
|
components: { RefreshIcon },
|
|
|
|
setup() {
|
|
|
|
const { globalAutoRefresh } = useNamespacedGetters(StoreModules.ftbot, [
|
|
|
|
MultiBotStoreGetters.globalAutoRefresh,
|
|
|
|
]);
|
|
|
|
const { setGlobalAutoRefresh, allRefreshFull } = useNamespacedActions(StoreModules.ftbot, [
|
|
|
|
'setGlobalAutoRefresh',
|
|
|
|
'allRefreshFull',
|
|
|
|
]);
|
|
|
|
const autoRefreshLoc = computed({
|
|
|
|
get() {
|
|
|
|
return globalAutoRefresh.value;
|
|
|
|
},
|
|
|
|
set(newValue: boolean) {
|
|
|
|
setGlobalAutoRefresh(newValue);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
return {
|
|
|
|
globalAutoRefresh,
|
|
|
|
setGlobalAutoRefresh,
|
|
|
|
allRefreshFull,
|
|
|
|
autoRefreshLoc,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
2020-06-12 17:40:18 +00:00
|
|
|
</script>
|
|
|
|
|
2020-07-26 08:48:07 +00:00
|
|
|
<style scoped></style>
|