Fixed RLS and added visual feedback on dashboard

This commit is contained in:
Alexis
2025-03-05 16:34:53 +01:00
parent 282aabb7fa
commit 8848fa75b1
4 changed files with 29 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { PhFilePlus, PhPencil, PhPencilSimpleLine, PhTrash } from "@phosphor-icons/vue";
import { PhArchive, PhFileDashed, PhFilePlus, PhPencil, PhPencilSimpleLine, PhTrash } from "@phosphor-icons/vue";
import type { World } from "~/models/World";
import { DateTime } from "luxon";
@@ -41,8 +41,18 @@ const updatedAt = computed<string>(() => props.world.updatedAt ? DateTime.fromIS
' hover:bg-slate-50 dark:hover:text-slate-900 dark:hover:bg-slate-300 dark:border-slate-500 dark:focus-within:outline-slate-100': world.color === 'white',
}"
>
<UiCardHeader>
<UiCardTitle>{{ world.name }}</UiCardTitle>
<UiCardHeader class="gap-4">
<UiCardTitle>
{{ world.name }}
</UiCardTitle>
<div v-if="world.state === 'draft'" class="flex items-center gap-1 text-sm">
<PhFileDashed size="20" weight="fill" />
<span>{{ $t('ui.contentState.draft') }}</span>
</div>
<div v-if="world.state === 'archived'" class="flex items-center gap-1 text-sm">
<PhArchive size="20" weight="fill" />
<span>{{ $t('ui.contentState.archived') }}</span>
</div>
</UiCardHeader>
<UiCardContent>
<p class="italic">{{ world.description }}</p>

View File

@@ -48,7 +48,7 @@ function handleClose() {
<PhX size="20" />
</UiButton>
<WorldFormEdit :world @on-changed-name="onChangedName" @on-close="handleClose" />
<WorldFormUpdate :world @on-changed-name="onChangedName" @on-close="handleClose" />
</UiAlertDialogContent>
</UiAlertDialog>
</template>