Reorganize repos
8
app/static/bootstrap/bootstrap.min.css
vendored
Normal file
7
app/static/bootstrap/bootstrap.min.js
vendored
Normal file
2
app/static/bootstrap/jquery-3.7.1.min.js
vendored
Normal file
5
app/static/bootstrap/popper-1.12.9.min.js
vendored
Normal file
1
app/static/bootstrap/toggle-bootstrap-dark.min.css
vendored
Normal file
1
app/static/bootstrap/toggle-bootstrap-print.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}
|
1
app/static/bootstrap/toggle-bootstrap.min.css
vendored
Normal file
21
app/static/datatables/datatables.min.css
vendored
Normal file
40
app/static/datatables/datatables.min.js
vendored
Normal file
BIN
app/static/favicon/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
app/static/favicon/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
app/static/favicon/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
app/static/favicon/favicon-16x16.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
app/static/favicon/favicon-32x32.png
Normal file
After Width: | Height: | Size: 871 B |
BIN
app/static/favicon/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
10
app/static/favicon/site.webmanifest
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name":"Headscale Manager",
|
||||
"short_name":"hsman",
|
||||
"icons":[
|
||||
{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},
|
||||
{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],
|
||||
"theme_color":"#000000",
|
||||
"background_color":"#000000",
|
||||
"display":"standalone"
|
||||
}
|
22
app/static/fonts/century-gothic.css
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* The Typekit service used to deliver this font or fonts for use on websites
|
||||
* is provided by Adobe and is subject to these Terms of Use
|
||||
* http://www.adobe.com/products/eulas/tou_typekit. For font license
|
||||
* information, see the list below.
|
||||
*
|
||||
* century-gothic:
|
||||
* - http://typekit.com/eulas/00000000000000003b9b1f23
|
||||
*
|
||||
* © 2009-2024 Adobe Systems Incorporated. All Rights Reserved.
|
||||
*/
|
||||
/*{"last_published":"2021-09-06 05:08:57 UTC"}*/
|
||||
|
||||
@import url("https://p.typekit.net/p.css?s=1&k=oov2wcw&ht=tk&f=39203&a=85994746&app=typekit&e=css");
|
||||
|
||||
@font-face {
|
||||
font-family:"century-gothic";
|
||||
src:url("https://use.typekit.net/af/afc5c6/00000000000000003b9b1f23/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/afc5c6/00000000000000003b9b1f23/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/afc5c6/00000000000000003b9b1f23/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
|
||||
font-display:auto;font-style:normal;font-weight:400;font-stretch:normal;
|
||||
}
|
||||
|
||||
.tk-century-gothic { font-family: "century-gothic",sans-serif; }
|
21
app/static/fonts/quicksand.css
Normal file
@ -0,0 +1,21 @@
|
||||
@font-face {
|
||||
font-family: 'Quicksand';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/quicksand/v31/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkP8o18E.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Quicksand';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/quicksand/v31/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkM0o18E.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Quicksand';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/quicksand/v31/6xK-dSZaM9iE8KbpRA_LJ3z8mH9BOJvgkCEv18E.ttf) format('truetype');
|
||||
}
|
BIN
app/static/hsman.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
120
app/static/main.css
Normal file
@ -0,0 +1,120 @@
|
||||
/* custom css */
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
body.bootstrap,
|
||||
body.bootstra-dark {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: century-gothic, sans-serif;
|
||||
/* font-family: 'Quicksand', sans-serif; */
|
||||
min-height: 100%;
|
||||
/* margin: 0 0 60px; */
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
body > .container,
|
||||
body > .container-fluid {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
/* Set the fixed height of the footer here */
|
||||
height: 30px;
|
||||
margin-top: 0 auto;
|
||||
/* Vertically center the text there */
|
||||
line-height: 10px;
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
|
||||
a:link {
|
||||
color: unset;
|
||||
text-decoration-line: underline;
|
||||
/* text-decoration-style: dotted; */
|
||||
/* text-decoration-style: dashed; */
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: unset;
|
||||
text-decoration-line: underline;
|
||||
/* text-decoration-style: dotted; */
|
||||
/* text-decoration-style: dashed; */
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: unset;
|
||||
text-decoration-line: unset;
|
||||
/* text-decoration: underline; */
|
||||
/* text-decoration-style: dotted; */
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: unset;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.nodeco, a.nav-link, a.navbar-brand, a.routeToggle {
|
||||
text-decoration-line: none;
|
||||
text-decoration-style: unset;
|
||||
}
|
||||
|
||||
table.dataTable tbody tr:hover {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
table.dataTable tbody tr:hover > .sorting_1 {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
div.data:hover{
|
||||
/* background-color: rgba(63, 140, 211, 0.808); */
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.fancyTrue {
|
||||
color: #10932f
|
||||
}
|
||||
|
||||
.fancyFalse {
|
||||
color: #9b0f0f
|
||||
}
|
||||
|
||||
/* primary route */
|
||||
a.route.primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
/* route enabled */
|
||||
a.route.True {
|
||||
font-style: italic;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
/* route disabled */
|
||||
a.route.False {
|
||||
font-style: italic;
|
||||
text-decoration-line: line-through underline;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
div.dt-container div.dt-scroll-body {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
tr.pka-hide {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
i.disabled {
|
||||
color: #888;
|
||||
}
|
||||
span.expired {
|
||||
color: #888;
|
||||
}
|
67
app/static/main.js
Normal file
@ -0,0 +1,67 @@
|
||||
function renameNode(nodeId) {
|
||||
var newName = $("#newName").val();
|
||||
var url = `${nodeId}/rename/${newName}`;
|
||||
$.ajax({
|
||||
url: url,
|
||||
xhrFields: {
|
||||
withCredentials: true,
|
||||
},
|
||||
success: function (data) {
|
||||
$("#renameModal").modal("hide");
|
||||
$("#givenName").html(data.newName);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function createPKA(username) {
|
||||
console.log(username);
|
||||
var url = `${username}/pakcreate`;
|
||||
var ephemereal = $("#ephemereal").is(":checked");
|
||||
var reusable = $("#reusable").is(":checked");
|
||||
var expiration = $("#expiration").val();
|
||||
console.log(expiration);
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
xhrFields: {
|
||||
withCredentials: true,
|
||||
},
|
||||
data: JSON.stringify({
|
||||
ephemeral: ephemereal,
|
||||
reusable: reusable,
|
||||
expiration: expiration,
|
||||
}),
|
||||
|
||||
success: function (data) {
|
||||
$("#createPKA").modal("hide");
|
||||
location.reload();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function copyToClipboard(obj) {
|
||||
var span = $(obj);
|
||||
var value = span.attr("value");
|
||||
var original = span.html();
|
||||
try {
|
||||
navigator.clipboard.writeText(value);
|
||||
span.html("copied!");
|
||||
setTimeout(function () {
|
||||
span.html(original);
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
span.html("error");
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleExpired(obj) {
|
||||
var toggle = $(obj);
|
||||
if (toggle.is(":checked")) {
|
||||
$(".pka-expired").removeClass("pka-hide");
|
||||
} else {
|
||||
$(".pka-expired").addClass("pka-hide");
|
||||
}
|
||||
}
|