[pl][zine] download counter

This commit is contained in:
Andrea Vos 2022-06-15 20:09:34 +02:00
parent ab310dff8f
commit 54a5b4f4b9

View File

@ -28,6 +28,10 @@
</a>
</li>
</ul>
<p v-if="downloadsCount(release)">
<Icon v="download"/>
{{ downloadsCount(release) }}
</p>
<div v-if="selectedFormat" class="alert alert-info small">
<Icon v="info-circle"/>
<T>links.zine.format.{{selectedFormat}}.description</T>
@ -94,6 +98,15 @@
'darkMode',
]),
},
methods: {
downloadsCount(release) {
let count = 0;
for (let {filename} of Object.values(release.downloads)) {
count += this.stats[filename] ?? 0;
}
return count;
},
},
head() {
return head({
title: this.$t('links.zine.headerLong'),