|
@ -3,19 +3,98 @@ |
|
|
|
|
|
|
|
|
<head> |
|
|
<head> |
|
|
<title>WireGuard</title> |
|
|
<title>WireGuard</title> |
|
|
<link href="/css/vendor/tailwind.min.css" rel="stylesheet"> |
|
|
|
|
|
<link rel="manifest" href="manifest.json"> |
|
|
<link rel="manifest" href="manifest.json"> |
|
|
<link rel="icon" type="image/png" href="img/favicon.png"> |
|
|
<link rel="icon" type="image/png" href="img/favicon.png"> |
|
|
<link rel="apple-touch-icon" href="img/apple-touch-icon.png"> |
|
|
<link rel="apple-touch-icon" href="img/apple-touch-icon.png"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> |
|
|
<meta name="apple-mobile-web-app-capable" content="yes"> |
|
|
<meta name="apple-mobile-web-app-capable" content="yes"> |
|
|
|
|
|
<script src="https://cdn.tailwindcss.com"></script> |
|
|
|
|
|
<style> |
|
|
|
|
|
.popper { |
|
|
|
|
|
width: auto; |
|
|
|
|
|
background-color: #fafafa; |
|
|
|
|
|
color: #212121; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
padding: 2px; |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
border-radius: 3px; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
border: 1px #ebebeb solid; |
|
|
|
|
|
z-index: 200000; |
|
|
|
|
|
-moz-box-shadow: #3a3a3a 0 0 6px 0; |
|
|
|
|
|
-webkit-box-shadow: #3a3a3a 0 0 6px 0; |
|
|
|
|
|
box-shadow: #3a3a3a 0 0 6px 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper .popper__arrow { |
|
|
|
|
|
width: 0; |
|
|
|
|
|
height: 0; |
|
|
|
|
|
border-style: solid; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
margin: 5px |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=top] { |
|
|
|
|
|
margin-bottom: 5px |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=top] .popper__arrow { |
|
|
|
|
|
border-width: 5px 5px 0 5px; |
|
|
|
|
|
border-color: #fafafa transparent transparent transparent; |
|
|
|
|
|
bottom: -5px; |
|
|
|
|
|
left: calc(50% - 5px); |
|
|
|
|
|
margin-top: 0; |
|
|
|
|
|
margin-bottom: 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=bottom] { |
|
|
|
|
|
margin-top: 5px |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=bottom] .popper__arrow { |
|
|
|
|
|
border-width: 0 5px 5px 5px; |
|
|
|
|
|
border-color: transparent transparent #fafafa transparent; |
|
|
|
|
|
top: -5px; |
|
|
|
|
|
left: calc(50% - 5px); |
|
|
|
|
|
margin-top: 0; |
|
|
|
|
|
margin-bottom: 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=right] { |
|
|
|
|
|
margin-left: 5px |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=right] .popper__arrow { |
|
|
|
|
|
border-width: 5px 5px 5px 0; |
|
|
|
|
|
border-color: transparent #fafafa transparent transparent; |
|
|
|
|
|
left: -5px; |
|
|
|
|
|
top: calc(50% - 5px); |
|
|
|
|
|
margin-left: 0; |
|
|
|
|
|
margin-right: 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=left] { |
|
|
|
|
|
margin-right: 5px |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popper[x-placement^=left] .popper__arrow { |
|
|
|
|
|
border-width: 5px 0 5px 5px; |
|
|
|
|
|
border-color: transparent transparent transparent #fafafa; |
|
|
|
|
|
right: -5px; |
|
|
|
|
|
top: calc(50% - 5px); |
|
|
|
|
|
margin-left: 0; |
|
|
|
|
|
margin-right: 0 |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
</head> |
|
|
</head> |
|
|
|
|
|
|
|
|
<body class="bg-gray-50"> |
|
|
<body class="bg-gray-50"> |
|
|
|
|
|
|
|
|
<div id="app"> |
|
|
<div id="app"> |
|
|
|
|
|
|
|
|
<div class="container mx-auto max-w-3xl"> |
|
|
<div class="container mx-auto max-w-sm md:max-w-2xl lg:max-w-3xl"> |
|
|
|
|
|
|
|
|
<div v-if="authenticated === true"> |
|
|
<div v-if="authenticated === true"> |
|
|
<span v-if="requiresPassword" |
|
|
<span v-if="requiresPassword" |
|
@ -189,13 +268,12 @@ |
|
|
<div class="text-gray-400"> |
|
|
<div class="text-gray-400"> |
|
|
|
|
|
|
|
|
<!-- Enable/Disable --> |
|
|
<!-- Enable/Disable --> |
|
|
<div @click="disableClient(client)" v-if="client.enabled === true" title="Disable Client" |
|
|
<div class="relative inline-block align-middle group m-1 ml-5" title="Disable Client"> |
|
|
class="inline-block align-middle rounded-full w-10 h-6 mr-1 bg-red-800 cursor-pointer hover:bg-red-700 transition-all"> |
|
|
<input type="checkbox" |
|
|
<div class="rounded-full w-4 h-4 m-1 ml-5 bg-white"></div> |
|
|
class="z-20 cursor-pointer absolute left-1/2 -translate-x-1/2 w-full h-full peer appearance-none rounded-md" |
|
|
</div> |
|
|
:checked="client.enabled === true" @input="switchClientStatus(client)" /> |
|
|
<div @click="enableClient(client)" v-if="client.enabled === false" title="Enable Client" |
|
|
<span |
|
|
class="inline-block align-middle rounded-full w-10 h-6 mr-1 bg-gray-200 cursor-pointer hover:bg-gray-300 transition-all"> |
|
|
class="z-10 after:z-10 w-10 h-6 flex items-center flex-shrink-0 p-1 bg-gray-200 rounded-full duration-200 ease-in-out peer-checked:bg-red-800 group-hover:bg-gray-300 after:w-4 after:h-4 after:bg-white after:rounded-full after:duration-200 peer-checked:after:translate-x-4"></span> |
|
|
<div class="rounded-full w-4 h-4 m-1 bg-white"></div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- Show QR--> |
|
|
<!-- Show QR--> |
|
@ -232,8 +310,6 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
<div v-if="clients && clients.length === 0"> |
|
|
<div v-if="clients && clients.length === 0"> |
|
|
<p class="text-center m-10 text-gray-400 text-sm">There are no clients yet.<br /><br /> |
|
|
<p class="text-center m-10 text-gray-400 text-sm">There are no clients yet.<br /><br /> |
|
|
<button @click="clientCreate = true; clientCreateName = '';" |
|
|
<button @click="clientCreate = true; clientCreateName = '';" |
|
@ -260,10 +336,12 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- QR Code--> |
|
|
<!-- QR Code--> |
|
|
<div v-if="qrcode"> |
|
|
<div v-if="qrcode" class=""> |
|
|
<div class="bg-black bg-opacity-50 fixed top-0 right-0 left-0 bottom-0 flex items-center justify-center z-20"> |
|
|
<div |
|
|
<div class="bg-white rounded-md shadow-lg relative p-8"> |
|
|
class="bg-black bg-opacity-50 fixed top-0 right-0 left-0 bottom-0 flex items-center justify-center z-20"> |
|
|
<button @click="qrcode = null" class="absolute right-4 top-4 text-gray-600 hover:text-gray-800"> |
|
|
<div class="max-w-sm md:max-w-2xl lg:max-w-3xl bg-white rounded-md shadow-lg relative p-8"> |
|
|
|
|
|
<button @click="qrcode = null" |
|
|
|
|
|
class="absolute right-3 top-3 transition hover:bg-red-800 hover:text-white text-gray-700 p-1 rounded inline-flex items-center transitio"> |
|
|
<svg class="w-8" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" |
|
|
<svg class="w-8" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" |
|
|
stroke="currentColor"> |
|
|
stroke="currentColor"> |
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> |
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> |
|
@ -276,7 +354,7 @@ |
|
|
|
|
|
|
|
|
<!-- Create Dialog --> |
|
|
<!-- Create Dialog --> |
|
|
<div v-if="clientCreate" class="fixed z-10 inset-0 overflow-y-auto"> |
|
|
<div v-if="clientCreate" class="fixed z-10 inset-0 overflow-y-auto"> |
|
|
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> |
|
|
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> |
|
|
<!-- |
|
|
<!-- |
|
|
Background overlay, show/hide based on modal state. |
|
|
Background overlay, show/hide based on modal state. |
|
|
|
|
|
|
|
@ -349,7 +427,7 @@ |
|
|
|
|
|
|
|
|
<!-- Delete Dialog --> |
|
|
<!-- Delete Dialog --> |
|
|
<div v-if="clientDelete" class="fixed z-10 inset-0 overflow-y-auto"> |
|
|
<div v-if="clientDelete" class="fixed z-10 inset-0 overflow-y-auto"> |
|
|
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> |
|
|
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> |
|
|
<!-- |
|
|
<!-- |
|
|
Background overlay, show/hide based on modal state. |
|
|
Background overlay, show/hide based on modal state. |
|
|
|
|
|
|
|
@ -384,8 +462,8 @@ |
|
|
<div |
|
|
<div |
|
|
class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"> |
|
|
class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"> |
|
|
<!-- Heroicon name: outline/exclamation --> |
|
|
<!-- Heroicon name: outline/exclamation --> |
|
|
<svg class="h-6 w-6 text-red-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" |
|
|
<svg class="h-6 w-6 text-red-600" xmlns="http://www.w3.org/2000/svg" fill="none" |
|
|
stroke="currentColor" aria-hidden="true"> |
|
|
viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> |
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" |
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" |
|
|
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /> |
|
|
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /> |
|
|
</svg> |
|
|
</svg> |
|
|