SHA256
Уточнить уведомления и карточку звонка
This commit is contained in:
@@ -440,12 +440,12 @@ function buildCallStatusText(callSummary) {
|
||||
return `Длительность: ${formatCallDurationCompact(callSummary.durationSec)}`;
|
||||
}
|
||||
const reason = String(callSummary.reason || '').trim().toLowerCase();
|
||||
if (reason === 'offline') return 'Не дозвонился: абонент не в сети';
|
||||
if (reason === 'no_answer') return 'Не дозвонился: нет ответа';
|
||||
if (reason === 'connect_failed') return 'Не дозвонился: не удалось установить соединение';
|
||||
if (reason === 'busy') return 'Не дозвонился: абонент занят';
|
||||
if (reason === 'declined') return 'Не дозвонился: звонок отклонён';
|
||||
return 'Не дозвонился';
|
||||
if (reason === 'offline') return 'Абонент не в сети';
|
||||
if (reason === 'no_answer') return 'Нет ответа';
|
||||
if (reason === 'connect_failed') return 'Не удалось установить соединение';
|
||||
if (reason === 'busy') return 'Абонент занят';
|
||||
if (reason === 'declined') return 'Звонок отклонён';
|
||||
return 'Звонок не завершён';
|
||||
}
|
||||
|
||||
function resolveEffectiveReadState(messages, msg) {
|
||||
@@ -594,20 +594,34 @@ function renderLog(list, chatId, { onOpenActions, markAsRead = true, scrollMode
|
||||
|
||||
const callIcon = document.createElement('span');
|
||||
callIcon.className = 'bubble-call-icon';
|
||||
callIcon.textContent = '☎';
|
||||
callIcon.classList.add(msg?.from === 'out' ? 'bubble-call-icon--outgoing' : 'bubble-call-icon--incoming');
|
||||
|
||||
const callIconPhone = document.createElement('span');
|
||||
callIconPhone.className = 'bubble-call-icon-phone';
|
||||
callIconPhone.textContent = '✆';
|
||||
|
||||
const callIconArrow = document.createElement('span');
|
||||
callIconArrow.className = 'bubble-call-icon-arrow';
|
||||
callIconArrow.textContent = msg?.from === 'out' ? '↑' : '↓';
|
||||
|
||||
callIcon.append(callIconPhone, callIconArrow);
|
||||
|
||||
const callTitle = document.createElement('span');
|
||||
callTitle.className = 'bubble-call-title';
|
||||
callTitle.textContent = msg?.from === 'out' ? 'Исходящий звонок' : 'Входящий звонок';
|
||||
callTitle.textContent = 'Звонок';
|
||||
|
||||
callHead.append(callIcon, callTitle);
|
||||
|
||||
const callMetaLine = document.createElement('div');
|
||||
callMetaLine.className = 'bubble-call-line bubble-call-line--muted';
|
||||
const callMetaLine = document.createElement('span');
|
||||
callMetaLine.className = 'bubble-call-line';
|
||||
callMetaLine.classList.add(
|
||||
parsedText.callSummary.status === 'completed'
|
||||
? 'bubble-call-line--success'
|
||||
: 'bubble-call-line--plain',
|
||||
);
|
||||
const callStatus = buildCallStatusText(parsedText.callSummary);
|
||||
callMetaLine.textContent = callStatus;
|
||||
|
||||
callCard.append(callHead, callMetaLine);
|
||||
callHead.append(callIcon, callTitle, callMetaLine);
|
||||
callCard.append(callHead);
|
||||
bubble.append(callCard);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user