Redesign organizer picker with tailwind
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
4e3eb33d01
commit
59c39efb80
|
@ -5,14 +5,33 @@
|
||||||
:placeholder="$t('Filter by profile or group name')"
|
:placeholder="$t('Filter by profile or group name')"
|
||||||
v-model="actorFilter"
|
v-model="actorFilter"
|
||||||
/>
|
/>
|
||||||
<b-radio-button
|
<transition-group
|
||||||
v-model="selectedActor"
|
tag="ul"
|
||||||
:native-value="availableActor"
|
class="grid grid-cols-1 gap-y-3 m-5 max-w-md mx-auto"
|
||||||
class="list-item"
|
enter-active-class="duration-300 ease-out"
|
||||||
|
enter-from-class="transform opacity-0"
|
||||||
|
enter-to-class="opacity-100"
|
||||||
|
leave-active-class="duration-200 ease-in"
|
||||||
|
leave-from-class="opacity-100"
|
||||||
|
leave-to-class="transform opacity-0"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
class="relative focus-within:shadow-lg"
|
||||||
v-for="availableActor in actualFilteredAvailableActors"
|
v-for="availableActor in actualFilteredAvailableActors"
|
||||||
:key="availableActor.id"
|
:key="availableActor.id"
|
||||||
>
|
>
|
||||||
<div class="media" dir="auto">
|
<input
|
||||||
|
class="sr-only peer"
|
||||||
|
type="radio"
|
||||||
|
:value="availableActor"
|
||||||
|
name="availableActors"
|
||||||
|
v-model="selectedActor"
|
||||||
|
:id="`availableActor-${availableActor.id}`"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="flex flex-wrap p-3 bg-white border border-gray-300 rounded-lg cursor-pointer hover:bg-gray-50 peer-checked:ring-primary peer-checked:ring-2 peer-checked:border-transparent"
|
||||||
|
:for="`availableActor-${availableActor.id}`"
|
||||||
|
>
|
||||||
<figure class="image is-48x48" v-if="availableActor.avatar">
|
<figure class="image is-48x48" v-if="availableActor.avatar">
|
||||||
<img
|
<img
|
||||||
class="image is-rounded"
|
class="image is-rounded"
|
||||||
|
@ -20,18 +39,14 @@
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</figure>
|
</figure>
|
||||||
<b-icon
|
<b-icon v-else size="is-large" icon="account-circle" />
|
||||||
class="media-left"
|
<div>
|
||||||
v-else
|
|
||||||
size="is-large"
|
|
||||||
icon="account-circle"
|
|
||||||
/>
|
|
||||||
<div class="media-content">
|
|
||||||
<h3>{{ availableActor.name }}</h3>
|
<h3>{{ availableActor.name }}</h3>
|
||||||
<small>{{ `@${availableActor.preferredUsername}` }}</small>
|
<small>{{ `@${availableActor.preferredUsername}` }}</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</label>
|
||||||
</b-radio-button>
|
</li>
|
||||||
|
</transition-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="organizer-picker" v-if="selectedActor">
|
<div
|
||||||
|
class="bg-white border border-gray-300 rounded-lg cursor-pointer"
|
||||||
|
v-if="selectedActor"
|
||||||
|
>
|
||||||
<!-- If we have a current actor (inline) -->
|
<!-- If we have a current actor (inline) -->
|
||||||
<div
|
<div
|
||||||
v-if="inline && selectedActor.id"
|
v-if="inline && selectedActor.id"
|
||||||
|
|
Loading…
Reference in a new issue