mirror of https://github.com/wg-easy/wg-easy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
701 B
25 lines
701 B
<template>
|
|
<button
|
|
:disabled="!client.downloadableConfig"
|
|
class="align-middle bg-gray-100 dark:bg-neutral-600 dark:text-neutral-300 p-2 rounded transition"
|
|
:class="{
|
|
'hover:bg-red-800 dark:hover:bg-red-800 hover:text-white dark:hover:text-white':
|
|
client.downloadableConfig,
|
|
'is-disabled': !client.downloadableConfig,
|
|
}"
|
|
:title="!client.downloadableConfig ? $t('noPrivKey') : $t('showQR')"
|
|
@click="
|
|
modalStore.qrcode = `./api/wireguard/client/${client.id}/qrcode.svg`
|
|
"
|
|
>
|
|
<IconsQRCode class="w-5" />
|
|
</button>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
defineProps<{
|
|
client: LocalClient;
|
|
}>();
|
|
|
|
const modalStore = useModalStore();
|
|
</script>
|
|
|