Added actor merge comment.

This commit is contained in:
2026-07-13 03:58:29 +02:00
parent f42a48dbcc
commit 6e82d2af37
3 changed files with 24 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ const emit = defineEmits(['close', 'merged']);
const targetActor = ref(null);
const actorInput = ref(null);
const comment = ref(null);
const actorQuery = ref('');
const actorResults = ref([]);
const submitted = ref(false);
@@ -51,7 +52,9 @@ function getActorNames() {
async function merge() {
submitted.value = true;
await post(`/actors/${targetActor.value.id}/merge/${props.actors.map((actor) => actor.id).join(',')}`, null, {
await post(`/actors/${targetActor.value.id}/merge/${props.actors.map((actor) => actor.id).join(',')}`, {
comment: comment.value || null,
}, {
successFeedback: `Merged ${getActorNames()} into ${targetActor.value.name}`,
errorFeedback: `Failed to merge ${getActorNames()} into ${targetActor.value.name}`,
appendErrorMessage: true,
@@ -173,6 +176,13 @@ onMounted(() => {
</VDropdown>
</template>
<textarea
v-model="comment"
placeholder="Optional comment"
rows="2"
class="input comment"
/>
<div class="dialog-actions">
<Ellipsis v-if="submitted" />
@@ -216,6 +226,10 @@ onMounted(() => {
.input {
width: 100%;
&.comment {
flex-basis: auto;
}
}
.path {