subtitle, vpn undefined fix
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2025-07-21 11:21:11 +00:00
parent b23212df9c
commit 6566a32f6a
3 changed files with 10 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ function check_deployments() {
apps.length = 0; // reset
apps.push(...JSON.parse(data)); // push each element
console.log(apps);
document.getElementById('installAppsBtn').click();
// manage
html_data = '';
@@ -19,6 +20,7 @@ function check_deployments() {
service_name = data[k].name;
orig_service_name = data[k].orig_name;
version = data[k].version;
subtitle = data[k].subtitle;
installed = data[k].installed;
if (installed=='true') {
html_data += '<div><a href="#" onclick="reinstall(\''+service_name+'\',\''+service_name+'\')">'+orig_service_name+'</a> - '+version+' - INSTALLED</div>';
@@ -29,7 +31,6 @@ function check_deployments() {
html_data += '<div id="'+service_name+'" class="deployment"></div>';
}
jQuery("#deployments").html(html_data);
document.getElementById('installAppsBtn').click();
}
});
@@ -433,8 +434,8 @@ function get_proxy_html() {
<script>
jQuery('#vpn_save_btn').click(function() {
console.log('vpn save');
jQuery('#vpn').html('Loading...');
save_vpn();
jQuery('#vpn').html('Loading...');
});
</script>
`;

View File

@@ -684,6 +684,7 @@
</div>
<div class="main" >
<div id="myAppsContainer">
Loading applications...
</div>
<div id="popup" class="popup hidden">
<div class="popup-content">
@@ -743,7 +744,7 @@
else more = 'More';
appDiv.innerHTML = `
<div class="app-img"><img src="${app.image}" alt="${app.name}" title="${app.orig_name} ${app.version}"></div>
<div class="app-label">${app.name} ${app.version}</div>
<div class="app-label">${app.subtitle}</div>
<div class="app-name">${app.orig_name}</div>
<button class="more-btn">${more}</button>
`;
@@ -973,7 +974,7 @@
<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=12"></script>
<script src="common.js?t=17"></script>
</body>
</html>

View File

@@ -146,12 +146,14 @@ switch ($_GET["op"]) {
$orig_service_name = $service_name;
$service_name = strtolower($service_name);
$version = $content["version"];
$subtitle = $content["subtitle"];
if (empty($subtitle) || $subtitle == "null") $subtitle = "";
$icon = $content["icon"];
if (empty($icon) || $icon == "null") $icon = "img/default_logo.png"; // default icon image
if (array_key_exists($service_name,$data["INSTALLED_SERVICES"])) $installed = "true";
else $installed = "false";
if (!empty($deployments)) $deployments .= ", ";
$deployments .= '{"name": "'.$service_name.'", "orig_name": "'.$orig_service_name.'", "image": "'.$icon.'", "version": "'.$version.'", "installed": "'.$installed.'"}';
$deployments .= '{"name": "'.$service_name.'", "orig_name": "'.$orig_service_name.'", "image": "'.$icon.'", "version": "'.$version.'", "subtitle": "'.$subtitle.'", "installed": "'.$installed.'"}';
}
if (!empty($deployments)) $deployments = "[{$deployments}]";
}
@@ -190,7 +192,7 @@ switch ($_GET["op"]) {
</div>
<div class="text-content">
<h1 class="title">'.$template->name.'</h1>
<h2 class="subtitle">'.$template->title.'</h2>
<h2 class="subtitle">'.$template->subtitle.'</h2>
<p class="description">'.$template->description.'</p>
</div>
</div>