diff --git a/src/components/ApiKey.vue b/src/components/ApiKey.vue index 362bf9d..fbe4381 100644 --- a/src/components/ApiKey.vue +++ b/src/components/ApiKey.vue @@ -10,8 +10,27 @@ @click="$emit('delete', apiKey)" /> + + +
+ +
+ + ApiKey wird nur einmalig angezeigt. Bitte kopieren! + +
- + @@ -28,8 +47,14 @@ export default defineComponent({ emits: { delete: (apiKey: FG.ApiKey) => !!apiKey, }, - setup() { - return {}; + setup(props) { + async function copyApiKey() { + await navigator.clipboard.writeText(props.apiKey.token); + console.log('copying api key', props.apiKey.token); + } + return { + copyApiKey, + }; }, });