make chats easier to copy
by separating user and text with an actual space rather than just css spacingpull/7235/head
parent
c2bd5e6176
commit
2605481839
|
@ -198,7 +198,7 @@ function report(ctrl: Ctrl, line: HTMLElement) {
|
|||
);
|
||||
}
|
||||
|
||||
function renderLine(ctrl: Ctrl, line: Line) {
|
||||
function renderLine(ctrl: Ctrl, line: Line): VNode {
|
||||
|
||||
const textNode = renderText(line.t, ctrl.opts.parseMoves);
|
||||
|
||||
|
@ -214,6 +214,7 @@ function renderLine(ctrl: Ctrl, line: Line) {
|
|||
return h('li', ctrl.moderation() ? [
|
||||
line.u ? modLineAction() : null,
|
||||
userNode,
|
||||
' ',
|
||||
textNode
|
||||
] : [
|
||||
ctrl.data.userId && line.u && ctrl.data.userId != line.u ? h('i.flag', {
|
||||
|
@ -223,6 +224,7 @@ function renderLine(ctrl: Ctrl, line: Line) {
|
|||
}
|
||||
}) : null,
|
||||
userNode,
|
||||
' ',
|
||||
textNode
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { h } from 'snabbdom'
|
||||
import { VNode } from 'snabbdom/vnode'
|
||||
|
||||
export function userLink(u: string, title?: string) {
|
||||
export function userLink(u: string, title?: string): VNode {
|
||||
const trunc = u.substring(0, 14);
|
||||
return h('a', {
|
||||
// can't be inlined because of thunks
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"include": ["src/*.ts"]
|
||||
"include": ["src/*.ts"],
|
||||
"outDir": "./dist"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue