Browse Source

fix styling issue, fix formatting

pull/1250/head
Bernd Storath 9 months ago
parent
commit
1e7ae105f7
  1. 6
      .vscode/settings.json
  2. 2
      src/app.vue
  3. 14
      src/server/utils/WireGuard.ts

6
.vscode/settings.json

@ -2,5 +2,9 @@
"editor.tabSize": 2,
"editor.useTabStops": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
"editor.formatOnSave": true,
"vue.format.enable": false,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}

2
src/app.vue

@ -190,7 +190,7 @@
>
<svg
inline
class="w-4 md:mr-2 size-6"
class="w-4 md:mr-2"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"

14
src/server/utils/WireGuard.ts

@ -77,7 +77,7 @@ class WireGuard {
const config = await this.__buildConfig();
await this.__saveConfig(config);
await exec('wg-quick down wg0').catch(() => { });
await exec('wg-quick down wg0').catch(() => {});
await exec('wg-quick up wg0').catch((err) => {
if (
err &&
@ -130,8 +130,9 @@ PostDown = ${WG_POST_DOWN}
# Client: ${client.name} (${clientId})
[Peer]
PublicKey = ${client.publicKey}
${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
}AllowedIPs = ${client.address}/32`;
${
client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
}AllowedIPs = ${client.address}/32`;
}
debug('Config saving...');
@ -232,8 +233,9 @@ ${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\
[Peer]
PublicKey = ${config.server.publicKey}
${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
}AllowedIPs = ${WG_ALLOWED_IPS}
${
client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
}AllowedIPs = ${WG_ALLOWED_IPS}
PersistentKeepalive = ${WG_PERSISTENT_KEEPALIVE}
Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
}
@ -383,7 +385,7 @@ Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
// Shutdown wireguard
async Shutdown() {
await exec('wg-quick down wg0').catch(() => { });
await exec('wg-quick down wg0').catch(() => {});
}
}

Loading…
Cancel
Save