feat : add role guest
Auto Tag Develop / tag (push) Has been cancelled

This commit is contained in:
Lethary
2026-05-05 15:51:58 +02:00
parent 1c0cdeb085
commit fa1f0ccaa4
15 changed files with 72 additions and 21 deletions
@@ -18,7 +18,8 @@
<div
v-for="item in items"
:key="item.id"
class="grid gap-4 px-4 py-3 text-sm hover:bg-slate-50 cursor-pointer border-t border-slate-200"
class="grid gap-4 px-4 py-3 text-sm border-t border-slate-200"
:class="canOpenItems ? 'hover:bg-slate-50 cursor-pointer' : ''"
:style="{ gridTemplateColumns: gridCols }"
role="button"
tabindex="0"
@@ -50,8 +51,10 @@ const props = withDefaults(defineProps<{
items: any[]
routePrefix: string
showActions?: boolean
canOpenItems?: boolean
}>(), {
showActions: false
showActions: false,
canOpenItems: true
})
const router = useRouter()
@@ -62,6 +65,9 @@ const gridCols = computed(() => {
})
const goToItem = (id: number) => {
if (!props.canOpenItems) {
return
}
router.push(`${props.routePrefix}/${id}`)
}