Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/app/sections/ProfileSection.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@
border-radius: 24px;
border: 1px solid rgba(255, 190, 164, 0.22);
background: rgba(241, 96, 47, 0.12);
min-height: 56px;
transition: opacity 0.2s ease;
}

.confirmHidden {
opacity: 0;
pointer-events: none;
}

.confirmVisible {
opacity: 1;
}

.confirmText {
Expand Down
30 changes: 16 additions & 14 deletions src/app/sections/ProfileSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,22 @@ export function ProfileSection() {
value={form.role}
onChange={handleFieldChange('role')}
/>
{isDirty ? (
<div className={`${styles.confirmBar} ${styles.fieldWide}`}>
<span className={styles.confirmText}>Unsaved changes</span>
<PillButton
type="button"
accent
className={styles.confirmButton}
onClick={handleSave}
disabled={isSaving}
>
{isSaving ? 'saving...' : 'confirm'}
</PillButton>
</div>
) : null}
<div
className={`${styles.confirmBar} ${styles.fieldWide} ${
isDirty ? styles.confirmVisible : styles.confirmHidden
}`}
>
<span className={styles.confirmText}>Unsaved changes</span>
<PillButton
type="button"
accent
className={styles.confirmButton}
onClick={handleSave}
disabled={isSaving}
>
{isSaving ? 'saving...' : 'confirm'}
</PillButton>
</div>
{saveError ? (
<p className={`${styles.errorText} ${styles.fieldWide}`}>{saveError}</p>
) : null}
Expand Down
Loading