From ab4f60e1592c3d03f878f01c632faf20ca270a85 Mon Sep 17 00:00:00 2001 From: M1 Date: Tue, 17 Mar 2026 06:34:57 +0400 Subject: [PATCH] fix: rotate button inline with key field, updates in place --- apps/web/src/views/settings.ejs | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/apps/web/src/views/settings.ejs b/apps/web/src/views/settings.ejs index 6c76d0d..395f313 100644 --- a/apps/web/src/views/settings.ejs +++ b/apps/web/src/views/settings.ejs @@ -17,8 +17,9 @@
- <%= it.loginKey %> - + <%= it.loginKey %> + +
@@ -42,21 +43,7 @@ - -
-

Rotate Primary Key

-

Generates a new primary key. Your old key will stop working immediately. Sub-keys are not affected.

- - - -
@@ -138,15 +125,13 @@ } async function confirmReset() { - if (!confirm('Rotate your primary key?\n\nYour current key will stop working immediately. Make sure to copy the new one.')) return; + if (!confirm('Rotate your login key? Your current key stops working immediately.')) return; const data = await api('/account/reset-key', { method: 'POST', body: {} }); - document.getElementById('rotated-key-value').textContent = data.key; - document.getElementById('rotated-key-reveal').classList.remove('hidden'); - document.getElementById('rotated-key-reveal').scrollIntoView({ behavior: 'smooth', block: 'nearest' }); + document.getElementById('login-key-display').textContent = data.key; } - function copyRotatedKey() { - const val = document.getElementById('rotated-key-value').textContent; + function copyLoginKey() { + const val = document.getElementById('login-key-display').textContent; navigator.clipboard.writeText(val); const btn = event.target; btn.textContent = 'Copied!'; btn.classList.add('text-green-400');