commit 1b3c0589cfcd8cfd57eba0785788942eaa762421
parent 077469173cb48b392b59ac8904764399aaff6ceb
Author: David Eisinger <[email protected]>
Date: Fri, 10 Oct 2025 11:04:04 -0400
Toggle API Token visibility
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/internal/web/app.js b/internal/web/app.js
@@ -15,7 +15,7 @@ createApp({
me: null,
viewUser: '',
auth: { username: '', password: '' },
- api: { value: '', busy: false, copied: false },
+ api: { value: '', busy: false, copied: false, show: false },
bmlet: { copied: false },
};
},
diff --git a/internal/web/settings.html b/internal/web/settings.html
@@ -16,7 +16,7 @@
<h2>API Token</h2>
<p>Use this token with the API. See the <a href="https://git.sr.ht/~dce/marky#api" target="_blank" rel="noopener">API docs</a> for details.</p>
<p>
- <code class="token-display">{{ api.value }}</code>
+ <code class="token-display" @click="api.show = !api.show" :title="api.show ? 'Click to hide' : 'Click to reveal'">{{ api.show ? api.value : '••••••••••••' }}</code>
</p>
<div style="display:flex; gap:8px;">
<button class="btn" @click.prevent="copyApiKey">{{ api.copied ? 'Copied!' : 'Copy' }}</button>