[profile] allow re-generating card pictures

This commit is contained in:
Andrea Vos 2022-08-10 18:17:16 +02:00
parent cbf4776843
commit 42bc6a881a

View File

@ -39,7 +39,25 @@
<Icon v="id-card"/> <Icon v="id-card"/>
<T>profile.card.link</T><T>quotation.colon</T> <T>profile.card.link</T><T>quotation.colon</T>
</p> </p>
<small v-if="profile.card === null && profile.cardDark === null"> <small v-if="profile.card === '' || profile.cardDark === ''">
<Spinner/>
<T>profile.card.generating</T>
</small>
<span v-else>
<a v-if="profile.card" :href="profile.card" target="_blank" rel="noopener"
class="btn btn-success btn-sm mx-1">
<Icon v="sun"/>
<T>mode.light</T>
</a>
<a v-if="profile.cardDark" :href="profile.cardDark" target="_blank" rel="noopener"
class="btn btn-success btn-sm mx-1">
<Icon v="moon"/>
<T>mode.dark</T>
</a>
<hr v-if="profile.card || profile.cardDark"/>
<small>
<T>profile.card.generate</T><T>quotation.colon</T><br/>
<button class="btn btn-outline-success btn-sm" @click="generateCard(false)"> <button class="btn btn-outline-success btn-sm" @click="generateCard(false)">
<Icon v="sun"/> <Icon v="sun"/>
<T>mode.light</T> <T>mode.light</T>
@ -49,28 +67,6 @@
<T>mode.dark</T> <T>mode.dark</T>
</button> </button>
</small> </small>
<small v-else-if="profile.card === '' || profile.cardDark === ''">
<Spinner/>
<T>profile.card.generating</T>
</small>
<span v-else>
<a v-if="profile.card" :href="profile.card" target="_blank" rel="noopener"
class="btn btn-outline-success btn-sm mx-1">
<Icon v="sun"/>
<T>mode.light</T>
</a>
<a v-if="profile.cardDark" :href="profile.cardDark" target="_blank" rel="noopener"
class="btn btn-outline-success btn-sm mx-1">
<Icon v="moon"/>
<T>mode.dark</T>
</a>
<button v-if="!profile.card" class="btn btn-outline-success btn-sm" @click="generateCard(false)">
<Icon v="sun"/>
</button>
<button v-if="!profile.cardDark" class="btn btn-outline-success btn-sm" @click="generateCard(true)">
<Icon v="moon"/>
</button>
</span> </span>
</div> </div>
</template> </template>