merge fixes from pandora
This commit is contained in:
parent
7459299bf2
commit
fcf7c24c23
7 changed files with 154 additions and 91 deletions
|
|
@ -129,6 +129,10 @@ async function loadData(id, args) {
|
|||
<span class="icon">${icon.down}</span>
|
||||
${layerData.title}
|
||||
</h3>`)
|
||||
data.layers[layer] = sortBy(data.layers[layer], [
|
||||
{key: "in", operator: "+"},
|
||||
{key: "created", operator: "+"}
|
||||
])
|
||||
data.layers[layer].forEach(annotation => {
|
||||
if (pandora.url) {
|
||||
annotation.value = annotation.value.replace(
|
||||
|
|
@ -137,9 +141,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<div class="user">— ${annotation.user}</div>`
|
||||
}
|
||||
html.push(`
|
||||
<div class="annotation ${layerData.type}" data-in="${annotation.in}" data-out="${annotation.out}">
|
||||
${annotation.value}
|
||||
${content}
|
||||
</div>
|
||||
`)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue