diff --git a/common.js b/common.js index ea7a165..aee3e85 100644 --- a/common.js +++ b/common.js @@ -18,13 +18,13 @@ function check_deployments() { console.log(data[k]); service_name = data[k].name; orig_service_name = data[k].orig_name; - content = data[k].content; + version = data[k].version; installed = data[k].installed; if (installed=='true') { - html_data += '
'+orig_service_name+' - '+content+' - INSTALLED
'; + html_data += '
'+orig_service_name+' - '+version+' - INSTALLED
'; } else { - html_data += '
'+orig_service_name+' - '+content+'
'; + html_data += '
'+orig_service_name+' - '+version+'
'; } html_data += '
'; } diff --git a/functions.php b/functions.php index 5eb1d9d..a1e219d 100644 --- a/functions.php +++ b/functions.php @@ -141,23 +141,24 @@ function show_service($name, $containers) { } function show_service_update($name, $update, $uptodate, $error) { - $str = ''; - $str .= ""; + $str = ""; $update = trim($update); if (!empty($update)) { $arr = explode(" ",$update); foreach ($arr as $container) { - $str .= ""; + $str .= ""; } + $update_str = "UPDATE"; } $uptodate = trim($uptodate); if (!empty($uptodate)) { $arr = explode(" ",$uptodate); foreach ($arr as $container) { - $str .= ""; + $str .= ""; } + $update_str = "FORCE UPDATE"; } $error = trim($error); @@ -165,13 +166,15 @@ function show_service_update($name, $update, $uptodate, $error) { $arr = explode(" ",$error); foreach ($arr as $container) { //$str .= ""; - $str .= ""; + $str .= ""; } + $update_str = "TRY UPDATE"; } - $str .= '
{$name}
 ".$container."
UPDATE AVAILABLE
UPDATE
 ".$container."
UPDATE AVAILABLE
 
 ".$container."
Already up to date
FORCE UPDATE
 ".$container."
Already up to date
 
 ".$container."N/A
 ".$container."
N/A
TRY UPDATE
 ".$container."
N/A
 
'; - + echo ''; + echo ""; echo $str; + echo '
{$name}  {$update_str}
'; } // not in use diff --git a/installer.css b/installer.css index b67477d..deb9ca8 100644 --- a/installer.css +++ b/installer.css @@ -1,5 +1,5 @@ .hidden {display:none} -fieldset {border: 1px solid #049dff; padding-left: 40px; padding-right: 20px} +fieldset {border: 1px solid #049dff; padding-left: 40px; padding-right: 20px; border-radius: 10px; width: 100%} legend {width: auto;text-align: left !important; padding: 10px; color: #049dff;} fieldset.sub_block {border: 1px solid black; margin:-20px 0px 20px -15px} fieldset.sub_block legend {color: black} diff --git a/manage.html b/manage.html index a453a1c..79c8cb4 100644 --- a/manage.html +++ b/manage.html @@ -8,7 +8,7 @@ - +
@@ -152,6 +152,6 @@ - + diff --git a/manage2.html b/manage2.html index 6fe3555..5483d33 100644 --- a/manage2.html +++ b/manage2.html @@ -39,6 +39,9 @@ label {text-align: left !important;} a, a:hover, a:visited {color: orange} + fieldset {border: 1px solid #ffffff; padding-left: 20px; padding-right: 20px; border-radius: 10px;} + legend {width: auto;text-align: left !important; padding: 10px; color: #ffffff;} + .profile { display: flex; flex-direction: column; @@ -101,6 +104,11 @@ .toggle.active::after { transform: translateX(20px); } + div#themeToggle { + position: fixed; + top: 10px; + right: 10px; + } .buttons { display: flex; justify-content: center; @@ -109,7 +117,8 @@ cursor: pointer; } .buttons button { - padding: 10px 20px; + min-width: 150px; + padding: 10px 10px; background: none; border: 1px solid var(--button-border); border-radius: 10px; @@ -123,6 +132,10 @@ .container { clear:both; float:none; + border: 1px solid; + border-radius: 10px; + padding-bottom: 10px; + margin: 5px; } .leftside { float:left; @@ -131,6 +144,9 @@ .rightside { float:right; width:80%; + display: flex; + flex-direction: column; + height: 88vh; } .my-apps { flex: 1; @@ -147,6 +163,11 @@ border-radius: 10px; box-sizing: border-box; } + .my-apps-container { + width:100%; + display: flex; + flex-wrap: wrap; + } .app { display: flex; flex-direction: column; @@ -160,13 +181,21 @@ object-fit: contain; margin-bottom: 10px; } + .innerDiv { + width:100%; + } footer { + position: fixed; + bottom: 0; + left: 0; + width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px; font-size: 14px; - } + z-index: 1000; + } .footer-links { display: flex; gap: 15px; @@ -265,6 +294,7 @@ } .input-group input { + min-width:260px; margin-top: 5px; margin-bottom: 5px; padding: 5px; @@ -368,11 +398,21 @@ background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpolyline points='1 1 7 7 13 1' style='fill:none;stroke:white;stroke-width:2' /%3E%3C/svg%3E"); } - .info-container { - position: relative; - display: inline-block; - font-family: Arial, sans-serif; - } + + #popup .input-group { + display: block; + } + + #popup .row { + display: flex; + } + + .info-container { + position: relative; + display: inline-block; + font-family: Arial, sans-serif; + margin: 5px 0px 0px 5px; + } .info-icon { background-color: #007BFF; @@ -507,10 +547,10 @@

- REFRESH + REFRESH

- OLD DESIGN + OLD DESIGN
@@ -524,7 +564,7 @@
-
+
@@ -600,10 +640,10 @@ const appDiv = document.createElement('div'); appDiv.className = 'app'; appDiv.innerHTML = ` - ${app.name}${app.orig_name} + ${app.name}${app.orig_name} `; appDiv.addEventListener('click', () => { - popupText.textContent = `You clicked on ${app.name}!`; + popupText.textContent = `You clicked on ${app.name} ${app.version}!`; if (app.installed=='true') reinstall(app.name, 'popupText'); else load_template(app.name,'popupText'); popup.classList.remove('hidden'); @@ -656,7 +696,7 @@ function renderVPN() { myAppsContainer.innerHTML = ` -
+
Loading...
`; @@ -665,7 +705,7 @@ function renderServices() { myAppsContainer.innerHTML = ` -
+
Loading...
`; @@ -674,7 +714,7 @@ function renderUpdates() { myAppsContainer.innerHTML = ` -
+
Looking for updates... Please wait...
`; diff --git a/scan.php b/scan.php index 65c576c..6d8a2bf 100644 --- a/scan.php +++ b/scan.php @@ -144,12 +144,14 @@ switch ($_GET["op"]) { else { foreach ($data["DEPLOYMENTS"] as $service_name => $content) { $orig_service_name = $service_name; - $service_name = strtolower($service_name); - //echo base64_decode($content); + $service_name = strtolower($service_name); + $version = $content["version"]; + $icon = $content["icon"]; + if (empty($icon) || $icon == "null") $icon = "image.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": "image.png", "content": "'.$content.'", "installed": "'.$installed.'"}'; + $deployments .= '{"name": "'.$service_name.'", "orig_name": "'.$orig_service_name.'", "image": "'.$icon.'", "version": "'.$version.'", "installed": "'.$installed.'"}'; } if (!empty($deployments)) $deployments = "[{$deployments}]"; } @@ -183,8 +185,8 @@ switch ($_GET["op"]) { if ($reinstall) { //var_dump($template); $letsencrypt = check_letsencrypt(); - if (empty($letsencrypt)) echo "LETSENCRYPT file doesn't exists..."; - elseif ($letsencrypt=="ERROR") echo "LETSENCRYPT file: read JSON error..."; + if (empty($letsencrypt)) echo "LETSENCRYPT file doesn't exists...

"; + elseif ($letsencrypt=="ERROR") echo "LETSENCRYPT file: read JSON error...

"; else { $domain = ""; foreach ($template->fields as $field) { @@ -194,10 +196,12 @@ switch ($_GET["op"]) { } } echo '
'; - if (!empty($template->icon)) echo "
icon."\">
"; - if (!empty($template->description)) echo "
"; + echo "
"; + if (!empty($template->icon)) echo "icon."\">"; + if (!empty($template->description)) echo ""; + echo "
"; foreach ($template->fields as $field) { - if (!empty($field->title)) echo "
".$field->title."
"; + if (!empty($field->title)) echo "

".$field->title."

"; if (isset($field->generated)) { echo "generated}\" name=\"{$field->key}\" id=\"{$template->name}_{$field->key}\" class=\"additional_{$template->name}\">"; }