@product7/product7-js 0.2.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/product7-js.js
CHANGED
|
@@ -3450,21 +3450,23 @@
|
|
|
3450
3450
|
}
|
|
3451
3451
|
|
|
3452
3452
|
.messenger-message-system-event-name {
|
|
3453
|
-
font-size:
|
|
3453
|
+
font-size: 0.875rem;
|
|
3454
3454
|
font-weight: var(--font-weight-semibold);
|
|
3455
3455
|
color: var(--msg-text);
|
|
3456
3456
|
line-height: 1.3;
|
|
3457
3457
|
}
|
|
3458
3458
|
|
|
3459
3459
|
.messenger-message-system-event-action {
|
|
3460
|
-
font-size:
|
|
3461
|
-
|
|
3460
|
+
font-size: 0.875rem;
|
|
3461
|
+
font-weight: 500;
|
|
3462
|
+
color: var(--msg-text-secondary);
|
|
3462
3463
|
margin-top: -2px;
|
|
3463
3464
|
}
|
|
3464
3465
|
|
|
3465
3466
|
.messenger-message-system-event-time {
|
|
3466
|
-
font-size: 0.
|
|
3467
|
-
|
|
3467
|
+
font-size: 0.875rem;
|
|
3468
|
+
font-weight: 500;
|
|
3469
|
+
color: var(--msg-text-tertiary);
|
|
3468
3470
|
}
|
|
3469
3471
|
|
|
3470
3472
|
.messenger-message-own {
|
|
@@ -3517,8 +3519,8 @@
|
|
|
3517
3519
|
}
|
|
3518
3520
|
|
|
3519
3521
|
.messenger-message-content {
|
|
3520
|
-
font-size:
|
|
3521
|
-
font-weight:
|
|
3522
|
+
font-size: 0.875rem;
|
|
3523
|
+
font-weight: 500;
|
|
3522
3524
|
line-height: var(--line-height-relaxed);
|
|
3523
3525
|
}
|
|
3524
3526
|
|
|
@@ -9489,11 +9491,15 @@
|
|
|
9489
9491
|
content.includes('left the conversation');
|
|
9490
9492
|
|
|
9491
9493
|
if (isJoinLeave && message.sender) {
|
|
9492
|
-
const
|
|
9494
|
+
const rawName = message.sender.name || '';
|
|
9495
|
+
const name = rawName
|
|
9496
|
+
.split(' ')
|
|
9497
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
9498
|
+
.join(' ');
|
|
9493
9499
|
const avatarUrl = message.sender.avatarUrl;
|
|
9494
9500
|
const initial = name.charAt(0).toUpperCase() || '?';
|
|
9495
9501
|
const colors = ['#5856d6', '#007aff', '#34c759', '#ff9500'];
|
|
9496
|
-
const colorIndex =
|
|
9502
|
+
const colorIndex = rawName.charCodeAt(0) % colors.length;
|
|
9497
9503
|
const avatarHtml = avatarUrl
|
|
9498
9504
|
? `<img src="${this._escapeHtml(avatarUrl)}" alt="${this._escapeHtml(name)}" />`
|
|
9499
9505
|
: initial;
|
|
@@ -9502,8 +9508,8 @@
|
|
|
9502
9508
|
: `style="background: ${colors[colorIndex]};"`;
|
|
9503
9509
|
const timeStr = this._formatMessageTime(message.timestamp);
|
|
9504
9510
|
|
|
9505
|
-
|
|
9506
|
-
const action =
|
|
9511
|
+
const rawAction = content.replace(rawName, '').trim();
|
|
9512
|
+
const action = rawAction.charAt(0).toUpperCase() + rawAction.slice(1);
|
|
9507
9513
|
|
|
9508
9514
|
return `
|
|
9509
9515
|
<div class="messenger-message-system-event">
|