mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 21:33:02 +01:00
* feat: migrate tools page and label generator to shadcn * chore: lint issues * feat: also do profile page * feat: shadcn 404 page * feat: login page shadcn * fix: daisyui ironically breaks the z height for the login page * feat: componentise the language selector and add it to the login page * feat: use nuxtlink * feat: card and table made more shadcn * feat: shadcn statscard * chore: lint * feat: shadcn labelchip and locationcard * feat: shadcn locations page * refactor: remove unused new item page * chore: lint * feat: shadcn item card * fix: wrapping of location and lint * feat: ctrl enter in text area in form submits form * feat: begin shadcn locations page and remove pageqrcode comp in favour of integrating it into labelmaker * chore: lint + remove unused code * fix: remove uneeded margin * feat: shadcn labels page and fix some issues with location * feat: shadcn scanner * chore: lint * feat: begin shadcning item pages * feat: shadcn maintenance page * feat: begin shadcn search page * fix: quick switch blurry text and crashing page when switching + incorrect z height for create menu * feat: finish shadcn search page * chore: lint * feat: shadcn edit item page * fix: quickmenumodal bug * feat: shadcn item details page * feat: remove all non-color related daisyui classes * fix: type error * fix: quick menu modal again :(
42 lines
1.3 KiB
Vue
42 lines
1.3 KiB
Vue
<script setup lang="ts">
|
|
import type { LabelOut, LabelSummary } from "~~/lib/api/types/data-contracts";
|
|
import MdiArrowUp from "~icons/mdi/arrow-up";
|
|
import MdiTagOutline from "~icons/mdi/tag-outline";
|
|
|
|
export type sizes = "sm" | "md" | "lg" | "xl";
|
|
defineProps({
|
|
label: {
|
|
type: Object as () => LabelOut | LabelSummary,
|
|
required: true,
|
|
},
|
|
size: {
|
|
type: String as () => sizes,
|
|
default: "md",
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<NuxtLink
|
|
class="group/label-chip flex gap-2 rounded-full bg-secondary text-secondary-foreground shadow transition duration-300 hover:bg-secondary/70"
|
|
:class="{
|
|
'p-4 py-1 text-base': size === 'lg',
|
|
'p-3 py-1 text-sm': size !== 'sm' && size !== 'lg',
|
|
'p-2 py-0.5 text-xs': size === 'sm',
|
|
}"
|
|
:to="`/label/${label.id}`"
|
|
>
|
|
<div class="relative">
|
|
<MdiTagOutline class="invisible" /><!-- hack to ensure the size is correct -->
|
|
|
|
<div
|
|
class="absolute inset-0 flex items-center justify-center transition-transform duration-300 group-hover/label-chip:rotate-90"
|
|
>
|
|
<MdiTagOutline class="group-hover/label-chip:hidden" />
|
|
<MdiArrowUp class="hidden group-hover/label-chip:block" />
|
|
</div>
|
|
</div>
|
|
{{ label.name.length > 20 ? `${label.name.substring(0, 20)}...` : label.name }}
|
|
</NuxtLink>
|
|
</template>
|