Fix unlocked vault state - reset styles, compact layout
This commit is contained in:
parent
0966857cc6
commit
69a069701e
1 changed files with 9 additions and 11 deletions
|
|
@ -346,18 +346,15 @@ async function openUncloseaiEmbeddedModalNew() {
|
|||
|
||||
if (UncloseVault.isUnlocked()) {
|
||||
// Vault unlocked - show simple "Logged in" status with lock button
|
||||
vaultSection.style.display = 'block';
|
||||
const unlockedUI = document.createElement("div");
|
||||
unlockedUI.innerHTML = `
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span style="color: #28a745;">✓ ${getUIText("vaultLoggedIn")}</span>
|
||||
</div>
|
||||
<button class="vault-lock-btn uncloseai-btn-small" title="${getUIText("vaultLockTooltip")}">🔒 ${getUIText("vaultLock")}</button>
|
||||
</div>
|
||||
`;
|
||||
vaultSection.style.cssText = 'display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 8px 12px; margin-bottom: 12px; border-radius: 6px; background: rgba(40, 167, 69, 0.1);';
|
||||
const unlockedUI = document.createElement("span");
|
||||
unlockedUI.style.color = '#28a745';
|
||||
unlockedUI.textContent = '✓ ' + getUIText("vaultLoggedIn");
|
||||
|
||||
const lockBtn = unlockedUI.querySelector('.vault-lock-btn');
|
||||
const lockBtn = document.createElement("button");
|
||||
lockBtn.className = 'uncloseai-btn-small';
|
||||
lockBtn.title = getUIText("vaultLockTooltip");
|
||||
lockBtn.textContent = '🔒 ' + getUIText("vaultLock");
|
||||
|
||||
lockBtn.onclick = () => {
|
||||
UncloseVault.lock();
|
||||
|
|
@ -368,6 +365,7 @@ async function openUncloseaiEmbeddedModalNew() {
|
|||
};
|
||||
|
||||
vaultSection.appendChild(unlockedUI);
|
||||
vaultSection.appendChild(lockBtn);
|
||||
settingsContent.style.display = 'grid'; // Show settings when unlocked
|
||||
} else {
|
||||
// Vault locked or doesn't exist - show centered prompt using CSS grid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue