mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-07 13:32:21 -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>
67 lines
1.4 KiB
Vue
67 lines
1.4 KiB
Vue
<template>
|
|
<v-menu
|
|
offset-y
|
|
start
|
|
:bottom="!menuTop"
|
|
:nudge-bottom="!menuTop ? '5' : '0'"
|
|
:top="menuTop"
|
|
:nudge-top="menuTop ? '5' : '0'"
|
|
allow-overflow
|
|
close-delay="125"
|
|
open-on-hover
|
|
content-class="d-print-none"
|
|
>
|
|
<template #activator="{ props }">
|
|
<v-btn
|
|
:class="{ 'rounded-circle': fab }"
|
|
:small="fab"
|
|
:color="color"
|
|
:icon="!fab"
|
|
dark
|
|
v-bind="props"
|
|
@click.prevent
|
|
>
|
|
<v-icon>{{ $globals.icons.dotsVertical }}</v-icon>
|
|
</v-btn>
|
|
</template>
|
|
<v-list density="compact">
|
|
<v-list-item
|
|
v-for="(item, index) in items"
|
|
:key="index"
|
|
@click="$emit(item.event)"
|
|
>
|
|
<template #prepend>
|
|
<v-icon :color="item.color ? item.color : undefined">
|
|
{{ item.icon }}
|
|
</v-icon>
|
|
</template>
|
|
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
|
</v-list-item>
|
|
</v-list>
|
|
</v-menu>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import type { ContextMenuItem } from "~/composables/use-context-presents";
|
|
|
|
export default defineNuxtComponent({
|
|
props: {
|
|
items: {
|
|
type: Array as () => ContextMenuItem[],
|
|
required: true,
|
|
},
|
|
menuTop: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
fab: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
color: {
|
|
type: String,
|
|
default: "grey-darken-2",
|
|
},
|
|
},
|
|
});
|
|
</script>
|