mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
## Summary Align color names and organize style.css some more ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6337-Style-Token-renaming-and-style-organization-29a6d73d365081b69f25ce1298c67fdc) by [Unito](https://www.unito.io)
37 lines
829 B
Vue
37 lines
829 B
Vue
<template>
|
|
<Button
|
|
v-tooltip="
|
|
copied ? $t('chatHistory.copiedTooltip') : $t('chatHistory.copyTooltip')
|
|
"
|
|
text
|
|
rounded
|
|
class="h-4! w-6! p-1! text-smoke-400 transition hover:text-smoke-600 hover:dark-theme:text-smoke-200"
|
|
pt:icon:class="text-xs!"
|
|
:icon="copied ? 'pi pi-check' : 'pi pi-copy'"
|
|
:aria-label="
|
|
copied ? $t('chatHistory.copiedTooltip') : $t('chatHistory.copyTooltip')
|
|
"
|
|
@click="handleCopy"
|
|
/>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Button from 'primevue/button'
|
|
import { ref } from 'vue'
|
|
|
|
const { text } = defineProps<{
|
|
text: string
|
|
}>()
|
|
|
|
const copied = ref(false)
|
|
|
|
const handleCopy = async () => {
|
|
if (!text) return
|
|
await navigator.clipboard.writeText(text)
|
|
copied.value = true
|
|
setTimeout(() => {
|
|
copied.value = false
|
|
}, 1024)
|
|
}
|
|
</script>
|