This commit is contained in:
34
common.js
34
common.js
@@ -110,29 +110,31 @@ function check_vpn() {
|
|||||||
var url = 'scan.php?op=check_vpn';
|
var url = 'scan.php?op=check_vpn';
|
||||||
jQuery.get(url, function(data) {
|
jQuery.get(url, function(data) {
|
||||||
console.log('check_vpn: '+data);
|
console.log('check_vpn: '+data);
|
||||||
if (data=="1") { // save_vpn has finished
|
if (data=="1") { // save_vpn has finished or VPN ON
|
||||||
const vpn_div = document.getElementById("vpn");
|
const vpn_div = document.getElementById("vpn");
|
||||||
console.log(vpn_div);
|
console.log('vpn_div: '+vpn_div);
|
||||||
if (vpn_div) {
|
if (vpn_div) {
|
||||||
vpn_div.innerHTML = 'VPN start process has finished';
|
vpn_div.innerHTML = 'VPN start process has finished';
|
||||||
//document.getElementById('installAppsBtn').click();
|
setTimeout(function() {
|
||||||
|
document.getElementById('installAppsBtn').click();
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#pro_off').hide();
|
||||||
|
$('#pro_on').show();
|
||||||
|
document.getElementById('vpnToggle').checked = true;
|
||||||
|
document.querySelector(".switch-label").textContent = "ON";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (data=="2") {
|
else if (data=="2") {
|
||||||
document.getElementById('vpnToggle').checked = true;
|
$('#pro_off').hide();
|
||||||
document.querySelector(".switch-label").textContent = "ON";
|
$('#pro_on').show();
|
||||||
$('#vpn_off').hide();
|
|
||||||
$('#vpn_on').show();
|
|
||||||
$('#pro_off').hide();
|
|
||||||
$('#pro_on').show();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById('vpnToggle').checked = false;
|
document.getElementById('vpnToggle').checked = false;
|
||||||
document.querySelector(".switch-label").textContent = "OFF";
|
document.querySelector(".switch-label").textContent = "OFF";
|
||||||
$('#vpn_on').hide();
|
}
|
||||||
$('#vpn_off').show();
|
else { // data == 0
|
||||||
$('#pro_on').hide();
|
$('#pro_on').hide();
|
||||||
$('#pro_off').show();
|
$('#pro_off').show();
|
||||||
}
|
}
|
||||||
setTimeout(check_vpn, 10000);
|
setTimeout(check_vpn, 10000);
|
||||||
});
|
});
|
||||||
|
16
manage.html
16
manage.html
@@ -6,7 +6,7 @@
|
|||||||
<title>Safebox</title>
|
<title>Safebox</title>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Switzer:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap"/>
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Switzer:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap"/>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
|
||||||
<link rel="stylesheet" href="style.css?t=5" />
|
<link rel="stylesheet" href="style.css?t=7" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
@@ -37,20 +37,24 @@
|
|||||||
<div class="yellow-row">
|
<div class="yellow-row">
|
||||||
<div id="pro_off">
|
<div id="pro_off">
|
||||||
<div class="yellow-box">
|
<div class="yellow-box">
|
||||||
<h4>Safebox Pro</h4>
|
<div class="pro-text">
|
||||||
|
<span>Safebox Pro</span>
|
||||||
|
</div>
|
||||||
<p>Enjoy benefits and unlock more feature such as remote access, geo-redundant backups etc. <br><br>
|
<p>Enjoy benefits and unlock more feature such as remote access, geo-redundant backups etc. <br><br>
|
||||||
<a href="" class="details">Read details</a><br><br>
|
<a href="" class="details">Read details</a><br><br>
|
||||||
<img src="/img/upgrade.png" alt="Upgrade now" width="100%"/>
|
<img src="/img/upgrade.png" alt="Upgrade now" width="80%"/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="pro_on" class="hidden">
|
<div id="pro_on" class="hidden">
|
||||||
<div class="grey-box">
|
<div class="grey-box">
|
||||||
<h4><img src="/img/globe.png" data-src="/img/globe.png" data-hover="/img/globe.png" alt="VPN" /> Remote access</h4>
|
<div class="vpn-text" id="vpnBtn" >
|
||||||
|
<img src="/img/globe.png" data-src="/img/globe.png" data-hover="/img/globe.png" alt="VPN"/>
|
||||||
|
<span>Remote access</span>
|
||||||
|
</div>
|
||||||
<p>It allows you to connect your installed apps to a custom domain (your own or one registered through us), so you can securely log in from any browser, anywhere in the world.
|
<p>It allows you to connect your installed apps to a custom domain (your own or one registered through us), so you can securely log in from any browser, anywhere in the world.
|
||||||
</p>
|
</p>
|
||||||
<div class="vpn-item">
|
<div class="vpn-item">
|
||||||
<span id="vpnBtn">VPN</span>
|
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input type="checkbox" id="vpnToggle" onclick="return false">
|
<input type="checkbox" id="vpnToggle" onclick="return false">
|
||||||
<span class="slider-text"><span class="switch-label">OFF</span></span>
|
<span class="slider-text"><span class="switch-label">OFF</span></span>
|
||||||
@@ -360,6 +364,6 @@
|
|||||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
||||||
<script src="common.js?t=33"></script>
|
<script src="common.js?t=37"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
4
scan.php
4
scan.php
@@ -59,8 +59,8 @@ switch ($_GET["op"]) {
|
|||||||
}
|
}
|
||||||
else echo "WAIT";
|
else echo "WAIT";
|
||||||
break;
|
break;
|
||||||
case "check_install": // called in install.php - check if install process has finished
|
case "check_install": // called in install.js - check if install process has finished
|
||||||
$arr = check_response($_GET["key"]); // TODO - replace key with "install", key can be "install*"
|
$arr = check_response("install");
|
||||||
if (!empty($arr)) {
|
if (!empty($arr)) {
|
||||||
foreach ($arr as $key=>$data) {
|
foreach ($arr as $key=>$data) {
|
||||||
//echo $key."-".$_GET["key"];
|
//echo $key."-".$_GET["key"];
|
||||||
|
44
style.css
44
style.css
@@ -104,7 +104,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-top {
|
.sidebar-top {
|
||||||
padding: 20px 0;
|
padding: 20px 0px 0px 0px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -139,7 +139,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 10px 20px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: white;
|
color: white;
|
||||||
transition: color 0.3s;
|
transition: color 0.3s;
|
||||||
@@ -237,7 +236,7 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
border-radius: 26px;
|
border-radius: 8px;
|
||||||
transition: background-color 0.3s;
|
transition: background-color 0.3s;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -245,7 +244,7 @@
|
|||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #fff;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Circle */
|
/* Circle */
|
||||||
@@ -263,7 +262,7 @@
|
|||||||
|
|
||||||
/* Checked: move dot, change background and text alignment */
|
/* Checked: move dot, change background and text alignment */
|
||||||
.switch input:checked + .slider-text {
|
.switch input:checked + .slider-text {
|
||||||
background-color: #4CAF50;
|
background-color: var(--highlight-color);
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,14 +297,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.yellow-box {
|
.yellow-box {
|
||||||
background-color: var(--highlight-color);
|
background-image: url('img/yellow-box.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
/*background-color: var(--highlight-color);
|
||||||
|
border-radius: 20px 20px 0px 20px;*/
|
||||||
color: black;
|
color: black;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 10px 18px;
|
padding: 20px 18px;
|
||||||
border-radius: 20px 20px 0px 20px;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
width: 156px;
|
||||||
|
height: 176px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yellow-corner {
|
.yellow-corner {
|
||||||
@@ -317,19 +320,34 @@
|
|||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pro-text {
|
||||||
|
font-size: 16px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
.grey-box {
|
.grey-box {
|
||||||
border: 2px solid #41464f;
|
background-image: url('img/grey-box.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
/* border: 2px solid #41464f; */
|
||||||
border-radius: 20px 20px 0px 20px;
|
border-radius: 20px 20px 0px 20px;
|
||||||
color: #999;
|
color: #999;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 10px 18px;
|
padding: 20px 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
width: 158px;
|
||||||
|
height: 178px;
|
||||||
}
|
}
|
||||||
.grey-box h4 {
|
|
||||||
color: var(--highlight-color);
|
.vpn-text {
|
||||||
}
|
display: flex;
|
||||||
|
align-items: center; /* Ez igazítja középre függőlegesen a tartalmat */
|
||||||
|
gap: 10px; /* Távolság kép és szöveg között (opcionális) */
|
||||||
|
font-size: 16px;
|
||||||
|
color: var(--highlight-color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
Reference in New Issue
Block a user