|
6 | 6 | <p class="template-device">{{ template.brand }} {{ template.model }}</p> |
7 | 7 | </div> |
8 | 8 | <div class="template-actions"> |
9 | | - <button class="icon-btn" @click="emit('edit', name, template)"> |
| 9 | + <button |
| 10 | + class="icon-btn" |
| 11 | + type="button" |
| 12 | + :title="t('templates.actions.export')" |
| 13 | + :aria-label="t('templates.actions.export')" |
| 14 | + @click="emit('export', name, template)" |
| 15 | + > |
| 16 | + <Copy :size="18" /> |
| 17 | + </button> |
| 18 | + <button |
| 19 | + class="icon-btn" |
| 20 | + type="button" |
| 21 | + :title="t('common.edit')" |
| 22 | + :aria-label="t('common.edit')" |
| 23 | + @click="emit('edit', name, template)" |
| 24 | + > |
10 | 25 | <Edit2 :size="18" /> |
11 | 26 | </button> |
12 | | - <button class="icon-btn danger" @click="emit('delete', name)"> |
| 27 | + <button |
| 28 | + class="icon-btn danger" |
| 29 | + type="button" |
| 30 | + :title="t('common.delete')" |
| 31 | + :aria-label="t('common.delete')" |
| 32 | + @click="emit('delete', name)" |
| 33 | + > |
13 | 34 | <Trash2 :size="18" /> |
14 | 35 | </button> |
15 | 36 | </div> |
|
88 | 109 | </template> |
89 | 110 |
|
90 | 111 | <script setup lang="ts"> |
91 | | -import { Edit2, Trash2 } from 'lucide-vue-next' |
| 112 | +import { Copy, Edit2, Trash2 } from 'lucide-vue-next' |
92 | 113 | import { toRefs } from 'vue' |
93 | 114 | import { useI18n } from '../../utils/i18n' |
94 | 115 | import type { Template } from '../../types' |
95 | 116 |
|
96 | 117 | const props = defineProps<{ name: string; template: Template }>() |
97 | 118 | const { name, template } = toRefs(props) |
98 | | -const emit = defineEmits<{ edit: [string, Template]; delete: [string] }>() |
| 119 | +const emit = defineEmits<{ export: [string, Template]; edit: [string, Template]; delete: [string] }>() |
99 | 120 |
|
100 | 121 | const { t } = useI18n() |
101 | 122 | </script> |
|
0 commit comments