mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-19 05:13:30 +02:00
Implemented downloading client config
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { link } from "svelte-routing";
|
||||
|
||||
export let client;
|
||||
export let user;
|
||||
|
||||
let clientId = client[0];
|
||||
let dev = client[1];
|
||||
@@ -15,6 +16,8 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a href="/client/{clientId}" use:link role="button" class="btn btn-secondary material-icons float-right">edit</a>
|
||||
|
||||
<h4 class="card-title">{client.Name}</h4>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">IP</dt>
|
||||
@@ -23,8 +26,8 @@
|
||||
<dd class="col-sm-10">{dev.PublicKey}</dd>
|
||||
</dl>
|
||||
|
||||
<a href="/client/{clientId}/config" role="button" class="btn btn-primary">Download Config</a>
|
||||
<a href="/client/{clientId}" use:link role="button" class="btn btn-primary material-icons float-right">edit</a>
|
||||
<a href="/api/v1/users/{user}/clients/{clientId}?format=config" role="button" class="btn btn-raised btn-primary">Download Config</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<ul class="list-unstyled">
|
||||
{#each clients as dev}
|
||||
<li><Client client={dev}/></li>
|
||||
<li><Client user={user} client={dev}/></li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -17,13 +17,12 @@
|
||||
|
||||
<h2>Edit Client {client.Name}</h2>
|
||||
<form>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="name" class="bmd-label-floating">Client Name</label>
|
||||
<input type="email" class="form-control" id="name" value={client.Name}>
|
||||
<span class="bmd-help">Friendly name of client.</span>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<p>
|
||||
{client}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user