diff --git a/frontend/src/components/content_value/ContentToolbar.vue b/frontend/src/components/content_value/ContentToolbar.vue index 909dad3..ba46ecd 100644 --- a/frontend/src/components/content_value/ContentToolbar.vue +++ b/frontend/src/components/content_value/ContentToolbar.vue @@ -11,9 +11,10 @@ import IconButton from '@/components/common/IconButton.vue' import Copy from '@/components/icons/Copy.vue' import { ClipboardSetText } from 'wailsjs/runtime/runtime.js' import { computed, onUnmounted, reactive, watch } from 'vue' -import { isNumber, padStart } from 'lodash' +import { padStart } from 'lodash' import { NIcon, useThemeVars } from 'naive-ui' import { timeout } from '@/utils/promise.js' +import AutoRefreshForm from '@/components/common/AutoRefreshForm.vue' const props = defineProps({ server: String, @@ -70,14 +71,6 @@ const ttlString = computed(() => { }) const startAutoRefresh = async () => { - if (autoRefresh.on) { - return - } - autoRefresh.on = true - if (!isNumber(autoRefresh.interval)) { - autoRefresh.interval = 2 - } - autoRefresh.interval = Math.max(autoRefresh.interval, 1) let lastExec = Date.now() do { if (!autoRefresh.on) { @@ -154,34 +147,12 @@ const onTTL = () => { - - - - - - - - - - +