17 lines
832 B
Vue
17 lines
832 B
Vue
<script setup lang="ts">
|
|
import { Handle, Position } from "@vue-flow/core";
|
|
|
|
import AddStepMenu from "./AddStepMenu.vue";
|
|
|
|
defineProps<{ data: { branch?: string; lane?: string; insertAfter?: unknown; types: string[]; editable: boolean; onInsert: (type: string) => void } }>();
|
|
</script>
|
|
|
|
<template>
|
|
<div class="relative flex w-8 justify-center">
|
|
<Handle type="target" :position="Position.Top" class="!opacity-0" />
|
|
<AddStepMenu v-if="data.editable && data.insertAfter" :types="data.types" :label="data.branch ? `Add a step to ${data.branch}` : 'Add a step at the end'" @pick="data.onInsert" />
|
|
<Handle v-if="data.lane" type="source" :position="Position.Bottom" class="!opacity-0" />
|
|
<span v-if="!(data.editable && data.insertAfter)" class="size-2 rounded-full bg-border" aria-hidden="true" />
|
|
</div>
|
|
</template>
|