[profile] isolate the management buttons

This commit is contained in:
Avris 2021-09-05 19:22:18 +02:00
parent 268da78f3a
commit 2708a0abf7
1 changed files with 39 additions and 37 deletions

View File

@ -18,19 +18,20 @@
{{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">
<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 mb-2 mx-1"
class="btn btn-outline-secondary btn-sm mx-1"
>
<Icon v="external-link"/>
pronouns.page/@{{user.username}}
</a>
</div>
<div v-if="($user() && $user().username === username) || ($isGranted('users') && profile.card)">
<div>
<small>
<Icon v="id-card"/>
<T>profile.card.link</T>:
@ -46,17 +47,18 @@
</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">
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 mb-2 mx-1">
class="btn btn-outline-success btn-sm mx-1">
<Icon v="moon"/>
<T>mode.dark</T>
</a>
</template>
</div>
</div>
</Profile>
<Ban :user="user"/>