28 lines
849 B
Vue
28 lines
849 B
Vue
<script setup>
|
|
import { Head } from '@inertiajs/vue3';
|
|
|
|
import PromptForm from '../../Components/PromptForm.vue';
|
|
|
|
defineProps({
|
|
initial: { type: Object, required: true },
|
|
suggestedTags: { type: Array, required: true },
|
|
promptId: { type: Number, required: true },
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<Head :title="`${initial.name} — Edit`" />
|
|
<div class="mx-auto max-w-2xl">
|
|
<h1 class="mb-1 text-xl font-semibold tracking-tight">Edit prompt</h1>
|
|
<p class="mb-5 text-sm text-slate-500">Update the template, description, or tags.</p>
|
|
<PromptForm
|
|
:initial="initial"
|
|
:suggested-tags="suggestedTags"
|
|
method="put"
|
|
:action="`/prompts/${promptId}`"
|
|
submit-label="Save changes"
|
|
:cancel-href="`/prompts/${promptId}`"
|
|
/>
|
|
</div>
|
|
</template>
|