affiliate area

This commit is contained in:
oliver
2026-06-22 17:41:45 -03:00
parent 365c69871e
commit 70549554ad
3 changed files with 219 additions and 126 deletions
+13
View File
@@ -1104,6 +1104,19 @@ function copyAffiliateCode() {
.then(() => toast("Affiliate link copied!", "success"));
}
function switchAccountTab(tab) {
// update tab buttons
document
.querySelectorAll(".acct-settings-tab")
.forEach((btn) => btn.classList.remove("active"));
document.getElementById(`acct-tab-${tab}`).classList.add("active");
// show/hide panels
document
.querySelectorAll(".acct-tab-content")
.forEach((p) => (p.style.display = "none"));
document.getElementById(`acct-tabpanel-${tab}`).style.display = "";
}
function closeUserPanel() {
document.getElementById("account-backdrop").classList.remove("open");
const inp = document.getElementById("acct-pw-input");
+53 -7
View File
@@ -824,9 +824,36 @@
<div class="account-modal-body">
<!-- ── Left: settings ───────────────────────── -->
<div class="account-col account-col--settings">
<div class="acct-settings-tabs">
<button
type="button"
class="acct-settings-tab active"
id="acct-tab-content"
onclick="switchAccountTab('content')"
>
Content
</button>
<button
type="button"
class="acct-settings-tab"
id="acct-tab-affiliate"
onclick="switchAccountTab('affiliate')"
>
Affiliate Settings
</button>
</div>
<!-- ── Content tab ─────────────────────── -->
<div
id="acct-tabpanel-content"
class="acct-tab-content"
>
<div class="acct-section">
<div class="acct-field-label">Email</div>
<div class="acct-field-val" id="acct-email-display">
<div
class="acct-field-val"
id="acct-email-display"
>
</div>
</div>
@@ -866,11 +893,16 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="20 6 9 17 4 12" />
<polyline
points="20 6 9 17 4 12"
/>
</svg>
</button>
</div>
<p class="ssh-hint" style="margin-bottom: 0">
<p
class="ssh-hint"
style="margin-bottom: 0"
>
Min. 8 characters.
</p>
</div>
@@ -886,7 +918,9 @@
placeholder="invoices@example.com"
autocomplete="email"
oninput="
toggleInvoiceEmailSave(this.value)
toggleInvoiceEmailSave(
this.value,
)
"
onkeydown="
if (event.key === 'Enter')
@@ -911,7 +945,9 @@
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="20 6 9 17 4 12" />
<polyline
points="20 6 9 17 4 12"
/>
</svg>
</button>
</div>
@@ -936,9 +972,18 @@
</button>
</div>
</div>
<div class="acct-divider"></div>
</div>
<!-- ── Affiliate Settings tab ──────────── -->
<div
id="acct-tabpanel-affiliate"
class="acct-tab-content"
style="display: none"
>
<div class="acct-section">
<div class="acct-field-label">Affiliate Code</div>
<div class="acct-field-label">
Affiliate Code
</div>
<div class="acct-affiliate-row">
<span
class="acct-affiliate-code"
@@ -957,6 +1002,7 @@
</div>
</div>
</div>
</div>
<!-- ── Vertical divider ──────────────────────── -->
<div class="account-col-divider"></div>
<!-- ── Right: invoices ──────────────────────── -->
+34
View File
@@ -1486,6 +1486,40 @@ body::after {
padding: 18px 20px;
}
.acct-settings-tabs {
display: flex;
gap: 0;
margin-bottom: 16px;
border-bottom: 1px solid var(--border);
padding-bottom: 8px;
}
.acct-settings-tab {
flex: 1;
background: none;
border: none;
color: var(--text-muted);
font-family: inherit;
font-size: 12px;
padding: 6px 8px;
cursor: pointer;
transition: color 0.15s;
text-align: center;
}
.acct-settings-tab:hover {
color: var(--text);
}
.acct-settings-tab.active {
color: var(--accent);
}
.acct-tab-content {
display: flex;
flex-direction: column;
}
.account-col-divider {
width: 1px;
background: var(--border);