aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-20 21:36:04 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-20 21:36:04 +1100
commite6b9c10f0f1eefee556833d98a1f322856dcbb7e (patch)
tree68ed584e762d2d6c96ae9df0887563c466c3ca77 /src/components
parent014da2e01cde7c19169efc29242e90a71b6d328c (diff)
Adjust info-modal display for picked events
Diffstat (limited to 'src/components')
-rw-r--r--src/components/InfoModal.vue15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/components/InfoModal.vue b/src/components/InfoModal.vue
index cd067e1..7502d80 100644
--- a/src/components/InfoModal.vue
+++ b/src/components/InfoModal.vue
@@ -46,10 +46,13 @@
</li>
<li>
<span :style="{color: store.color.altDark}">License: </span>
- <a :href="licenseToUrl(eventInfo.imgInfo.license)" target="_blank">
- {{eventInfo.imgInfo.license}}
- </a>
- <external-link-icon class="inline-block w-3 h-3 ml-1"/>
+ <template v-if="licenseToUrl(eventInfo.imgInfo.license) != null">
+ <a :href="licenseToUrl(eventInfo.imgInfo.license)" target="_blank">
+ {{eventInfo.imgInfo.license}}
+ </a>
+ <external-link-icon class="inline-block w-3 h-3 ml-1"/>
+ </template>
+ <span v-else>{{eventInfo.imgInfo.license}}</span>
</li>
<li>
<span :style="{color: store.color.altDark}">Obtained via: </span>
@@ -66,7 +69,7 @@
</div>
<div v-if="eventInfo.desc != null">{{eventInfo.desc}}</div>
<div v-else class="text-center text-stone-500 text-sm">(No description found)</div>
- <div class="text-sm text-right">
+ <div v-if="event.id > 0" class="text-sm text-right">
<a :href="'https://en.wikipedia.org/?curid=' + eventInfo.wikiId" target="_blank">From Wikipedia</a>
(via <a :href="'https://www.wikidata.org/wiki/Q' + event.id" target="_blank">Wikidata</a>)
<external-link-icon class="inline-block w-3 h-3 ml-1"/>
@@ -132,7 +135,7 @@ function licenseToUrl(license: string){
}
return url;
}
- return "[INVALID LICENSE]";
+ return null;
}
}