diff --git a/modules/slack/client.js b/modules/slack/client.js index b23d04c..1fa6187 100644 --- a/modules/slack/client.js +++ b/modules/slack/client.js @@ -812,7 +812,7 @@ function createTranscriptTile({ root, moduleApi }) { /** A message or a thread reply as one row; returns the row and its body (replies nest in the body). */ function buildLine(m, reply = false) { - const line = el('div', reply ? 'sl-reply' : 'sl-msg'); + const line = el('div', reply ? 'sl-reply' : 'sl-row'); line.dataset.ts = m.ts; line.classList.toggle('sl-me', Boolean(m.me)); line.classList.toggle('sl-bot', Boolean(m.bot)); @@ -876,7 +876,7 @@ function createTranscriptTile({ root, moduleApi }) { }); } entriesEl.addEventListener('contextmenu', (e) => { - const line = e.target.closest('.sl-msg, .sl-reply'); + const line = e.target.closest('.sl-row, .sl-reply'); if (!line || !entriesEl.contains(line)) return; const m = messagesByTs.get(line.dataset.ts); if (!m) return; diff --git a/modules/slack/module.json b/modules/slack/module.json index 2bdd632..544adf6 100644 --- a/modules/slack/module.json +++ b/modules/slack/module.json @@ -117,8 +117,9 @@ }, "showSystem": { "type": "switch", - "label": "System lines", - "default": true + "label": "Channel notices", + "default": true, + "help": "Joins, leaves, topic changes, pins and other housekeeping lines." } } } diff --git a/modules/slack/style.css b/modules/slack/style.css index 5f03547..d84fa99 100644 --- a/modules/slack/style.css +++ b/modules/slack/style.css @@ -87,8 +87,9 @@ to { opacity: 1; transform: none; } } -/* one row: the picture, then everything else */ -[data-module="slack"] .sl-msg, +/* one row: the picture, then everything else (.sl-row — .sl-msg is the + send tile's status line, a different thing) */ +[data-module="slack"] .sl-row, [data-module="slack"] .sl-reply { display: flex; align-items: flex-start; @@ -153,10 +154,8 @@ font-variant-numeric: tabular-nums; } [data-module="slack"] .sl-wrap:not(.show-times) .sl-time { display: none; } -[data-module="slack"] .sl-wrap:not(.show-names) .sl-msg > .sl-meta, -[data-module="slack"] .sl-wrap:not(.show-names) .sl-reply > .sl-meta { display: none; } -[data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-msg > .sl-meta, -[data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-reply > .sl-meta { display: flex; } +[data-module="slack"] .sl-wrap:not(.show-names) .sl-body > .sl-meta { display: none; } +[data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-body > .sl-meta { display: flex; } [data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-name { display: none; } [data-module="slack"] .sl-wrap:not(.show-system) .sl-entry.sl-system { display: none; }