diff --git a/src/i18n.ts b/src/i18n.ts index 5f76fc2..38689f6 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -27,6 +27,7 @@ const dict: Record> = { resultswidth: "Results column", selection: "Selection", rates: "Rates", + market: "Market", justNow: "just now", minAgo: "{}m ago", hourAgo: "{}h ago", @@ -104,6 +105,7 @@ const dict: Record> = { resultswidth: "Колонка результатов", selection: "Выделение", rates: "Курсы", + market: "Рынок", justNow: "только что", minAgo: "{} мин назад", hourAgo: "{} ч назад", diff --git a/src/main.ts b/src/main.ts index 5928e14..6ea0ace 100644 --- a/src/main.ts +++ b/src/main.ts @@ -495,8 +495,10 @@ async function refreshMarket(force = false): Promise { if (!isTauri()) return; const info = $("#market-info") as HTMLElement; info.style.display = ""; - info.textContent = "Market…"; + info.classList.add("spin"); + info.textContent = t("market"); const prices = await fetchMarketData(MARKET_SYMBOLS); + info.classList.remove("spin"); if (Object.keys(prices).length > 0) { marketPrices = prices; marketFetchedAt = Math.floor(Date.now() / 1000); @@ -529,7 +531,7 @@ function renderMarketInfo(): void { const el = $("#market-info") as HTMLElement; if (marketFetchedAt === 0) { el.style.display = "none"; return; } el.style.display = ""; - el.textContent = `Market: ${agoText(marketFetchedAt)} ↺`; + el.textContent = `${t("market")}: ${agoText(marketFetchedAt)} ↺`; el.title = t("refreshRates"); } diff --git a/src/ui/app.css b/src/ui/app.css index 0c89346..9b9dbf9 100644 --- a/src/ui/app.css +++ b/src/ui/app.css @@ -213,14 +213,14 @@ body { flex-shrink: 0; gap: 8px; } -#rates-info { +#rates-info, #market-info { font-size: 11.5px; color: var(--fg-muted); cursor: pointer; white-space: nowrap; } -#rates-info:hover { color: var(--fg); } -#rates-info.spin { pointer-events: none; animation: rates-pulse 1s ease-in-out infinite; } +#rates-info:hover, #market-info:hover { color: var(--fg); } +#rates-info.spin, #market-info.spin { pointer-events: none; animation: rates-pulse 1s ease-in-out infinite; } @keyframes rates-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.95; }