mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-06-07 22:13:32 +02:00
ui tweaks to make it purty
This commit is contained in:
@@ -18,6 +18,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
main {
|
||||||
|
max-width: 960px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="mdc-typography">
|
<div class="mdc-typography">
|
||||||
|
|||||||
+15
-3
@@ -28,19 +28,29 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
margin-right: 40px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download {
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<Paper elevation="4" style="background-color: {color}; margin-bottom: 2em;" class="card">
|
<Paper elevation="8" style="background-color: {color}; margin-bottom: 2em;" class="card">
|
||||||
|
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<IconButton class="float-right material-icons" on:click={onEdit}>edit</IconButton>
|
<IconButton class="float-right material-icons" on:click={onEdit}>edit</IconButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<i class="material-icons" aria-hidden="true">devices</i>
|
|
||||||
|
|
||||||
<img src="/api/v1/users/{user}/clients/{clientId}?format=qrcode" class="qrcode float-right" alt="Mobile client config"/>
|
<img src="/api/v1/users/{user}/clients/{clientId}?format=qrcode" class="qrcode float-right" alt="Mobile client config"/>
|
||||||
|
|
||||||
<h3 class="card-title">{dev.Name}</h3>
|
<i class="material-icons" aria-hidden="true">devices</i>
|
||||||
|
<h3 class="mdc-typography--headline5">
|
||||||
|
{dev.Name}</h3>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>IP</dt>
|
<dt>IP</dt>
|
||||||
@@ -49,5 +59,7 @@
|
|||||||
<dd>{dev.PublicKey}</dd>
|
<dd>{dev.PublicKey}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
<div class="download">
|
||||||
<Button href="/api/v1/users/{user}/clients/{clientId}?format=config" variant="raised"><Label>Download Config</Label></Button>
|
<Button href="/api/v1/users/{user}/clients/{clientId}?format=config" variant="raised"><Label>Download Config</Label></Button>
|
||||||
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|||||||
@@ -29,9 +29,15 @@
|
|||||||
.newClient {
|
.newClient {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2 small {
|
||||||
|
display: block;
|
||||||
|
clear: left;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h2>My Clients <small class="text-muted">({user})</small></h2>
|
<h2 class="mdc-typography--headline2">My Clients <small class="mdc-typography--headline5">({user})</small></h2>
|
||||||
|
|
||||||
{#each clients as dev}
|
{#each clients as dev}
|
||||||
<Client user={user} client={dev}/>
|
<Client user={user} client={dev}/>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import Fab, {Label, Icon} from '@smui/fab';
|
||||||
import Dialog, {Actions, InitialFocus} from '@smui/dialog';
|
import Dialog, {Actions, InitialFocus} from '@smui/dialog';
|
||||||
import Textfield, {Input, Textarea} from '@smui/textfield';
|
import Textfield, {Input, Textarea} from '@smui/textfield';
|
||||||
import Icon from '@smui/textfield/icon/index';
|
|
||||||
import HelperText from '@smui/textfield/helper-text/index';
|
import HelperText from '@smui/textfield/helper-text/index';
|
||||||
import Button, {Group, GroupItem, Label} from '@smui/button';
|
import Button, {Group, GroupItem} from '@smui/button';
|
||||||
import Paper, {Title, Subtitle, Content} from '@smui/paper';
|
import Paper, {Title, Subtitle, Content} from '@smui/paper';
|
||||||
|
|
||||||
import Cookie from "cookie-universal";
|
import Cookie from "cookie-universal";
|
||||||
@@ -45,13 +45,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function handleDeleteClick(event) {
|
function handleBackClick(event) {
|
||||||
const res = await fetch(clientUrl, {
|
|
||||||
method: "DELETE",
|
|
||||||
});
|
|
||||||
await res;
|
|
||||||
navigate("/", { replace: true });
|
navigate("/", { replace: true });
|
||||||
console.log("Delete!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteHandler(e) {
|
async function deleteHandler(e) {
|
||||||
@@ -71,10 +66,24 @@
|
|||||||
onMount(getClient);
|
onMount(getClient);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="container">
|
<style>
|
||||||
|
.float-left {
|
||||||
|
float: left;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="float-left">
|
||||||
|
<Fab color="primary" on:click={handleBackClick}><Icon class="material-icons">arrow_back</Icon></Fab>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3 class="mdc-typography--headline3">Client Properties <small class="text-muted">({client.Name})</small></h3>
|
<h3 class="mdc-typography--headline3">Client Properties <small class="text-muted">({client.Name})</small></h3>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
<form on:submit|preventDefault={handleSubmit}>
|
<form on:submit|preventDefault={handleSubmit}>
|
||||||
|
|
||||||
<div class="margins">
|
<div class="margins">
|
||||||
|
|||||||
Reference in New Issue
Block a user