forked from ComputerTech/aprhodite
Fix #6: Add missing DOM elements, fix null references
- Add violet-trial-badge span to index.html header
- Add null guard in updateVioletBadge() for safety
- Remove dead $('tab-ai-violet') reference (Violet tab is dynamic)
- Fix duplicate trialBadge declaration and restore hidden logic
This commit is contained in:
parent
cdfbb666b9
commit
46ba1d7273
|
|
@ -87,6 +87,7 @@
|
|||
</div>
|
||||
|
||||
<div class="header-right">
|
||||
<span id="violet-trial-badge" class="violet-badge hidden"></span>
|
||||
<span id="my-username-badge" class="my-badge"></span>
|
||||
<button id="logout-btn" class="btn-logout">Exit</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@ socket.on("ignore_status", (data) => {
|
|||
});
|
||||
|
||||
function updateVioletBadge() {
|
||||
if (!trialBadge) return;
|
||||
if (state.hasAiAccess) {
|
||||
trialBadge.classList.add("hidden");
|
||||
} else {
|
||||
|
|
@ -587,7 +588,7 @@ $("sidebar-toggle").onclick = () => {
|
|||
sidebar.classList.toggle("open");
|
||||
};
|
||||
|
||||
$("tab-ai-violet").onclick = () => switchTab("ai-violet");
|
||||
// tab-ai-violet is created dynamically when user opens Violet PM
|
||||
$("tab-lobby").onclick = () => switchTab("lobby");
|
||||
|
||||
$("close-paywall").onclick = () => paywallModal.classList.add("hidden");
|
||||
|
|
|
|||
Loading…
Reference in New Issue