feat: add profile editing (bio, display name, stat visibility)

This commit is contained in:
2026-03-06 13:56:12 -08:00
committed by Naomi Carrigan
parent 32c13f73c4
commit 7e04daa073
11 changed files with 525 additions and 30 deletions
+212 -2
View File
@@ -1107,7 +1107,14 @@ body {
font-size: 0.85rem;
}
/* ── Profile link button in ResourceBar ────────────────────────────────── */
/* ── Profile buttons in ResourceBar ────────────────────────────────────── */
.profile-buttons {
align-items: center;
display: flex;
gap: 0.35rem;
margin-left: auto;
}
.profile-link-button {
align-items: center;
@@ -1118,7 +1125,6 @@ body {
display: flex;
font-size: 0.8rem;
gap: 0.3rem;
margin-left: auto;
padding: 0.3rem 0.8rem;
text-decoration: none;
transition: all 0.2s;
@@ -1131,6 +1137,27 @@ body {
color: var(--colour-text);
}
.profile-edit-button {
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(147, 51, 234, 0.4);
border-radius: 50%;
color: var(--colour-text-muted);
cursor: pointer;
font-family: inherit;
font-size: 0.85rem;
height: 2rem;
line-height: 1;
padding: 0;
transition: all 0.2s;
width: 2rem;
}
.profile-edit-button:hover {
background: rgba(147, 51, 234, 0.2);
border-color: var(--colour-primary);
color: var(--colour-text);
}
/* ── Public Profile Page ────────────────────────────────────────────────── */
.profile-page {
@@ -1270,6 +1297,17 @@ body {
opacity: 0.85;
}
.profile-bio {
border-bottom: 1px solid rgba(147, 51, 234, 0.2);
border-top: 1px solid rgba(147, 51, 234, 0.2);
color: var(--colour-text-muted);
font-size: 0.9rem;
font-style: italic;
line-height: 1.5;
margin-bottom: 1.25rem;
padding: 0.75rem 0;
}
.profile-loading,
.profile-error {
color: var(--colour-text-muted);
@@ -1280,6 +1318,178 @@ body {
text-align: center;
}
/* ── Edit Profile Modal ─────────────────────────────────────────────────── */
.edit-profile-modal {
max-width: 480px;
text-align: left;
width: 100%;
}
.modal-header {
align-items: center;
display: flex;
justify-content: space-between;
margin-bottom: 1rem;
}
.modal-header h2 {
margin: 0;
}
.modal-close {
background: transparent;
border: none;
color: var(--colour-text-muted);
cursor: pointer;
font-size: 1rem;
line-height: 1;
padding: 0.25rem;
transition: color 0.15s;
}
.modal-close:hover {
color: var(--colour-text);
}
.edit-profile-form {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.edit-profile-label {
color: var(--colour-text);
font-size: 0.85rem;
font-weight: 600;
margin-top: 0.5rem;
}
.edit-profile-sublabel {
color: var(--colour-text-muted);
font-size: 0.78rem;
margin: 0;
}
.edit-profile-input,
.edit-profile-textarea {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(147, 51, 234, 0.4);
border-radius: 0.4rem;
color: var(--colour-text);
font-family: inherit;
font-size: 0.9rem;
padding: 0.5rem 0.75rem;
resize: vertical;
width: 100%;
}
.edit-profile-input:focus,
.edit-profile-textarea:focus {
border-color: var(--colour-primary);
outline: none;
}
.edit-profile-hint {
color: var(--colour-text-muted);
font-size: 0.72rem;
text-align: right;
}
.edit-profile-section {
display: flex;
flex-direction: column;
gap: 0.4rem;
margin-top: 0.25rem;
}
.stat-toggles {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.stat-toggle-btn {
align-items: center;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(147, 51, 234, 0.25);
border-radius: 0.4rem;
color: var(--colour-text-muted);
cursor: pointer;
display: flex;
font-family: inherit;
font-size: 0.85rem;
justify-content: space-between;
padding: 0.5rem 0.75rem;
transition: all 0.15s;
}
.stat-toggle-on {
background: rgba(147, 51, 234, 0.12);
border-color: rgba(147, 51, 234, 0.5);
color: var(--colour-text);
}
.stat-toggle-indicator {
font-size: 0.75rem;
font-weight: 600;
}
.stat-toggle-on .stat-toggle-indicator {
color: var(--colour-success);
}
.edit-profile-error {
color: var(--colour-error);
font-size: 0.82rem;
}
.edit-profile-actions {
display: flex;
gap: 0.75rem;
margin-top: 0.5rem;
}
.edit-profile-cancel {
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 0.4rem;
color: var(--colour-text-muted);
cursor: pointer;
flex: 1;
font-family: inherit;
font-size: 0.9rem;
padding: 0.6rem;
transition: border-color 0.2s;
}
.edit-profile-cancel:hover {
border-color: rgba(255, 255, 255, 0.35);
}
.edit-profile-save {
background: var(--colour-primary);
border: none;
border-radius: 0.4rem;
color: #fff;
cursor: pointer;
flex: 2;
font-family: inherit;
font-size: 0.9rem;
font-weight: 600;
padding: 0.6rem;
transition: opacity 0.2s;
}
.edit-profile-save:hover:not(:disabled) {
opacity: 0.85;
}
.edit-profile-save:disabled {
cursor: not-allowed;
opacity: 0.5;
}
/* ── Panel Header (title + lock toggle row) ────────────────────────────── */
.panel-header {