Commit 208f453d authored by David Trattnig's avatar David Trattnig
Browse files

Provide various ways of displaying title and sub

parent 2256361b
Pipeline #1876 passed with stages
in 7 minutes and 38 seconds
......@@ -18,6 +18,7 @@
export let view = 'card' // 'card' or 'paper'
/* Nested Component Props */
export let renderhtml = false // Attention: to avoid XSS attack vectors use with trusted API sources only
export let displayCatTitle = undefined
export let displayCatIcons = false
export let displayLangIcons = false
export let urlEpisodeDetail = undefined
......@@ -112,6 +113,7 @@
{urlEpisodeDetail}
{urlShowDetail}
{urlShowList}
{displayCatTitle}
{displayCatIcons}
{displayLangIcons}
{renderhtml} />
......
......@@ -20,6 +20,7 @@
export let labelEpisodes = undefined
export let labelShowMore = 'Show all'
export let hasMoreEpisodes = undefined
export let displayCatTitle = true
export let displayCatIcons = false
export let displayLangIcons = false
......@@ -126,6 +127,7 @@
category={show.category}
languages={show.language}
{urlShowList}
{displayCatTitle}
{displayCatIcons}
{displayLangIcons} />
</div>
......
......@@ -16,6 +16,7 @@
export let urlEpisodeDetail = undefined
export let urlShowDetail = undefined
export let urlShowList = undefined
export let displayCatTitle = false
export let displayCatIcons = false
export let displayLangIcons = false
export let renderhtml = false // Attention: to avoid XSS attack vectors use with trusted API sources only
......
......@@ -5,6 +5,7 @@
export let category = undefined
export let languages = undefined
export let urlShowList = undefined
export let displayCatTitle = undefined
export let displayCatIcons = false
export let displayLangIcons = false
......@@ -15,13 +16,19 @@
if (category) {
let catChip = []
catChip.id = category.id
catChip.name = category.name.trim()
if (displayCatTitle)
catChip.name = category.name.trim()
else
catChip.name = ""
if (category.end)
catChip.active = new Date(category.end) > new Date()
else
catChip.active = true
if (category.subtitle && category.subtitle.trim())
catChip.name += " | " + category.subtitle
if (category.subtitle && category.subtitle.trim()) {
if (catChip.name.length > 0)
catChip.name += " | "
catChip.name += category.subtitle
}
catChip.type = 'category'
chips.push(catChip)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment