Merge pull request #9298 from Tvallejos/simul-host-own-messages
Highlight yourself and simul host in chatpull/9317/head
commit
b5c7e130e9
|
@ -20,6 +20,15 @@
|
|||
line-height: 1.2em;
|
||||
overflow-y: hidden;
|
||||
user-select: text;
|
||||
|
||||
&.me {
|
||||
border-left: 3px solid $c-secondary-dim;
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
&.host {
|
||||
background-color: rgba($c-secondary-dim, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
.deleted {
|
||||
|
|
|
@ -212,6 +212,12 @@ function renderLine(ctrl: Ctrl, line: Line): VNode {
|
|||
|
||||
return h(
|
||||
'li',
|
||||
{
|
||||
class: {
|
||||
me: line.u === ctrl.data.userId,
|
||||
host: line.u === ctrl.data.hostId,
|
||||
},
|
||||
},
|
||||
ctrl.moderation()
|
||||
? [line.u ? modLineAction() : null, userNode, ' ', textNode]
|
||||
: [
|
||||
|
|
|
@ -39,6 +39,7 @@ export interface ChatData {
|
|||
restricted: boolean;
|
||||
palantir: boolean;
|
||||
domVersion: number;
|
||||
hostId?: string;
|
||||
}
|
||||
|
||||
export interface Line {
|
||||
|
|
|
@ -20,7 +20,10 @@ export default function (ctrl: SimulCtrl) {
|
|||
h('aside.simul__side', {
|
||||
hook: util.onInsert(el => {
|
||||
$(el).replaceWith(ctrl.opts.$side);
|
||||
ctrl.opts.chat && lichess.makeChat(ctrl.opts.chat);
|
||||
if (ctrl.opts.chat) {
|
||||
ctrl.opts.chat.data.hostId = ctrl.data.host.id;
|
||||
lichess.makeChat(ctrl.opts.chat);
|
||||
}
|
||||
}),
|
||||
}),
|
||||
h(
|
||||
|
|
Loading…
Reference in New Issue