|
|
|
@ -216,6 +216,21 @@ |
|
|
|
<div class="rounded-full w-4 h-4 m-1 bg-white"></div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- AllowedIPs --> |
|
|
|
<button |
|
|
|
class="align-middle bg-gray-100 dark:bg-neutral-600 dark:text-neutral-300 hover:bg-red-800 dark:hover:bg-red-800 hover:text-white dark:hover:text-white p-2 rounded transition" |
|
|
|
title="Edit Allowed IPs" @click="clientEditAllowedIPs = client"> |
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 icon icon-tabler icon-tabler-list" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
|
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
|
|
|
<path d="M9 6l11 0" /> |
|
|
|
<path d="M9 12l11 0" /> |
|
|
|
<path d="M9 18l11 0" /> |
|
|
|
<path d="M5 6l0 .01" /> |
|
|
|
<path d="M5 12l0 .01" /> |
|
|
|
<path d="M5 18l0 .01" /> |
|
|
|
</svg> |
|
|
|
</button> |
|
|
|
|
|
|
|
<!-- Show QR--> |
|
|
|
<button |
|
|
|
class="align-middle bg-gray-100 dark:bg-neutral-600 dark:text-neutral-300 hover:bg-red-800 dark:hover:bg-red-800 hover:text-white dark:hover:text-white p-2 rounded transition" |
|
|
|
@ -446,6 +461,72 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--edit allowedIPs dialog--> |
|
|
|
<div v-if="clientEditAllowedIPs" class="fixed z-10 inset-0 overflow-y-auto"> |
|
|
|
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> |
|
|
|
<div class="fixed inset-0 transition-opacity" aria-hidden="true"> |
|
|
|
<div class="absolute inset-0 bg-gray-500 dark:bg-black opacity-75 dark:opacity-50"></div> |
|
|
|
</div> |
|
|
|
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span> |
|
|
|
<div |
|
|
|
class="inline-block align-bottom bg-white dark:bg-neutral-700 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg w-full" |
|
|
|
role="dialog" aria-modal="true" aria-labelledby="modal-headline"> |
|
|
|
<div class="bg-white dark:bg-neutral-700 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> |
|
|
|
<div class="sm:flex sm:items-start"> |
|
|
|
<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"> |
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
|
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
|
|
|
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /> |
|
|
|
<path d="M9 12l2 2l4 -4" /></svg> |
|
|
|
</div> |
|
|
|
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"> |
|
|
|
<h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-neutral-200" id="modal-headline"> |
|
|
|
Edit AllowedIPs |
|
|
|
</h3> |
|
|
|
<div class="mt-2 flex items-center flex-col"> |
|
|
|
<div class="w-full min-h-5 mb-2 flex flex-wrap"> |
|
|
|
<div class="bg-white tracking-wide h-[40px] border-2 border-gray-100 items-center rounded p-1 mb-2 mr-2 px-2 cursor-pointer flex w-fit" v-for="(item,index) in clientEditAllowedIPs.allowedIPs"> |
|
|
|
{{item.address+'/'+item.cidr}} |
|
|
|
<div v-if="item.address!==clientEditAllowedIPs.address" class="inline-block border-l-2 pl-1 ml-2"> |
|
|
|
<svg @click="removeIP(index)" xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="18" height="18" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
|
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
|
|
|
<line x1="18" y1="6" x2="6" y2="18" /> |
|
|
|
<line x1="6" y1="6" x2="18" y2="18" /></svg> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="w-full flex items-center"> |
|
|
|
<div class="h-[40px] w-fit text-sm bg-white border-2 border-gray-100 rounded flex items-center px-2"> |
|
|
|
<input maxlength="3" v-model.number="userInputIP[0]" class="w-[30px] text-center outline-none border-none bg-transparent"/><span class="text-gray-700">⋅</span> |
|
|
|
<input maxlength="3" v-model.number="userInputIP[1]" class="w-[30px] text-center outline-none border-none bg-transparent"/><span class="text-gray-700">⋅</span> |
|
|
|
<input maxlength="3" v-model.number="userInputIP[2]" class="w-[30px] text-center outline-none border-none bg-transparent"/><span class="text-gray-700">⋅</span> |
|
|
|
<input maxlength="3" v-model.number="userInputIP[3]" class="w-[30px] text-center outline-none border-none bg-transparent"/><span class="text-gray-700">/</span> |
|
|
|
<input maxlength="2" v-model.number="userInputIP[4]" class="w-[30px] text-center outline-none border-none bg-transparent"/> |
|
|
|
</div> |
|
|
|
<div @click="addNewIP" class="w-[40px] h-[40px] rounded bg-white border-2 border-gray-100 cursor-pointer ml-2 flex justify-center items-center"> |
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-plus" width="18" height="18" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
|
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
|
|
|
<path d="M12 5l0 14" /> |
|
|
|
<path d="M5 12l14 0" /></svg> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="bg-gray-50 dark:bg-neutral-600 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"> |
|
|
|
<button type="button" @click="updateClientAllowedIPs(clientEditAllowedIPs); clientEditAllowedIPs = null" |
|
|
|
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 dark:bg-red-600 text-base font-medium text-white dark:text-white hover:bg-red-700 dark:hover:bg-red-700 focus:outline-none sm:ml-3 sm:w-auto sm:text-sm"> |
|
|
|
Save |
|
|
|
</button> |
|
|
|
<button type="button" @click="clientEditAllowedIPs = null" |
|
|
|
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 dark:border-neutral-500 shadow-sm px-4 py-2 bg-white dark:bg-neutral-500 text-base font-medium text-gray-700 dark:text-neutral-50 hover:bg-gray-50 dark:hover:bg-neutral-600 dark:hover:border-neutral-600 focus:outline-none sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"> |
|
|
|
Cancel |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="authenticated === false"> |
|
|
|
<h1 class="text-4xl font-medium my-16 text-gray-700 dark:text-neutral-200 text-center">WireGuard</h1> |
|
|
|
|