[profile] isolate the management buttons
This commit is contained in:
parent
268da78f3a
commit
2708a0abf7
|
@ -18,44 +18,46 @@
|
|||
{{options.name}}
|
||||
</LocaleLink>
|
||||
</div>
|
||||
<div v-if="$user() && $user().username === user.username">
|
||||
<nuxt-link to="/editor" class="btn btn-primary btn-sm mb-2 mx-1">
|
||||
<Icon v="edit"/>
|
||||
<T>profile.edit</T>
|
||||
</nuxt-link>
|
||||
<a :href="`https://pronouns.page/@${user.username}`" v-if="Object.keys(user.profiles).length > 1"
|
||||
class="btn btn-outline-secondary btn-sm mb-2 mx-1"
|
||||
>
|
||||
<Icon v="external-link"/>
|
||||
pronouns.page/@{{user.username}}
|
||||
</a>
|
||||
</div>
|
||||
<div v-if="($user() && $user().username === username) || ($isGranted('users') && profile.card)">
|
||||
<small>
|
||||
<Icon v="id-card"/>
|
||||
<T>profile.card.link</T>:
|
||||
</small>
|
||||
<small v-if="profile.card === null">
|
||||
<button class="btn btn-outline-success btn-sm" @click="generateCard">
|
||||
<T>profile.card.generate</T>
|
||||
</button>
|
||||
</small>
|
||||
<small v-else-if="profile.card === ''">
|
||||
<Spinner/>
|
||||
<T>profile.card.generating</T>
|
||||
</small>
|
||||
<template v-if="profile.card">
|
||||
<a :href="profile.card" target="_blank" rel="noopener"
|
||||
class="btn btn-outline-success btn-sm mb-2 mx-1">
|
||||
<Icon v="sun"/>
|
||||
<T>mode.light</T>
|
||||
<div v-if="$user() && $user().username === user.username" class="alert alert-info">
|
||||
<div class="mb-2">
|
||||
<nuxt-link to="/editor" class="btn btn-primary btn-sm mx-1">
|
||||
<Icon v="edit"/>
|
||||
<T>profile.edit</T>
|
||||
</nuxt-link>
|
||||
<a :href="`https://pronouns.page/@${user.username}`" v-if="Object.keys(user.profiles).length > 1"
|
||||
class="btn btn-outline-secondary btn-sm mx-1"
|
||||
>
|
||||
<Icon v="external-link"/>
|
||||
pronouns.page/@{{user.username}}
|
||||
</a>
|
||||
<a :href="profile.card.replace('.png', '-dark.png')" target="_blank" rel="noopener"
|
||||
class="btn btn-outline-success btn-sm mb-2 mx-1">
|
||||
<Icon v="moon"/>
|
||||
<T>mode.dark</T>
|
||||
</a>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<small>
|
||||
<Icon v="id-card"/>
|
||||
<T>profile.card.link</T>:
|
||||
</small>
|
||||
<small v-if="profile.card === null">
|
||||
<button class="btn btn-outline-success btn-sm" @click="generateCard">
|
||||
<T>profile.card.generate</T>
|
||||
</button>
|
||||
</small>
|
||||
<small v-else-if="profile.card === ''">
|
||||
<Spinner/>
|
||||
<T>profile.card.generating</T>
|
||||
</small>
|
||||
<template v-if="profile.card">
|
||||
<a :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 :href="profile.card.replace('.png', '-dark.png')" target="_blank" rel="noopener"
|
||||
class="btn btn-outline-success btn-sm mx-1">
|
||||
<Icon v="moon"/>
|
||||
<T>mode.dark</T>
|
||||
</a>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</Profile>
|
||||
|
||||
|
|
Reference in New Issue