insert auto-completed link button for mandarake

This commit is contained in:
nquidox 2025-10-12 14:42:14 +03:00
parent 4735899c39
commit 142a422052

View file

@ -1,6 +1,7 @@
<script setup>
import { ref, nextTick } from 'vue'
import { useMerchApi } from '@/api/merch.js'
import { BASE_MANDARAKE_LINK } from '@/main.js'
const { updateMerch } = useMerchApi()
@ -99,9 +100,19 @@ const confirmClearLink = async () => {
const cancel = () => {
emit('cancel-edit')
}
const insertAutoCompletedLink = () => {
tempValue.value = BASE_MANDARAKE_LINK+props.name
}
</script>
<template>
<div v-if="props.origin === 'mandarake'" class="center-button-container mb-10">
<n-button type="warning" class="center-button" @click="insertAutoCompletedLink"
>Insert auto-completed link</n-button
>
</div>
<div class="editing-area">
<n-input
v-model:value="tempValue"