Skip to content

Commit a74498a

Browse files
committed
Change Zap appearance
1 parent f81776d commit a74498a

File tree

2 files changed

+83
-21
lines changed

2 files changed

+83
-21
lines changed

src/pages/StreamPage.module.scss

Lines changed: 74 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070

7171
.chatButton {
7272
display: flex;
73-
height: 32px;
74-
padding: 7px 18px;
73+
height: 28px;
74+
padding-inline: 18px;
7575
justify-content: center;
7676
align-items: center;
7777
gap: 10px;
@@ -162,14 +162,6 @@
162162
display: flex;
163163
gap: 8px;
164164

165-
&.zapMessage {
166-
padding-block: 10px;
167-
padding-inline: 8px;
168-
border-radius: 8px;
169-
border: 1px solid #E47C00;
170-
background: linear-gradient(0deg, rgba(228, 124, 0, 0.20) 0%, rgba(228, 124, 0, 0.20) 100%), #000;
171-
}
172-
173165
.leftSide {
174166
width: 24px;
175167
}
@@ -217,14 +209,85 @@
217209
font-weight: 400;
218210
line-height: 20px;
219211
}
212+
213+
&.zapMessage {
214+
width: 100%;
215+
padding-block: 10px;
216+
padding-inline: 8px;
217+
border-radius: 8px;
218+
border: 1px solid #E47C00;
219+
background: rgba(228, 124, 0, 0.20);
220+
221+
.rightSide {
222+
width: 100%;
223+
224+
.zapInfo {
225+
display: flex;
226+
width: 100%;
227+
justify-content: space-between;
228+
align-items: center;
229+
}
230+
231+
.authorName {
232+
color: var(--active-zap);
233+
font-size: 16px;
234+
font-weight: 700;
235+
line-height: 20px;
236+
width: fit-content;
237+
display: flex;
238+
gap: 4px;
239+
240+
>span {
241+
display: -webkit-box;
242+
-webkit-box-orient: vertical;
243+
-webkit-line-clamp: 1;
244+
text-overflow: ellipsis;
245+
overflow: hidden;
246+
max-width: 160px;
247+
248+
&.zapped {
249+
color: var(--active-zap);
250+
font-size: 16px;
251+
font-weight: 400;
252+
line-height: 20px;
253+
}
254+
}
255+
}
256+
257+
.zapStats {
258+
display: flex;
259+
height: 24px;
260+
padding-inline: 8px;
261+
align-items: center;
262+
gap: 2px;
263+
width: fit-content;
264+
border-radius: 24px;
265+
background: var(--active-zap);
266+
267+
color: var(--background-site);
268+
font-size: 16px;
269+
font-weight: 700;
270+
line-height: 16px;
271+
272+
.zapIcon {
273+
background-color: var(--background-site);
274+
}
275+
}
276+
}
277+
278+
.messageContent {
279+
color: var(--text-primary);
280+
}
281+
}
282+
220283
}
221284

222285
.chatHeader {
223286
display: flex;
224287
justify-content: space-between;
225288
align-items: center;
226289
padding: 8px;
227-
height: 77px;
290+
height: 73px;
228291
border-bottom: 1px solid var(--subtile-devider);
229292

230293
.chatInfo {

src/pages/StreamPage.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ const StreamPage: Component = () => {
320320
<Avatar user={author(zap.sender as string)} size="micro" />
321321
</div>
322322
<div class={styles.rightSide}>
323+
<span class={styles.zapInfo}>
323324
<span class={styles.authorName}>
324325
<span>
325326
{userName(author(zap.sender as string), zap.sender as string)}
@@ -331,10 +332,12 @@ const StreamPage: Component = () => {
331332
<span class={styles.zapped}>
332333
zapped
333334
</span>
334-
<span class={styles.zapStats}>
335-
{humanizeNumber(zap?.amount || 0)} sats
336-
</span>
337335
</span>
336+
<div class={styles.zapStats}>
337+
<div class={styles.zapIcon}></div>
338+
{humanizeNumber(zap?.amount || 0)}
339+
</div>
340+
</span>
338341
<span class={styles.messageContent}>
339342
{zap?.message}
340343
</span>
@@ -631,14 +634,10 @@ const StreamPage: Component = () => {
631634
<div class={styles.streamingPage}>
632635
<div class={`${styles.streamingMain} ${!showLiveChat() ? styles.fullWidth : ''}`}>
633636
<div class={styles.streamingHeader}>
634-
<div class={styles.branding}>
635-
<Branding />
636-
</div>
637-
638-
<div class={styles.separator}></div>
639-
640637
<div class={styles.streamerInfo}>
641-
<Avatar user={profile?.userProfile} size="xs" />
638+
<a href={app?.actions.profileLink(profile?.profileKey)}>
639+
<Avatar user={profile?.userProfile} size="xs" />
640+
</a>
642641
<div class={styles.userInfo}>
643642
<div class={styles.userName}>
644643
{userName(profile?.userProfile)}

0 commit comments

Comments
 (0)