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';
|
||||
jQuery.get(url, function(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");
|
||||
console.log(vpn_div);
|
||||
console.log('vpn_div: '+vpn_div);
|
||||
if (vpn_div) {
|
||||
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") {
|
||||
document.getElementById('vpnToggle').checked = true;
|
||||
document.querySelector(".switch-label").textContent = "ON";
|
||||
$('#vpn_off').hide();
|
||||
$('#vpn_on').show();
|
||||
$('#pro_off').hide();
|
||||
$('#pro_on').show();
|
||||
}
|
||||
else {
|
||||
$('#pro_off').hide();
|
||||
$('#pro_on').show();
|
||||
document.getElementById('vpnToggle').checked = false;
|
||||
document.querySelector(".switch-label").textContent = "OFF";
|
||||
$('#vpn_on').hide();
|
||||
$('#vpn_off').show();
|
||||
$('#pro_on').hide();
|
||||
$('#pro_off').show();
|
||||
document.querySelector(".switch-label").textContent = "OFF";
|
||||
}
|
||||
else { // data == 0
|
||||
$('#pro_on').hide();
|
||||
$('#pro_off').show();
|
||||
}
|
||||
setTimeout(check_vpn, 10000);
|
||||
});
|
||||
|
16
manage.html
16
manage.html
@@ -6,7 +6,7 @@
|
||||
<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://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>
|
||||
<body>
|
||||
<div class="sidebar">
|
||||
@@ -37,20 +37,24 @@
|
||||
<div class="yellow-row">
|
||||
<div id="pro_off">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pro_on" class="hidden">
|
||||
<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>
|
||||
<div class="vpn-item">
|
||||
<span id="vpnBtn">VPN</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="vpnToggle" onclick="return false">
|
||||
<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://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="common.js?t=33"></script>
|
||||
<script src="common.js?t=37"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
4
scan.php
4
scan.php
@@ -59,8 +59,8 @@ switch ($_GET["op"]) {
|
||||
}
|
||||
else echo "WAIT";
|
||||
break;
|
||||
case "check_install": // called in install.php - check if install process has finished
|
||||
$arr = check_response($_GET["key"]); // TODO - replace key with "install", key can be "install*"
|
||||
case "check_install": // called in install.js - check if install process has finished
|
||||
$arr = check_response("install");
|
||||
if (!empty($arr)) {
|
||||
foreach ($arr as $key=>$data) {
|
||||
//echo $key."-".$_GET["key"];
|
||||
|
44
style.css
44
style.css
@@ -104,7 +104,7 @@
|
||||
}
|
||||
|
||||
.sidebar-top {
|
||||
padding: 20px 0;
|
||||
padding: 20px 0px 0px 0px;
|
||||
overflow-y: auto;
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
@@ -139,7 +139,6 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
transition: color 0.3s;
|
||||
@@ -237,7 +236,7 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
border-radius: 26px;
|
||||
border-radius: 8px;
|
||||
transition: background-color 0.3s;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
@@ -245,7 +244,7 @@
|
||||
padding: 0 8px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* Circle */
|
||||
@@ -263,7 +262,7 @@
|
||||
|
||||
/* Checked: move dot, change background and text alignment */
|
||||
.switch input:checked + .slider-text {
|
||||
background-color: #4CAF50;
|
||||
background-color: var(--highlight-color);
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
@@ -298,14 +297,18 @@
|
||||
}
|
||||
|
||||
.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;
|
||||
text-align: left;
|
||||
margin: 0px;
|
||||
padding: 10px 18px;
|
||||
border-radius: 20px 20px 0px 20px;
|
||||
padding: 20px 18px;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
width: 156px;
|
||||
height: 176px;
|
||||
}
|
||||
|
||||
.yellow-corner {
|
||||
@@ -317,19 +320,34 @@
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.pro-text {
|
||||
font-size: 16px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.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;
|
||||
color: #999;
|
||||
text-align: left;
|
||||
margin: 0px;
|
||||
padding: 10px 18px;
|
||||
padding: 20px 18px;
|
||||
font-weight: bold;
|
||||
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 {
|
||||
flex: 1;
|
||||
|
Reference in New Issue
Block a user