forked from mirrors/homebox
31b34241e0
* change /content/ -> /homebox/ * add cache to code generators * update env variables to set data storage * update env variables * set env variables in prod container * implement attachment post route (WIP) * get attachment endpoint * attachment download * implement string utilities lib * implement generic drop zone * use explicit truncate * remove clean dir * drop strings composable for lib * update item types and add attachments * add attachment API * implement service context * consolidate API code * implement editing attachments * implement upload limit configuration * improve error handling * add docs for max upload size * fix test cases
37 lines
999 B
Vue
37 lines
999 B
Vue
<template>
|
|
<NuxtLink
|
|
class="group card bg-neutral text-neutral-content hover:bg-primary transition-colors duration-300"
|
|
:to="`/item/${item.id}`"
|
|
>
|
|
<div class="card-body py-4 px-6">
|
|
<h2 class="card-title">
|
|
<Icon name="mdi-package-variant" />
|
|
{{ item.name }}
|
|
</h2>
|
|
<p>{{ description }}</p>
|
|
<div class="flex gap-2 flex-wrap justify-end">
|
|
<LabelChip
|
|
v-for="label in item.labels"
|
|
:key="label.id"
|
|
:label="label"
|
|
class="badge-primary group-hover:badge-secondary"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</NuxtLink>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ItemOut, ItemSummary } from "~~/lib/api/types/data-contracts";
|
|
import { truncate } from "~~/lib/strings";
|
|
|
|
const props = defineProps({
|
|
item: {
|
|
type: Object as () => ItemOut | ItemSummary,
|
|
required: true,
|
|
},
|
|
});
|
|
const description = computed(() => {
|
|
return truncate(props.item.description, 80);
|
|
});
|
|
</script>
|