From d0109a7f751a30fbf493f83dd7b51d2430cf7d4c Mon Sep 17 00:00:00 2001 From: Jose B Date: Mon, 14 Aug 2023 13:57:32 -0500 Subject: [PATCH] =?UTF-8?q?style=20it=20=F0=9F=A7=91=E2=80=8D=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/app/components/record.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/www/app/components/record.js b/www/app/components/record.js index 0885b802..3b178125 100644 --- a/www/app/components/record.js +++ b/www/app/components/record.js @@ -111,9 +111,28 @@ export default function Recorder(props) { link.style.visibility = "visible"; for (let topic of props.topics) { + const content = document.createElement("div"); + content.style = ` + border-left: solid 1px orange; + padding: 0 2px; + font-size: 0.7rem; + max-width: 100px; + width: max-content; + cursor: pointer; + background-color: white; + border-radius: 0 3px 3px 0; + `; + content.onmouseover = () => + (content.style.backgroundColor = "orange"); + content.onmouseout = () => (content.style.backgroundColor = "white"); + content.textContent = + topic.title.length >= 20 + ? topic.title.slice(0, 17) + "..." + : topic.title; + const region = waveRegions.addRegion({ start: topic.timestamp, - content: topic.title.slice(0, 7) + "...", + content, color: "f00", drag: false, });