feat: Variables programáticas en templates

Permite definir variables en templates con sintaxis {{nombre🏷️default}}
- Auto-detección de variables al guardar templates
- Drawer para completar valores al cargar template con variables
- Badge mostrando cantidad de variables en tarjeta de template
- Resolución de variables antes de cargar en cola
This commit is contained in:
2025-11-25 01:57:24 -06:00
parent 05bf0e3c91
commit c7c32d8c54
6 changed files with 214 additions and 13 deletions

View File

@@ -51,10 +51,13 @@ function formatDate(date: string | number) {
>
{{ template.description }}
</p>
<div class="flex items-center gap-2 mt-2">
<div class="flex items-center gap-2 mt-2 flex-wrap">
<UBadge variant="subtle" size="xs">
{{ template.operations.length }} comandos
</UBadge>
<UBadge v-if="template.variables?.length" variant="subtle" size="xs" color="primary">
{{ template.variables.length }} {{ template.variables.length === 1 ? 'variable' : 'variables' }}
</UBadge>
<span class="text-xs text-gray-400 dark:text-gray-500">
{{ formatDate(template.updatedAt) }}
</span>