FEAT: всплывающее сообщение при копировании конфига
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-09-08 23:45:27 +03:00
parent c1d87d72ac
commit 05ed72c811
+17 -1
View File
@@ -10,6 +10,7 @@ const KB_UNIT_MAP = {
}
const route = useRoute()
const toast = useToast()
const tab = ref('0')
const tabs = ref([
@@ -121,12 +122,27 @@ const formatValue = (value) => {
// return formatted
return `${result.value}${result.unit}`
}
const onCopyConfig = () => {
copy(config)
toast.add({
title: 'Скопировано',
description: 'Конфигурация скопирована успешно',
duration: 7500,
icon: 'lucide:copy',
})
}
</script>
<template>
<section class="space-y-4 min-w-0 w-full">
<UTabs v-model="tab" :content="false" :items="tabs" class="w-full" />
<pre class="w-full overflow-x-auto whitespace-pre">{{ config }}</pre>
<UButton label="Copy config" block @click="copy(config)" />
<UButton
label="Копировать конфигурацию"
block
icon="lucide:copy"
@click="onCopyConfig"
/>
</section>
</template>