mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-29 08:24:35 +01:00
Support icon-less entries
This commit is contained in:
parent
55ce2de545
commit
bd030f8cfb
1 changed files with 10 additions and 2 deletions
|
@ -134,8 +134,16 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren
|
|||
const variationConfig = variationsConfig[newVariation]
|
||||
|
||||
variantsEl.value = currentVariation
|
||||
variantsEl.previousElementSibling.innerHTML = variationConfig.icon
|
||||
|
||||
if (variationConfig.icon) {
|
||||
variantsEl.previousElementSibling.innerHTML = variationConfig.icon
|
||||
variantsEl.previousElementSibling.classList.remove('d-none')
|
||||
variantsEl.parentElement.classList.add('input-group')
|
||||
} else {
|
||||
variantsEl.previousElementSibling.innerHTML = ""
|
||||
variantsEl.previousElementSibling.classList.add('d-none')
|
||||
variantsEl.parentElement.classList.remove('input-group')
|
||||
}
|
||||
|
||||
const configObject = variationConfig.versions[currentPeriod]
|
||||
if (typeof configObject.url === "string") {
|
||||
if (imageCache[configObject.url] === undefined) {
|
||||
|
|
Loading…
Reference in a new issue