fix(ux): mute Telegram badge color and format source tag as display name (fixes #442)
This commit is contained in:
committed by
Hermes Agent
parent
f1590fdb07
commit
85d8aad0ae
@@ -578,6 +578,10 @@ function renderSessionListFromCache(){
|
|||||||
}
|
}
|
||||||
// ── Render session items (extracted for group body use) ──
|
// ── Render session items (extracted for group body use) ──
|
||||||
// Note: declared after the groups loop but available via function hoisting.
|
// Note: declared after the groups loop but available via function hoisting.
|
||||||
|
function _formatSourceTag(tag){
|
||||||
|
const names={telegram:'via Telegram',discord:'via Discord',slack:'via Slack',cli:'CLI',feishu:'via Feishu',weixin:'via WeChat'};
|
||||||
|
return names[tag]||tag;
|
||||||
|
}
|
||||||
function _renderOneSession(s){
|
function _renderOneSession(s){
|
||||||
const el=document.createElement('div');
|
const el=document.createElement('div');
|
||||||
const isActive=S.session&&s.session_id===S.session.session_id;
|
const isActive=S.session&&s.session_id===S.session.session_id;
|
||||||
@@ -598,7 +602,7 @@ function renderSessionListFromCache(){
|
|||||||
const tsMs=_sessionTimestampMs(s);
|
const tsMs=_sessionTimestampMs(s);
|
||||||
titleRow.appendChild(title);
|
titleRow.appendChild(title);
|
||||||
const metaBits=[];
|
const metaBits=[];
|
||||||
if(s.is_cli_session && s.source_tag) metaBits.push(s.source_tag);
|
if(s.is_cli_session && s.source_tag) metaBits.push(_formatSourceTag(s.source_tag));
|
||||||
if(s.message_count) metaBits.push(t('n_messages', s.message_count));
|
if(s.message_count) metaBits.push(t('n_messages', s.message_count));
|
||||||
if(s.model) metaBits.push(String(s.model).split('/').pop());
|
if(s.model) metaBits.push(String(s.model).split('/').pop());
|
||||||
sessionText.appendChild(titleRow);
|
sessionText.appendChild(titleRow);
|
||||||
|
|||||||
@@ -1099,8 +1099,8 @@ body.resizing{user-select:none;cursor:col-resize;}
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* Source-specific colors for gateway sessions */
|
/* Source-specific colors for gateway sessions */
|
||||||
.session-item.cli-session[data-source="telegram"] { border-left-color: #0088cc; }
|
.session-item.cli-session[data-source="telegram"] { border-left-color: rgba(0, 136, 204, 0.55); }
|
||||||
.session-item.cli-session[data-source="telegram"]::after { color: #0088cc; }
|
.session-item.cli-session[data-source="telegram"]::after { color: rgba(0, 136, 204, 0.55); }
|
||||||
.session-item.cli-session[data-source="discord"] { border-left-color: #5865F2; }
|
.session-item.cli-session[data-source="discord"] { border-left-color: #5865F2; }
|
||||||
.session-item.cli-session[data-source="discord"]::after { color: #5865F2; }
|
.session-item.cli-session[data-source="discord"]::after { color: #5865F2; }
|
||||||
.session-item.cli-session[data-source="slack"] { border-left-color: #4A154B; }
|
.session-item.cli-session[data-source="slack"] { border-left-color: #4A154B; }
|
||||||
|
|||||||
Reference in New Issue
Block a user