version, uninstall button style
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2025-08-04 16:27:11 +00:00
parent f925665d23
commit 63ec0ebaa8
4 changed files with 22 additions and 4 deletions

View File

@@ -271,7 +271,7 @@ function uninstall(additional) {
jQuery("div.deployment").each(function(index) {
$(this).html('');
});
data = '<fieldset><form action="#" method="post"><div class="row">YOU ARE GOING TO UNINSTALL '+additional.toUpperCase()+'.<br>ARE YOU SURE? IF YES, PLEASE CLICK ON THE BUTTON BELOW.<br><br></div><div class="row"><div class="mb-3"><button class="btn btn-lg btn-primary btn-block" type="button" onclick="confirm_uninstall(\''+additional+'\')">Uninstall</button></div></div></form></fieldset>';
data = '<form action="#" method="post"><div class="row">YOU ARE GOING TO UNINSTALL '+additional.toUpperCase()+'.<br>ARE YOU SURE? IF YES, PLEASE CLICK ON THE BUTTON BELOW.<br><br></div><div class="row"><div class="mb-3"><button class="save-button" type="button" onclick="confirm_uninstall(\''+additional+'\')">Uninstall</button></div></div></form>';
jQuery("#"+additional).html(data);
jQuery("#popupText").html(data); // manage2
}
@@ -480,8 +480,17 @@ function get_containers() {
});
}
function get_version() {
var url = 'scan.php?op=version';
jQuery.get(url, function(data) {
console.log('version: '+data);
jQuery('#logo').attr('title',data);
});
}
jQuery(document).ready(function(){
get_version();
get_repositories();
get_deployments();
get_system();

View File

@@ -11,7 +11,7 @@
<body>
<div class="sidebar">
<div>
<div class="logo">
<div id="logo" class="logo">
<img src="/img/logo.png" alt="Safebox"/>
<span>Safebox</span>
</div>
@@ -363,7 +363,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=30"></script>
<script src="common.js?t=33"></script>
</body>
</html>

View File

@@ -25,9 +25,11 @@
<div class="progress-text" id="progressText">0%</div>
</div>
</div>
<!--
<div class="controls">
<button onclick="document.location='install.html'" class="save-button">STOP AND START INSTALL</button>
</div>
-->
</div>
</div>
<!-- Optional JavaScript -->

View File

@@ -493,6 +493,14 @@ switch ($_GET["op"]) {
}
echo $text;
break;
case "version":
$arr = check_response("version");
if (!empty($arr)) {
$data = $arr["version"];
echo $data["VERSION"];
}
else echo "Version not found";
break;
case "repositories":
$arr = array("STATUS" => 0);
$json = json_encode($arr, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);