From 1f8cfcee8622b4fc3504ae281f0d51aba4eab80e Mon Sep 17 00:00:00 2001 From: whilb Date: Mon, 1 Sep 2025 20:30:45 -0700 Subject: [PATCH] currency api notice --- public/calculators/currency.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/public/calculators/currency.js b/public/calculators/currency.js index 6edcfd0..7f02f4a 100644 --- a/public/calculators/currency.js +++ b/public/calculators/currency.js @@ -107,10 +107,28 @@ export default { cursor: pointer; transition: background 0.2s; `; - fetchBtn.addEventListener('mouseenter', () => fetchBtn.style.background = 'var(--accent-hover)'); - fetchBtn.addEventListener('mouseleave', () => fetchBtn.style.background = 'var(--accent)'); + fetchBtn.addEventListener('mouseenter', () => fetchBtn.style.opacity = '0.9'); + fetchBtn.addEventListener('mouseleave', () => fetchBtn.style.opacity = '1'); ui.append(fetchBtn); + // External API notice + const noticeDiv = document.createElement('div'); + noticeDiv.style.cssText = ` + margin: 10px 0; + padding: 12px; + background: var(--k-bg); + border: 1px solid var(--border); + border-radius: 6px; + font-size: 13px; + color: var(--muted); + line-height: 1.4; + `; + noticeDiv.innerHTML = ` + External API Notice: Updating exchange rates requires an external call to exchangerate-api.com. + Your browser will make a request to fetch the latest rates. Your IP address will be visible to the API provider. + `; + ui.append(noticeDiv); + const out = document.createElement('div'); out.className = 'result'; out.style.cssText = `