allow clients with no privateKey

see https://github.com/wg-easy/wg-easy/discussions/791

I disabled the download from the frontend.
If someone tries to manually call the API, the privateKey block is set to "REPLACE_ME" to indicate that this value must be set manually.
This commit is contained in:
Thomas Willems 2024-01-27 19:15:07 +01:00 committed by Philip H
parent b90941715c
commit 76c713499d
No known key found for this signature in database
GPG Key ID: DA39C2199C603FA5
2 changed files with 7 additions and 2 deletions

View File

@ -1371,6 +1371,11 @@ video {
transition-duration: 150ms;
}
.disabled-link {
opacity: 0.25;
cursor: default;
}
.duration-200 {
transition-duration: 200ms;
}

View File

@ -258,7 +258,7 @@
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,
'inactive': !client.downloadableConfig
'opacity-25': !client.downloadableConfig
}"
:title="!client.downloadableConfig ? $t('noPrivKey') : $t('showQR')"
@click="qrcode = `./api/wireguard/client/${client.id}/qrcode.svg`">
@ -276,7 +276,7 @@
class="align-middle inline-block 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,
'inactive': !client.downloadableConfig
'disabled-link': !client.downloadableConfig
}"
:title="!client.downloadableConfig ? $t('noPrivKey') : $t('downloadConfig')"
@click="if(!client.downloadableConfig) { $event.preventDefault(); }">