Hide API key by default

This commit is contained in:
Connor Yoh 2025-06-10 13:38:44 +01:00
parent 3abf52dff7
commit 62e0b28d0c

View File

@ -79,7 +79,7 @@
</div>
<div class="data-body">
<div style="display: flex; gap: 0.5rem;">
<input type="password" class="data-form-control" id="apiKey" th:placeholder="#{account.yourApiKey}" readonly style="flex: 1;">
<input class="data-form-control" id="apiKey" th:placeholder="#{account.yourApiKey}" readonly style="flex: 1;">
<button class="data-btn data-btn-secondary" id="copyBtn" type="button" onclick="copyToClipboard()" title="Copy to clipboard">
<span class="material-symbols-rounded">content_copy</span>
</button>
@ -321,7 +321,6 @@
}
document.addEventListener("DOMContentLoaded", async function() {
showApiKey();
try {
/*<![CDATA[*/
const urlGetApiKey = /*[[@{/api/v1/user/get-api-key}]]*/ "/api/v1/user/get-api-key";
@ -336,6 +335,9 @@
} catch (error) {
console.error('There was an error:', error);
}
finally {
showApiKey();
}
});
async function refreshApiKey() {