mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-05 20:42:23 -07:00
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Docker Nightly Production / Backend Server Tests (push) Waiting to run
Docker Nightly Production / Frontend Tests (push) Waiting to run
Docker Nightly Production / Build Package (push) Waiting to run
Docker Nightly Production / Build Tagged Release (push) Blocked by required conditions
Docker Nightly Production / Notify Discord (push) Blocked by required conditions
Release Drafter / ✏️ Draft release (push) Waiting to run
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
64 lines
1.4 KiB
Vue
64 lines
1.4 KiB
Vue
<template>
|
|
<div class="d-flex justify-space-between align-center mx-2">
|
|
<div class="handle">
|
|
<span class="mr-2">
|
|
<v-icon :color="labelColor">
|
|
{{ $globals.icons.tags }}
|
|
</v-icon>
|
|
</span>
|
|
{{ modelValue.label.name }}
|
|
</div>
|
|
<div
|
|
style="min-width: 72px"
|
|
class="ml-auto text-right"
|
|
>
|
|
<v-menu
|
|
offset-x
|
|
start
|
|
min-width="125px"
|
|
>
|
|
<template #activator="{ props }">
|
|
<v-btn
|
|
size="small"
|
|
class="ml-2 handle"
|
|
icon
|
|
v-bind="props"
|
|
>
|
|
<v-icon>
|
|
{{ $globals.icons.arrowUpDown }}
|
|
</v-icon>
|
|
</v-btn>
|
|
</template>
|
|
</v-menu>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import type { ShoppingListMultiPurposeLabelOut } from "~/lib/api/types/household";
|
|
|
|
export default defineNuxtComponent({
|
|
props: {
|
|
modelValue: {
|
|
type: Object as () => ShoppingListMultiPurposeLabelOut,
|
|
required: true,
|
|
},
|
|
useColor: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
},
|
|
setup(props, context) {
|
|
const labelColor = ref<string | undefined>(props.useColor ? props.modelValue.label.color : undefined);
|
|
|
|
function contextHandler(event: string) {
|
|
context.emit(event);
|
|
}
|
|
|
|
return {
|
|
contextHandler,
|
|
labelColor,
|
|
};
|
|
},
|
|
});
|
|
</script>
|