Added fancier active states

ref #93
This commit is contained in:
Nicolai Ort 2021-03-12 18:23:53 +01:00
parent 27a1f57ed3
commit 95b1490f84

View File

@ -60,7 +60,7 @@
<th <th
scope="col" scope="col"
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
{$_('enabled')} {$_('status')}
</th> </th>
<th scope="col" class="relative px-6 py-3"> <th scope="col" class="relative px-6 py-3">
<span class="sr-only">{$_('action')}</span> <span class="sr-only">{$_('action')}</span>
@ -97,12 +97,14 @@
</td> </td>
<td class="px-6 py-4 whitespace-nowrap"> <td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center"> <div class="flex items-center">
<div class="ml-4"> {#if s.enabled}
<div class="text-sm font-medium text-gray-900"> <span
{s.enabled.toString()} class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">{$_('active')}</span>
</div> {:else}
<span
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">{$_('inactive')}</span>
{/if}
</div> </div>
</div>
</td> </td>
{#if active_deletes[s.id] === true} {#if active_deletes[s.id] === true}
<td <td