frequi_origin/src/components/ftbot/ReloadControl.vue

53 lines
1.3 KiB
Vue
Raw Normal View History

<template>
2021-09-26 07:15:06 +00:00
<div class="d-flex flex-align-center ml-2">
<b-form-checkbox
v-model="autoRefreshLoc"
2021-09-26 07:15:06 +00:00
class="ml-auto float-right my-auto"
title="AutoRefresh"
2021-09-26 07:15:06 +00:00
></b-form-checkbox>
<b-button
class="m-1"
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>
</div>
</template>
<script lang="ts">
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';
import StoreModules from '@/store/storeSubModules';
const ftbot = namespace(StoreModules.ftbot);
2020-11-13 19:19:16 +00:00
@Component({ components: { RefreshIcon } })
export default class ReloadControl extends Vue {
2020-09-07 18:44:57 +00:00
refreshInterval: number | null = null;
2020-09-07 18:44:57 +00:00
refreshIntervalSlow: number | null = null;
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;
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
}
}
</script>
<style scoped></style>