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">
|
2021-08-29 13:40:54 +00:00
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
2021-09-26 07:15:06 +00:00
|
|
|
import { namespace } from 'vuex-class';
|
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';
|
2020-07-19 13:30:34 +00:00
|
|
|
|
2021-12-20 19:12:57 +00:00
|
|
|
const ftbot = namespace(StoreModules.ftbot);
|
2021-08-29 12:39:52 +00:00
|
|
|
|
2020-11-13 19:19:16 +00:00
|
|
|
@Component({ components: { RefreshIcon } })
|
2020-07-19 13:30:34 +00:00
|
|
|
export default class ReloadControl extends Vue {
|
2020-09-07 18:44:57 +00:00
|
|
|
refreshInterval: number | null = null;
|
2020-07-19 13:30:34 +00:00
|
|
|
|
2020-09-07 18:44:57 +00:00
|
|
|
refreshIntervalSlow: number | null = null;
|
2020-07-19 13:30:34 +00:00
|
|
|
|
2021-09-26 07:15:06 +00:00
|
|
|
@ftbot.Getter [MultiBotStoreGetters.globalAutoRefresh]!: boolean;
|
2020-07-23 17:58:25 +00:00
|
|
|
|
2020-09-08 13:45:01 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
2021-09-26 07:15:06 +00:00
|
|
|
@ftbot.Action setGlobalAutoRefresh!: (newValue: boolean) => void;
|
2020-07-23 17:58:25 +00:00
|
|
|
|
2021-09-02 05:02:46 +00:00
|
|
|
@ftbot.Action allRefreshFull;
|
2021-08-29 13:40:54 +00:00
|
|
|
|
2020-07-23 17:58:25 +00:00
|
|
|
get autoRefreshLoc() {
|
2021-09-26 07:15:06 +00:00
|
|
|
return this.globalAutoRefresh;
|
2020-07-23 17:58:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set autoRefreshLoc(newValue: boolean) {
|
2021-09-26 07:15:06 +00:00
|
|
|
this.setGlobalAutoRefresh(newValue);
|
2020-07-23 17:58:25 +00:00
|
|
|
}
|
2020-07-19 13:30:34 +00:00
|
|
|
}
|
2020-06-12 17:40:18 +00:00
|
|
|
</script>
|
|
|
|
|
2020-07-26 08:48:07 +00:00
|
|
|
<style scoped></style>
|