25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
feat(redis): enable auto-refresh countdown for key TTL by default
Abeautifulsnow2eed0aa66c67
diff --git a/apps/desktop/src/components/redis/RedisValueViewer.vue b/apps/desktop/src/components/redis/RedisValueViewer.vueindex 98bcc053fb..78f403a1c4 100644--- a/apps/desktop/src/components/redis/RedisValueViewer.vue+++ b/apps/desktop/src/components/redis/RedisValueViewer.vue@@ -102,7 +102,7 @@ const redisJsonWordWrap = ref(readRedisJsonWordWrap());const redisJsonHighlighter = ref<RedisJsonHighlighter>();// Auto-refresh-const autoRefreshEnabled = ref(false);+const autoRefreshEnabled = ref(true);const countdownTtl = ref(0);let autoRefreshTimer: ReturnType<typeof setInterval> | null = null;@@ -130,10 +130,7 @@ function startAutoRefresh() {load().then(() => {if (!autoRefreshEnabled.value) return;- if (data.value && !shouldStopAutoRefresh(data.value.ttl)) {- countdownTtl.value = data.value.ttl;- } else {- // Key expired or has no TTL — stop auto-refresh to avoid infinite loop+ if (!data.value || shouldStopAutoRefresh(data.value.ttl)) {stopAutoRefresh();autoRefreshEnabled.value = false;}@@ -492,10 +489,6 @@ async function load(options: { selectDefaultMember?: boolean } = {}) {try {const loadedValue = await api.redisGetValue(props.connectionId, props.db, props.keyRaw);data.value = loadedValue;- // Reset auto-refresh countdown if active- if (autoRefreshEnabled.value) {- countdownTtl.value = shouldStopAutoRefresh(loadedValue.ttl) ? 0 : loadedValue.ttl;- }emit("loaded", loadedValue);scanCursor.value = redisValueCollectionScanCursor(loadedValue);collectionItems.value = redisValueCollectionItems(loadedValue);@@ -519,6 +512,9 @@ async function load(options: { selectDefaultMember?: boolean } = {}) {}} finally {loading.value = false;+ if (autoRefreshEnabled.value && data.value && data.value.ttl > 0) {+ startAutoRefresh();+ }}}