show "under construction" warnings for unpublished locales

This commit is contained in:
Andrea Vos 2020-12-27 17:03:18 +01:00
parent a5b111c2fa
commit b40d06cc9a
2 changed files with 5 additions and 1 deletions

View File

@ -60,6 +60,10 @@
</nuxt-link> </nuxt-link>
</div> </div>
</div> </div>
<div v-if="locales[config.locale].published === false" class="alert alert-warning">
<Icon v="exclamation-triangle"/>
This language version is still under construction!
</div>
</header> </header>
<header v-else class="mb-4"> <header v-else class="mb-4">
<h1 class="text-nowrap"> <h1 class="text-nowrap">

View File

@ -144,7 +144,7 @@ export const buildLocaleList = (current) => {
return buildDict(function* () { return buildDict(function* () {
for (let [code, name, url, published] of locales) { for (let [code, name, url, published] of locales) {
if (published || current === code) { if (published || current === code) {
yield [code, {name, url}]; yield [code, {name, url, published}];
} }
} }
}) })