fix: hide login key and sub-keys from sub-key sessions

This commit is contained in:
M1
2026-03-18 11:48:51 +04:00
parent c56af82053
commit eeb0318c4d
2 changed files with 32 additions and 14 deletions
+5 -1
View File
@@ -14,6 +14,7 @@
<section class="bg-gray-900 rounded-xl border border-gray-800 p-6">
<h2 class="text-sm font-semibold text-gray-300 mb-4">Account</h2>
<div class="space-y-3">
<% if (!it.isSubKey) { %>
<div>
<label class="block text-xs text-gray-500 mb-1">Login Key</label>
<div class="flex gap-2">
@@ -22,6 +23,7 @@
<button onclick="confirmReset()" class="px-3 bg-gray-800 hover:bg-gray-700 border border-red-900/50 hover:border-red-700/50 text-red-400 rounded-lg text-xs transition-colors">Rotate</button>
</div>
</div>
<% } %>
<div>
<label class="block text-xs text-gray-500 mb-1">Member since</label>
<p id="created-at" class="text-sm text-gray-400"><%= createdDate %></p>
@@ -45,7 +47,8 @@
<!-- Sub-keys -->
<!-- Sub-keys (hidden for sub-key sessions) -->
<% if (!it.isSubKey) { %>
<section class="bg-gray-900 rounded-xl border border-gray-800 p-6">
<div class="flex items-center justify-between mb-4">
<div>
@@ -87,6 +90,7 @@
<% } %>
</div>
</section>
<% } %>
</main>