Spaces:
Paused
Paused
ML Intern deploy
Deploy httpSMS gateway to Hugging Face Spaces (Docker SDK): nginx :7860 -> Go API :8000, Nuxt SPA, Android APK, bootstrap-mode entrypoint
83a59ca Download web/app/components/CopyButton.vue from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/web/app/components/CopyButton.vue
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway/web/app/components/CopyButton.vue
-
curl -L -o CopyButton.vue https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/web/app/components/CopyButton.vue
1.09 kB
| <script setup lang="ts"> | |
| import { useDisplay } from 'vuetify' | |
| import { mdiContentCopy } from '@mdi/js' | |
| const props = withDefaults( | |
| defineProps<{ | |
| value: string | |
| color?: string | |
| block?: boolean | |
| large?: boolean | |
| copyText?: string | |
| notificationText?: string | |
| }>(), | |
| { | |
| color: 'default', | |
| block: false, | |
| large: false, | |
| copyText: 'Copy', | |
| notificationText: 'Copied', | |
| }, | |
| ) | |
| const { smAndDown } = useDisplay() | |
| const notificationsStore = useNotificationsStore() | |
| const disabled = ref(false) | |
| async function copy() { | |
| disabled.value = true | |
| await navigator.clipboard.writeText(props.value) | |
| notificationsStore.addNotification({ | |
| message: props.notificationText, | |
| type: 'success', | |
| }) | |
| setTimeout(() => { | |
| disabled.value = false | |
| }, 5000) | |
| } | |
| </script> | |
| <template> | |
| <v-btn | |
| :disabled="disabled" | |
| :color="disabled ? 'default' : color" | |
| :size="smAndDown ? 'small' : large ? 'large' : 'default'" | |
| :block="block" | |
| variant="flat" | |
| @click="copy" | |
| > | |
| <v-icon start :icon="mdiContentCopy" /> | |
| {{ copyText }} | |
| </v-btn> | |
| </template> | |