refac: groups ui
This commit is contained in:
1 parent
96ca47ac9f
commit
914c7ba876
2 files changed
+172
-166
No files matched your search
@@ -8,7 +8,6 @@
|
||||
import { deleteGroupById, updateGroupById } from '$lib/apis/groups';
|
||||
|
||||
import Pencil from '$lib/components/icons/Pencil.svelte';
|
||||
import User from '$lib/components/icons/User.svelte';
|
||||
import EditGroupModal from './EditGroupModal.svelte';
|
||||
|
||||
export let group = {
|
||||
@@ -63,26 +62,34 @@
|
||||
/>
|
||||
|
||||
<button
|
||||
class="flex items-center gap-3 justify-between px-1 text-xs w-full transition"
|
||||
class="flex space-x-4 cursor-pointer text-left w-full px-3.5 py-2.5 dark:hover:bg-gray-850/50 hover:bg-gray-50 transition rounded-2xl"
|
||||
on:click={() => {
|
||||
showEdit = true;
|
||||
}}
|
||||
>
|
||||
<div class="flex items-center gap-1.5 w-full font-medium flex-1">
|
||||
<div class="line-clamp-1">
|
||||
{group.name}
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex-1">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="text-sm font-medium line-clamp-1">{group.name}</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-1.5 w-fit font-medium text-right justify-end">
|
||||
{group?.member_count}
|
||||
<div class="flex items-center gap-2 mt-0.5 line-clamp-1">
|
||||
<div class="text-xs text-gray-500 shrink-0">
|
||||
{$i18n.t('{{COUNT}} members', { COUNT: group?.member_count ?? 0 })}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<User className="size-3.5" />
|
||||
</div>
|
||||
{#if group?.description}
|
||||
<div class="text-xs text-gray-500 line-clamp-1">
|
||||
{group.description}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" rounded-lg p-1 hover:bg-gray-100 dark:hover:bg-gray-850 transition">
|
||||
<Pencil className="size-3.5" />
|
||||
<div class="flex self-center ml-2">
|
||||
<Pencil className="size-3.5" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
Reference in new issue
Block a user