diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index 89246a73..739676fb 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -141,7 +141,7 @@ ${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : '' createdAt: new Date(client.createdAt), updatedAt: new Date(client.updatedAt), allowedIPs: client.allowedIPs, - + downloadableConfig: 'privateKey' in client, persistentKeepalive: null, latestHandshakeAt: null, transferRx: null, @@ -196,8 +196,9 @@ ${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : '' const config = await this.getConfig(); const client = await this.getClient({ clientId }); - return `[Interface] -PrivateKey = ${client.privateKey} + return ` +[Interface] +PrivateKey = ${client.privateKey ? `${client.privateKey}` : 'REPLACE_ME'} Address = ${client.address}/24 ${WG_DEFAULT_DNS ? `DNS = ${WG_DEFAULT_DNS}\n` : ''}\ ${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\ diff --git a/src/tailwind.config.js b/src/tailwind.config.js index 8070b0cd..33ba6746 100644 --- a/src/tailwind.config.js +++ b/src/tailwind.config.js @@ -16,4 +16,15 @@ module.exports = { '2xl': '1536px', }, }, + plugins: [ + function addDisabledClass({ addUtilities }) { + const newUtilities = { + '.is-disabled': { + opacity: '0.25', + cursor: 'default', + }, + }; + addUtilities(newUtilities); + }, + ], }; diff --git a/src/www/css/app.css b/src/www/css/app.css index 3064646a..00837d4c 100644 --- a/src/www/css/app.css +++ b/src/www/css/app.css @@ -1387,6 +1387,11 @@ video { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); } +.is-disabled { + opacity: 0.25; + cursor: default; +} + .last\:border-b-0:last-child { border-bottom-width: 0px; } diff --git a/src/www/index.html b/src/www/index.html index 9311ef0c..826cf526 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -254,9 +254,14 @@ -