Skip to content

Commit d45daca

Browse files
Cabinet UI Polish: Implemented custom StatusLightbulbIcon and optimized vertical spacing for better list density
1 parent 69c3631 commit d45daca

3 files changed

Lines changed: 40 additions & 12 deletions

File tree

web/src/pages/Cabinet/Cabinet.module.css

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@
3131
.section {
3232
display: flex;
3333
flex-direction: column;
34-
gap: 6px;
34+
gap: 0;
35+
}
36+
37+
.cardSection {
38+
display: flex;
39+
flex-direction: column;
40+
gap: 8px;
3541
}
3642

3743
.sectionTitle {
@@ -140,6 +146,11 @@
140146
color: #EE7221;
141147
}
142148

149+
.statusIconActive {
150+
background: var(--cb-brand-orange);
151+
border: 1px solid var(--cb-brand-orange);
152+
}
153+
143154
.profileName {
144155
font-size: 17px;
145156
font-weight: 700;
@@ -264,10 +275,10 @@
264275
display: flex;
265276
justify-content: space-between;
266277
align-items: center;
267-
padding: 12px 20px 12px 16px; /* Unified 20px side padding for optical balance */
278+
padding: 10px 20px 10px 16px; /* Tightened 10px vertical padding */
268279
cursor: pointer;
269280
position: relative;
270-
min-height: 52px;
281+
min-height: 48px; /* Optimized height for menus */
271282
box-sizing: border-box;
272283
width: 100%;
273284
transition: all 0.2s ease;
@@ -380,11 +391,13 @@
380391
-webkit-tap-highlight-color: transparent;
381392
}
382393

383-
.statusIconOnly {
384-
background: transparent !important;
385-
border: none !important;
386-
transform: translateY(2px);
387-
justify-content: flex-end; /* Align to the right edge of the grid cell */
394+
.statusIconActive {
395+
background: var(--cb-brand-orange) !important;
396+
border-color: var(--cb-brand-orange) !important;
397+
}
398+
399+
.statusIconAnonBtn {
400+
/* Standard syncIconBtn style is enough, but we can refine if needed */
388401
}
389402

390403
.syncIconBtn:active {

web/src/pages/Cabinet/components/NotificationSlots.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const NotificationSlots: React.FC<NotificationSlotsProps> = ({ slots, isL
6363
};
6464

6565
return (
66-
<div className={styles.section}>
66+
<div className={styles.cardSection}>
6767
<div className={styles.sectionTitle}>Налаштування сповіщень</div>
6868

6969
{displaySlots.map((slot, index) => (

web/src/pages/Cabinet/components/ProfileCard.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { clsx } from 'clsx';
33
import { BrandIcon } from '../../../assets/brand/BrandIcon';
4-
import { PlusStatusIcon, MinusStatusIcon } from '../../../assets/icons/StatusIcons';
54
import styles from '../Cabinet.module.css';
65

76
// ── SVG Icons ──────────────────────────────────────────────────────────────────
@@ -29,6 +28,18 @@ const TelegramIcon: React.FC = () => (
2928
</svg>
3029
);
3130

31+
const StatusLightbulbIcon: React.FC<{ active: boolean }> = ({ active }) => {
32+
// Registered: Orange bulb (#ee7221)
33+
// Guest: Gray bulb (#d4d4d8)
34+
const bulbColor = active ? "#ee7221" : "#d4d4d8";
35+
return (
36+
<svg width="16" height="22" viewBox="0 0 90.61 125" fill="none" xmlns="http://www.w3.org/2000/svg">
37+
<path d="M22.58,106.06c0,10.46,8.47,18.94,18.94,18.94h7.57c10.46,0,18.94-8.47,18.94-18.94v-3.79H22.58v3.79Z" fill={bulbColor} />
38+
<path d="M45.31.03C6.31-1.32-15.03,49.85,12.34,76.74c3.9,4.12,7.38,8.9,9.09,14.18h47.76c1.73-5.28,5.18-10.06,9.09-14.18C105.65,49.85,84.3-1.33,45.31.03Z" fill={bulbColor} />
39+
</svg>
40+
);
41+
};
42+
3243
// ── Component ──────────────────────────────────────────────────────────────────
3344

3445
interface ProfileCardProps {
@@ -91,8 +102,12 @@ export const ProfileCard: React.FC<ProfileCardProps> = ({ user, onClick, onSignO
91102

92103
{/* Row 2: Status Icon in the far bottom-right corner (under Google) */}
93104
<div /> {/* Empty cell under Telegram */}
94-
<div className={clsx(styles.syncIconBtn, styles.statusIconOnly)}>
95-
{isAnon ? <MinusStatusIcon size={18} /> : <PlusStatusIcon size={18} />}
105+
<div
106+
className={clsx(styles.syncIconBtn, styles.statusIconAnonBtn)}
107+
onClick={!isAnon ? (e) => { e.stopPropagation(); onSignOut?.(); } : undefined}
108+
style={{ cursor: !isAnon ? 'pointer' : 'default' }}
109+
>
110+
<StatusLightbulbIcon active={!isAnon} />
96111
</div>
97112
</div>
98113

0 commit comments

Comments
 (0)