Allow MS to be featured even if incompatible

This commit is contained in:
Squidly271 2023-04-11 21:40:20 -04:00
parent 61dbc7f26a
commit 86bf355325
5 changed files with 18 additions and 10 deletions

View File

@ -2,7 +2,7 @@
106b521c1feebda4d7b3f558cc016cda ./CA_notices.page
eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
451cc69d66e2504aa3e9977cb2e233b8 ./include/exec.php
945036a5672dbad805d8507ff349d316 ./include/exec.php
1182f793790a06f0d8ac38674904ec76 ./include/helpers.php
7cc3e1ffd81120a1cf407857225db275 ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
@ -20,6 +20,6 @@ ed42a35b3524b55e2024cdd56a795733 ./scripts/pluginInstall.php
f2a86fd875cb73bb095388e69ca035fd ./scripts/showStatistics.php
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
5c088a7cf82229cb64edfd4c415a84a0 ./scripts/updatePluginSupport.php
9f9f7cbbb7962b6c70c9a4cda77d5cdf ./skins/Narrow/css.php
ba9fd42364af5a2f50958a638e82376f ./skins/Narrow/css.php
d642a25efb891e51471fc4c7636da885 ./skins/Narrow/skin.html
fffb0e7d9806fa2b5ddf9954a087a26e ./skins/Narrow/skin.php
f06e9629ae3ef7028fbea384f91f0638 ./skins/Narrow/skin.php

View File

@ -600,9 +600,11 @@ function appOfDay($file) {
foreach($file as $template) {
if ( ! isset($template['Featured'] ) )
break;
if ( ! checkRandomApp($template) )
continue;
// Don't show it if the plugin is installed
if ( ! $template['PluginURL'] == "https://unraid-dl.sfo2.cdn.digitaloceanspaces.com/unraid-api/dynamix.unraid.net.plg" ) {
if ( ! checkRandomApp($template) )
continue;
}
// Don't show it if the plugin is installed
if ( $template['PluginURL'] && is_file("/var/log/plugins/".basename($template['PluginURL'])) )
continue;
// Don't show it if the container is installed

View File

@ -418,7 +418,7 @@ a.popup-donate:hover{color:<?=$donateText?>;background-color:<?=$unRaid66color?>
.spotlightHeader{font-size:2rem;}
.spotlightIconArea{display:inline-block;float:left;width:10rem;}
.spotlightIcon{height:15rem;margin-bottom:-2.5rem;margin-left:-3rem;margin-top:-2rem;}
.spotlightInfoArea{margin-left:2rem;padding-left:10rem;}
.spotlightInfoArea{margin-left:2rem;padding-left:10rem;margin-top:2rem;}
.spotlightPopup{display:inline-block;}
.spotlightPopupText{position:absolute;color:white;font-size:2rem;position:absolute;top:1.2rem;right:2rem;}
.spotlightPopupText::after{content:"\f005";font-family:fontAwesome;}

View File

@ -265,7 +265,8 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
} else {
$installComment = $template['RequiresFile'] ? "" : $installComment;
}
$actionsContext[] = ["icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}$isDeprecated','$updateFlag','".str_replace([" ","\n"],["&#32;",""],htmlspecialchars($installComment ?? ""))."','$requiresText');"];
if ( $template['Compatible'] )
$actionsContext[] = ["icon"=>"ca_fa-install","text"=>$buttonTitle,"action"=>"installPlugin('{$template['PluginURL']}$isDeprecated','$updateFlag','".str_replace([" ","\n"],["&#32;",""],htmlspecialchars($installComment ?? ""))."','$requiresText');"];
if ( $template['InstallPath'] ) {
if ( ! empty($actionsContext) )
@ -1285,7 +1286,7 @@ function displayCard($template) {
if ( ! $Overview )
$Overview = tr("No description present");
$ovr = html_entity_decode($Overview);
$ovr = trim($ovr);
$ovr = str_replace(["[","]"],["<",">"],$ovr);
@ -1296,6 +1297,9 @@ function displayCard($template) {
$ovr = str_replace("\n","<br>",$ovr);
$Overview = strip_tags(str_replace("<br>"," ",$ovr));
if ( ! $Compatible && $homeScreen )
$Overview = "<span style='color:#FF8C2F'>Recommended to upgrade the OS to enjoy the additional features of MyServers</span>&nbsp;&nbsp;$Overview";
$descClass= $RepositoryTemplate ? "cardDescriptionRepo" : "cardDescription";
$card .= "<div class='$descClass $backgroundClickable'><div class='cardDesc'>$Overview</div></div>";
@ -1452,7 +1456,9 @@ function displayPopup($template) {
if ( $Language && $LanguagePack !== "en_US" ) {
$ModeratorComment .= "<a href='$disclaimLineLink' target='_blank'>$disclaimLine1</a>";
}
if ( !$Compatible && $PluginURL == "https://unraid-dl.sfo2.cdn.digitaloceanspaces.com/unraid-api/dynamix.unraid.net.plg" )
$ModeratorComment = "Recommended to upgrade the OS to enjoy the additional features of MyServers";
if ( $ModeratorComment ) {
$card .= "<div class='modComment'><div class='moderatorCommentHeader'> ".tr("Attention:")."</div><div class='moderatorComment'>$ModeratorComment</div></div>";
}