BLOG-140 Label management (list and create) #144

Merged
squid merged 6 commits from BLOG-140_label_management into main 2025-10-15 12:21:42 +08:00
Showing only changes of commit aed4102878 - Show all commits

View File

@ -26,6 +26,7 @@
const state = await createPost(params);
if (state.isSuccess()) {
loadPosts({ showUnpublished: true });
toast.success(`Post created successfully with ID: ${state.data.id}`);
} else if (state.isError()) {
toast.error('Failed to create post', {
@ -56,13 +57,15 @@
{#each postsListedState.data as postInfo (postInfo.id)}
<TableRow>
<TableCell>{postInfo.id}</TableCell>
<TableCell>{postInfo.title}</TableCell>
<TableCell class="flex flex-row flex-wrap gap-2">
<TableCell><span class="text-wrap">{postInfo.title}</span></TableCell>
<TableCell>
<div class="flex flex-row flex-wrap gap-2">
{#each postInfo.labels as label (label.id)}
<PostLabel {label} />
{/each}
</div>
</TableCell>
<TableCell>{postInfo.formattedPublishedTime || '---'}</TableCell>
<TableCell>{postInfo.formattedPublishedTime}</TableCell>
</TableRow>
{/each}
{/if}