minor improvements

This commit is contained in:
Yuri Tatishchev 2024-12-22 19:45:46 -08:00
parent 3909281bc7
commit 5e3772d39b
Signed by: CaZzzer
GPG Key ID: E0EBF441EA424369
6 changed files with 4 additions and 8 deletions

View File

@ -9,7 +9,7 @@
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" /> <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" /> <option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" /> <option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" /> <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" /> <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" /> <option name="SPACES_WITHIN_IMPORTS" value="true" />
</JSCodeStyleSettings> </JSCodeStyleSettings>
@ -120,7 +120,7 @@
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" /> <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" /> <option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" /> <option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" /> <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" /> <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" /> <option name="SPACES_WITHIN_IMPORTS" value="true" />
</TypeScriptCodeStyleSettings> </TypeScriptCodeStyleSettings>

View File

@ -1,7 +1,6 @@
{ {
"useTabs": true, "useTabs": true,
"singleQuote": true, "singleQuote": true,
"trailingComma": "none",
"printWidth": 100, "printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [ "overrides": [

View File

@ -1,7 +1,5 @@
import { drizzle } from 'drizzle-orm/libsql'; import { drizzle } from 'drizzle-orm/libsql';
import assert from 'node:assert';
import * as schema from './schema'; import * as schema from './schema';
import { DATABASE_URL } from '$env/static/private'; import { DATABASE_URL } from '$env/static/private';
assert(DATABASE_URL, 'DATABASE_URL is not set');
export const db= drizzle(DATABASE_URL, { schema }); export const db= drizzle(DATABASE_URL, { schema });

View File

@ -26,7 +26,6 @@ export const GET: RequestHandler = async (event) => {
'type': ['peer'], 'type': ['peer'],
}), }),
}; };
console.log('Fetching peers from OPNsense WireGuard API: ', apiUrl, options)
const res = await fetch(apiUrl, options); const res = await fetch(apiUrl, options);
const peers = await res.json() as OpnsenseWgPeers; const peers = await res.json() as OpnsenseWgPeers;

View File

@ -26,7 +26,7 @@
<Table.Cell class="truncate max-w-[10ch]">{client.privateKey}</Table.Cell> <Table.Cell class="truncate max-w-[10ch]">{client.privateKey}</Table.Cell>
<Table.Cell class="truncate max-w-[10ch]">{client.preSharedKey}</Table.Cell> <Table.Cell class="truncate max-w-[10ch]">{client.preSharedKey}</Table.Cell>
<Table.Cell> <Table.Cell>
<Badge class="bg-background" variant="secondary">{client.ipAllocation.id}</Badge> <Badge class="bg-background select-auto" variant="secondary">{client.ipAllocation.id}</Badge>
</Table.Cell> </Table.Cell>
</Table.Row> </Table.Row>
{/each} {/each}

View File

@ -54,7 +54,7 @@
<Table.Cell> <Table.Cell>
<div class="flex flex-wrap gap-1"> <div class="flex flex-wrap gap-1">
{#each peer['allowed-ips'].split(',') as addr} {#each peer['allowed-ips'].split(',') as addr}
<Badge class="bg-background" variant="secondary">{addr}</Badge> <Badge class="bg-background select-auto" variant="secondary">{addr}</Badge>
{/each} {/each}
</div> </div>
</Table.Cell> </Table.Cell>