diff --git a/archive/community.applications-2021.12.11-x86_64-1.txz b/archive/community.applications-2021.12.11-x86_64-1.txz new file mode 100644 index 00000000..f0573077 Binary files /dev/null and b/archive/community.applications-2021.12.11-x86_64-1.txz differ diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 b/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 index 447def58..37f6bf3e 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 @@ -14,12 +14,12 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md 524afab04ca930f59117a846f819fb2f ./scripts/installPluginUpdate.sh 92028dcc61f62158cbc7064e6143d287 ./scripts/installUpdate.php 5846421e95b475e1156c3f68164ccc4f ./scripts/languageInstall.sh -729c178196af99c94116246f0c8be7a5 ./scripts/notices.php +c0b2c395a14863960438e4622f20f6ff ./scripts/notices.php 430966e5646376b62905b63a30de7102 ./scripts/PluginAPI.php 9c7608a4a2cf279c8a2af88960e1642d ./scripts/pluginInstall.php e3dc9ed23036a09d69d5cd5c3111751e ./scripts/showStatistics.php 4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh 2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php -657c9798dbdb95b053127106fb18491e ./skins/Narrow/css.php +b15e910eb0b7d38d5253a99bf0ab7ba8 ./skins/Narrow/css.php cfa1511913f794c8c5980460dfcdf049 ./skins/Narrow/skin.html -37dc71da8b07799676e29d7a6c6bf484 ./skins/Narrow/skin.php +87ae04cbe1c3745c596ab7ae2ca39c85 ./skins/Narrow/skin.php diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/notices.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/notices.php index e6884eb7..cc8dab2e 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/notices.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/notices.php @@ -44,7 +44,7 @@ if ( is_file("/var/run/dockerd.pid") && is_dir("/proc/".@file_get_contents("/var } else $dockerRunning = false; -function debug($message) { +function debug1($message) { global $debugging; if ($debugging) echo $message; @@ -54,10 +54,10 @@ function conditionsMet($value) { global $conditionsMet; if ($value) - debug(" Passed\n"); + debug1(" Passed\n"); else { $conditionsMet = false; - debug(" Failed\n"); + debug1(" Failed\n"); } } @@ -79,7 +79,7 @@ switch ($action) { } if ( $local && ! is_array($notices) ) { - debug("Not a valid local json file"); + debug1("Not a valid local json file"); return; } @@ -89,7 +89,7 @@ switch ($action) { if ( in_array($notice['ID'],$dismissed) ) continue; - debug("Searching for $app"); + debug1("Searching for $app"); $found = false; $plugin = ( startsWith($app,"https://") || strtolower(pathinfo($app,PATHINFO_EXTENSION)) == "plg"); @@ -122,31 +122,31 @@ switch ($action) { } } if ( $found ) { - debug(" Found Looking for conditions\n"); + debug1(" Found Looking for conditions\n"); $conditionsMet = true; if ( $notice['Conditions']['unraid'] ) { $unraid = parse_ini_file("/etc/unraid-version"); $unraidVersion = $unraid['version']; foreach ($notice['Conditions']['unraid'] as $condition) { if ( ! $conditionsMet ) break; - debug("Testing unraid version $unraidVersion {$condition[0]} {$condition[1]}"); + debug1("Testing unraid version $unraidVersion {$condition[0]} {$condition[1]}"); conditionsMet(version_compare($unraidVersion,$condition[1],$condition[0])); } } } else { - debug(" Not Found"); + debug1(" Not Found"); continue; } if ( $plugin && $notice['Conditions']['plugin'] ) { $pluginVersion = @plugin("version","/var/log/plugins/".basename($app)); if ( ! $pluginVersion ) { - debug("Unable to determine plugin version. Carrying on"); + debug1("Unable to determine plugin version. Carrying on"); continue; } foreach ($notice['Conditions']['plugin'] as $condition) { if ( ! $conditionsMet ) break; - debug("Testing plugin version $pluginVersion {$condition[0]} {$condition[1]}"); + debug1("Testing plugin version $pluginVersion {$condition[0]} {$condition[1]}"); $cmp = strcmp($pluginVersion,$condition[1]); // do some operator substitutions switch($condition[0]) { @@ -208,12 +208,12 @@ switch ($action) { } if ( $notice['Conditions']['code'] && $conditionsMet) { - debug("Executing {$notice['Conditions']['code']}"); + debug1("Executing {$notice['Conditions']['code']}"); conditionsMet(eval($notice['Conditions']['code'])); } if ($conditionsMet) { - debug("Conditions Met. Send the notification!\n"); + debug1("Conditions Met. Send the notification!\n"); if ( $sendNotification ) { $command = "/usr/local/emhttp/plugins/dynamix/scripts/notify -b -e 'Community Applications Background Scanning' -s 'Attention Required' -d ".escapeshellarg($notice['email']." Login to your server for more detail. To not receive this notification again, dismiss the banner when logged into your server")." -i 'warning'"; exec($command); @@ -221,9 +221,9 @@ switch ($action) { $notice['App'] = $app; $unRaidNotifications[] = $notice; } else { - debug("Conditions not met. Do nothing!\n"); + debug1("Conditions not met. Do nothing!\n"); } - debug("\n"); + debug1("\n"); } echo json_encode($unRaidNotifications ?: [],JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); break; diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/css.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/css.php index c455d8ea..874ffa2b 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/css.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/css.php @@ -429,6 +429,7 @@ table {background-color:transparent;} .unraidIcon{margin-top:4rem;} .vid{display:inline-block;font-size:8rem;position:relative;top:-0.5rem;color:;opacity:70%;padding-right:10px;} .vid:hover{color:} +.warningCardBackground{clip-path: polygon(0 0,100% 0, 100% 100%);background-color: #810000;top:0px;height:9rem;width:9rem;position: relative;left:-10rem;margin-right:-9rem;} #warningNotAccepted{display:none;} .awesomplete [hidden] {display: none;} diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php index b4b02ccc..1b19d9d7 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php @@ -148,7 +148,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false) } $actionsContext[] = array("icon"=>"ca_fa-install","text"=>"Install","action"=>"popupInstallXML('".addslashes($template['Path'])."','default','".str_replace(" "," ",htmlspecialchars($template['CAComment']))."');"); } else { - $actionsContext[] = array("icon"=>"ca_fa-install","text"=>"Install","action"=>"displayTags('{$template['ID']}');"); + $actionsContext[] = array("icon"=>"ca_fa-install","text"=>"Install","action"=>"displayTags('{$template['ID']}',false,'".str_replace(" "," ",htmlspecialchars($template['CAComment']))."');"); } } } @@ -518,16 +518,18 @@ function getPopupDescriptionSkin($appNumber) { $actionsContext[] = array("divider"=>true); $actionsContext[] = array("icon"=>"ca_fa-delete","text"=>"".tr("Uninstall")."","action"=>"uninstallDocker('".addslashes($info[$name]['template'])."','{$template['Name']}');"); - } elseif ( ! $template['Blacklist'] || ! $template['Compatible']) { + } elseif ( ! $template['Blacklist'] ) { if ( $template['InstallPath'] ) { $actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Reinstall"),"action"=>"popupInstallXML('".addslashes($template['InstallPath'])."','user');"); $actionsContext[] = array("divider"=>true); $actionsContext[] = array("icon"=>"ca_fa-delete","text"=>"".tr("Remove from Previous Apps")."","action"=>"removeApp('{$template['InstallPath']}','{$template['Name']}');"); } else { - if ( ! $template['BranchID'] ) { - $actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"popupInstallXML('".addslashes($template['Path'])."','default');"); - } else { - $actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"displayTags('{$template['ID']}');"); + if ( $template['Compatible'] || $caSettings['hideIncompatible'] !== "true" ) { + if ( ! $template['BranchID'] ) { + $actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"popupInstallXML('".addslashes($template['Path'])."','default');"); + } else { + $actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"displayTags('{$template['ID']}');"); + } } } } @@ -548,18 +550,17 @@ function getPopupDescriptionSkin($appNumber) { $actionsContext[] = array("icon"=>"ca_fa-delete","text"=>"".tr("Uninstall")."","action"=>"uninstallApp('/var/log/plugins/$pluginName','".str_replace(" "," ",$template['Name'])."');"); } - } elseif ( ! $template['Blacklist'] || ! $template['Compatible'] ) { - $buttonTitle = $template['InstallPath'] ? tr("Reinstall") : tr("Install"); - $actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}');"); + } elseif ( ! $template['Blacklist'] ) { + if ( $template['Compatible'] || $caSettings['hideIncompatible'] !== "true") { + $buttonTitle = $template['InstallPath'] ? tr("Reinstall") : tr("Install"); + $actionsContext[] = array("icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}');"); + } if ( $template['InstallPath'] ) { if ( ! empty($actionsContext) ) $actionsContext[] = array("divider"=>true); $actionsContext[] = array("icon"=>"ca_fa-delete","text"=>"".tr("Remove from Previous Apps")."","action"=>"removeApp('{$template['InstallPath']}','$pluginName');"); } -/* if ( count($actionsContext) == 1 ) { - $template['newInstallAction'] = "installPlugin('{$template['PluginURL']}')"; - unset($actionsContext); - } */ + } } } @@ -1063,34 +1064,51 @@ function displayCard($template) { "; } $card .= ""; - if ( $Installed || $Uninstall) { + if ( $Blacklist ) { + $card .= " +
+
 ".tr("Blacklisted")." 
+
+ "; + } elseif ( ! $Compatible ) { + $card .= " +
+
 ".tr("Incompatible")." 
+
+ "; + } elseif ( $Deprecated ) { + $card .= " +
+
 ".tr("Deprecated")." 
+
+ "; + } elseif ( $Installed || $Uninstall) { $card .= "
".tr("INSTALLED")."
-
"; - } else if ( $Official ) { + "; + } elseif ( $Official ) { $card .= "
".tr("OFFICIAL")."
"; - } else if ( $Beta ) { + } elseif ( $Beta ) { $card .= "
".tr("BETA")."
"; - } else if ( $RecommendedDate ) { + } elseif ( $RecommendedDate ) { $card .= "
"; - - } else if ( $Trusted ) { + } elseif ( $Trusted ) { $card .= "
-
".tr("Digitally Signed")."
+
".tr("Digitally Signed")."
"; } @@ -1232,7 +1250,7 @@ function displayPopup($template) { $card .= "".tr("DockerHub Stars:")."$stars "; - if ( $Plugin ) { + if ( $Plugin || ! $Compatible) { if ( $MinVer ) $card .= "".tr("Min OS")."$MinVer"; if ( $MaxVer )