make chats easier to copy

by separating user and text with an actual space
rather than just css spacing
pull/7235/head
Thibault Duplessis 2020-09-05 22:23:47 +02:00
parent c2bd5e6176
commit 2605481839
3 changed files with 6 additions and 3 deletions

View File

@ -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
]);
}

View File

@ -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

View File

@ -1,4 +1,5 @@
{
"extends": "../tsconfig.base.json",
"include": ["src/*.ts"]
"include": ["src/*.ts"],
"outDir": "./dist"
}