This commit is contained in:
Squidly271 2022-06-04 15:04:30 -04:00
parent 4a1cd7e65b
commit 053d49024d
5 changed files with 45 additions and 12 deletions

Binary file not shown.

View File

@ -1250,16 +1250,23 @@ function previousApps(installed,dontClear=false,filter="") {
sortButton = true;
}
});
if ( installed == "action" )
$(".multi_installButton").addClass("actionCenter");
else
$(".multi_installButton").removeClass("actionCenter");
if ( !sortButton) {
$(".sortIcons").removeClass("enabledIcon").removeClass("startupMore");
post({action:"defaultSortOrder"},function(data) {
$("#defaultSort").addClass("enabledIcon");
getPrevApps(installed,filter,dontClear);
enableMultiInstall();
});
} else {
getPrevApps(installed,filter,dontClear);
}
}
function actionCentre() {
clearCategory();
setPageOne();
@ -1289,13 +1296,17 @@ function actionCentre() {
function getPrevApps(installed,filter,dontClear) {
post({action:'previous_apps',installed:installed,filter:filter},function(result) {
if ( installed ) {
if ( installed == true ) {
$(".multi_installDiv").hide();
} else {
$(".multi_installDiv").show();
if ( ! dontClear ) {
clearMultiInstall();
}
if ( installed == "action" )
$(".multi_deleteButton,.multi_installButton").addClass("actionCenter");
else
$(".multi_deleteButton,.multi_installButton").removeClass("actionCenter");
}
switch(installed) {
case true:
@ -1310,6 +1321,7 @@ function getPrevApps(installed,filter,dontClear) {
}
$("#Category").html(msg);
changeSortOrder(null,null,"true");
enableMultiInstall();
saveState();
});
}
@ -1661,14 +1673,16 @@ function uniqueArrayElements(sourceArray) {
function enableMultiInstall() {
var selected = getSelectedApps();
var count = selected.plugin.length + selected.docker.length;
var actionText = $(".multi_installButton").hasClass("actionCenter") ? "Update" : "Install";
if ( count == 0 ) {
$(".multi_install,.multi_installClear").attr("disabled",true);
$(".multi_deleteButton").css("visibility","hidden");
$(".multi_installButton").val("<?tr("Install Selected Applications")?>");
$(".multi_installButton").val(tr(actionText + " Selected Applications"));
} else {
$(".multi_install,.multi_installClear").attr("disabled",false);
if ( ! $(".multi_deleteButton").hasClass("actionCenter") )
$(".multi_deleteButton").css("visibility","visible");
var buttonText = (count == 1) ? sprintf(tr("Install %s Selected Application"),count) : sprintf(tr("Install %s Selected Applications"),count);
var buttonText = (count == 1) ? sprintf(tr(actionText + " %s Selected Application"),count) : sprintf(tr(actionText + " %s Selected Applications"),count);
$(".multi_installButton").val(buttonText);
}
getSelectedApps();

View File

@ -1,8 +1,8 @@
3a103ac3e46d0f151a8582b1600add82 ./Apps.page
ea084b51894d7d60c280f9ca48606050 ./Apps.page
4e55f7483b661af21a25b677179baffe ./CA_notices.page
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
e718d7825dbdc96a17a915079222b098 ./default.cfg
eb2cdb14fcc188f6b3240247af9436ad ./include/exec.php
f095365c9c9f069566a77fd30148436e ./include/exec.php
443a7e01447411322b706390a18d2bd5 ./include/helpers.php
fc87642746ba4f324537bc381b78e982 ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
@ -21,4 +21,4 @@ da3b4f9b73c5c3bf65be6c42d68b51f9 ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
ce8e45452d3b63b5943b6f39c817bbf9 ./skins/Narrow/css.php
c4d6ce8de3baff1c9de2b7f348b2f340 ./skins/Narrow/skin.html
3e08499cb11f56f702ac7f833c21ce30 ./skins/Narrow/skin.php
b769392a39e00aec0d7de3000696b4bf ./skins/Narrow/skin.php

View File

@ -1067,8 +1067,11 @@ function previous_apps() {
if ( $installed == "action" ) {
$tmpRepo = strpos($o['Repository'],":") ? $o['Repository'] : $o['Repository'].":latest";
if ( $dockerUpdateStatus[$tmpRepo]['status'] == "false" )
if ( $dockerUpdateStatus[$tmpRepo]['status'] == "false" ) {
$o['actionCentre'] = true;
$o['updateAvailable'] = true;
$updateCount++;
}
if ( ! $o['Blacklist'] && ! $o['Deprecated'] ) {
if ( $extraBlacklist[$o['Repository']] ) {
@ -1163,10 +1166,12 @@ function previous_apps() {
if ( ( strcmp($installedVersion,$template['pluginVersion']) < 0 || $template['UpdateAvailable']) ) {
$template['actionCentre'] = true;
$template['UpdateAvailable'] = true;
$updateCount++;
}
if ( is_file("/tmp/plugins/$filename") && strcmp($installedVersion,plugin("version","/tmp/plugins/$filename")) < 0 ) {
$template['actionCentre'] = true;
$template['UpdateAvailable'] = true;
$updateCount++;
}
}
@ -1184,8 +1189,13 @@ function previous_apps() {
$tmpL = $file[$index];
$tmpL['Uninstall'] = true;
if ( $installed == "action" && !languageCheck($tmpL) )
if ( $installed == "action" ) {
$tmpL['actionCentre'] = true;
if ( !languageCheck($tmpL) )
continue;
$tmpL['Updated'] = true;
$updateCount++;
}
$displayed[] = $tmpL;
}
@ -1224,7 +1234,7 @@ function previous_apps() {
if ( $installed == "action" && empty($displayed) ) {
postReturn(['status'=>"ok",'script'=>'$(".actionCentre").hide();$(".startupButton").trigger("click");']);
} else {
postReturn(['status'=>"ok"]);
postReturn(['status'=>"ok",'updateCount'=>$updateCount]);
}
}

View File

@ -868,6 +868,9 @@ function getRepoDescriptionSkin($repository) {
$t .= "</div>";
}
if ( $repo['Video'] ) {
if ( $repo['Photo'] )
$t .= "<div><hr></div>";
$videos = is_array($repo['Video']) ? $repo['Video'] : [$repo['Video']];
$vidText = (count($videos) == 1) ? "Play Video" : "Play Video %s";
$t .= "<div>";
@ -1138,7 +1141,10 @@ function displayCard($template) {
$previousAppName = $Plugin ? $PluginURL : $Name;
$type = ($appType == "appDocker") ? "docker" : "plugin";
$card .= "<input class='ca_multiselect ca_tooltip' title='".tr("Check off to select multiple reinstalls")."' type='checkbox' data-name='$previousAppName' data-humanName='$Name' data-type='$type' data-deletepath='$InstallPath' $checked>";
} elseif ( $actionCentre && $UpdateAvailable ) {
$card .= "<input class='ca_multiselect ca_tooltip' title='".tr("Check off to select multiple reinstalls")."' type='checkbox' data-name='$previousAppName' data-humanName='$Name' data-type='$type' data-deletepath='$InstallPath' $checked>";
}
$card .= "</div>";
$card .= "<div class='$cardClass $backgroundClickable'>";
$card .= "<div class='ca_iconArea'>";
@ -1382,6 +1388,9 @@ function displayPopup($template) {
}
if ( $Video ) {
if ( $Screenshot || $Photo ) {
$card .= "<div><hr></div>";
}
if ( ! is_array($Video) )
$Video = [$Video];