From 4748930460d46f1720abf0bce55d700e0058c137 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 8 Aug 2024 14:37:14 +0200 Subject: [PATCH] option to show user in mobile view --- static/mobile/css/style.css | 4 ++++ static/mobile/js/item.js | 6 +++++- static/mobile/js/main.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/static/mobile/css/style.css b/static/mobile/css/style.css index a65bb02ab..85853c30d 100644 --- a/static/mobile/css/style.css +++ b/static/mobile/css/style.css @@ -139,6 +139,10 @@ video, .poster { border: 1px solid blueviolet; margin-bottom: 4px; } +.annotation .user { + opacity: 0.75; +} + @media(max-width:768px) { .annotation a img { width: 100%; diff --git a/static/mobile/js/item.js b/static/mobile/js/item.js index 0cc3dcf1e..a9942536b 100644 --- a/static/mobile/js/item.js +++ b/static/mobile/js/item.js @@ -137,9 +137,13 @@ async function loadData(id, args) { /href="\//g, `href="${pandora.url.origin}/` ) } + let content = annotation.value + if (!layerData.isSubtitles && layerData.type == "text" && args.show && args.show.includes("user")) { + content += `\n
— ${annotation.user}
` + } html.push(`
- ${annotation.value} + ${content}
`) }) diff --git a/static/mobile/js/main.js b/static/mobile/js/main.js index ebd9b8100..c84b52602 100644 --- a/static/mobile/js/main.js +++ b/static/mobile/js/main.js @@ -14,7 +14,7 @@ function parseURL() { var kv = arg.split('=') k = kv.shift() v = kv.join('=') - if (['users', 'layers'].includes(k)) { + if (['users', 'layers', 'show'].includes(k)) { v = v.split(',') } return [k, v]