pinning refinements

This commit is contained in:
Squidly271 2021-10-30 23:58:32 -04:00
parent 4dbb738754
commit 1d11647fb8
5 changed files with 41 additions and 34 deletions

View File

@ -356,7 +356,7 @@ $(function(){
}
});
$("body").on("click",".repoPopup,.ca_repoinfo,.ca_reporeadmore,.ca_repoFromPopUp", function() {
$("body").on("click",".repoPopup,.ca_repoinfo,.ca_reporeadmore,.ca_repoFromPopUp,.cardDescriptionRepo", function() {
context.destroy("#supportPopup");
context.destroy("#actionsPopup");
if ( ! $(".sidebar").is(":visible") ) {

View File

@ -1,4 +1,4 @@
794c98df447faf75dd36d405b9675ac5 ./Apps.page
7d2b3197d81d89b703460f922304cbf6 ./Apps.page
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
1b49ec9797713ce869ea0c1066a109f2 ./default.cfg
@ -20,6 +20,6 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
9eba209fba4bbf1a02e57ddafebfdf8c ./scripts/showStatistics.php
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
62fa68c6f6a42cdb79dd0d60b5f8a3f6 ./skins/Narrow/css.php
f1c0357c72a6b92cfaf3f3ad4c8088bb ./skins/Narrow/css.php
4ff34c148d3dde1a420303faecd414ae ./skins/Narrow/skin.html
f57e302392666058ac2c81140f6f2d54 ./skins/Narrow/skin.php
1ff9666b927c3e7d09c4a31e91668bc8 ./skins/Narrow/skin.php

View File

@ -275,7 +275,7 @@ img.displayIcon {height:6.4rem;width:6.4rem;border-radius:1rem 1rem 1rem 1rem;}
.fav{background-color:#009900;}
.nonfav{background-color: <?=$supportPopupBackground?>;}
.favCardSpotlight{left:-40.25rem !important;}
.favCardBackground{float:right;color:#bb0000;padding-top:.25rem;}
.favCardBackground{float:right;color:#bb0000;padding-top:.25rem;margin-left:1rem;}
.favCardBackground::before{content:"\f004";font-family:fontAwesome;}
.homeMore{color:<?=$unRaid66color?>;cursor:pointer;}
.homeMore:hover{color:#d67777;}
@ -320,6 +320,8 @@ p {margin:auto;text-align:left;margin-bottom:10px;} /* override dynamix styling
.pageSelected {cursor:default;color:<?=$unRaid66color?>;}
.pinned {margin-left:1rem;font-size:2rem;cursor:pointer;padding-left:.5rem;padding-right:.5rem;cursor:pointer;color:#1fa67a;padding:.3rem;}
.pinned::after {content:"\f08d";font-family:fontAwesome;}
.pinnedCard{float:right;color:#1fa67a;padding-top:.25rem;font-size:1.5rem;}
.pinnedCard::before{content:"\f08d";font-family:fontAwesome;}
.pinned:hover {text-decoration:none;color:<?=$unRaid66color?>;}
.plugin::after {font-family:'Unraid';content:'\e986';font-size:2.5rem;}
.popup-donate {background:white;background: -webkit-linear-gradient(top, transparent 0%, rgba(0,0,0,0.4) 100%),-webkit-linear-gradient(left, lighten(<?=$donateBackground?>, 15%) 0%, <?=$donateBackground?> 50%, lighten(<?=$donateBackground?>, 15%) 100%); background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 100%), linear-gradient(to right, lighten(#E68321, 15%) 0%, #E68321 50%, lighten(#E68321, 15%) 100%); background-position: 0 0; background-size: 200% 100%; border-radius: 15px; color: #fff; padding: 1px 10px 1px 10px; text-shadow: 1px 1px 5px #666;}

View File

@ -80,10 +80,10 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
if ( ! $template['bio'] )
$template['CardDescription'] = tr("No description present");
else
$template['CardDescription'] = $template['bio'];
$template['bio'] = strip_tags(markdown($template['bio']));
else {
$template['bio'] = strip_tags(markdown($template['bio']));
$template['Description'] = $template['bio'];
}
$template['display_dockerName'] = $template['RepoName'];
$favClass = ( $caSettings['favourite'] && ($caSettings['favourite'] == $template['RepoName']) ) ? "ca_favouriteRepo" : "ca_non_favouriteRepo";
@ -160,14 +160,16 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
@copy($caPaths['pluginTempDownload'],"/tmp/plugins/$pluginName");
$actionsContext[] = array("icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"installPlugin('$pluginName',true);");
}
$pluginSettings = $pluginName == "community.applications.plg" ? "ca_settings" : plugin("launch","/var/log/plugins/$pluginName");
$pluginSettings = ($pluginName == "community.applications.plg") ? "ca_settings" : plugin("launch","/var/log/plugins/$pluginName");
if ( $pluginSettings ) {
$actionsContext[] = array("icon"=>"ca_fa-pluginSettings","text"=>tr("Settings"),"action"=>"openNewWindow('/Apps/$pluginSettings');");
}
if ( ! empty($actionsContext) )
$actionsContext[] = array("divider"=>true);
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>tr("Uninstall"),"action"=>"uninstallApp('/var/log/plugins/$pluginName','".str_replace(" ","&#32;",$template['Name'])."');");
if ( $pluginName != "community.applications.plg" ) {
if ( ! empty($actionsContext) )
$actionsContext[] = array("divider"=>true);
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>tr("Uninstall"),"action"=>"uninstallApp('/var/log/plugins/$pluginName','".str_replace(" ","&#32;",$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']}');");
@ -508,10 +510,9 @@ function getPopupDescriptionSkin($appNumber) {
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>"<span class='ca_red'>".tr("Remove from Previous Apps")."</span>","action"=>"removeApp('{$template['InstallPath']}','{$template['Name']}');");
} else {
if ( ! $template['BranchID'] ) {
$template['newInstallAction'] = "popupInstallXML('".addslashes($template['Path'])."','default');";
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"popupInstallXML('".addslashes($template['Path'])."','default');");
} else {
$template['newInstallAction'] = "displayTags('{$template['ID']}');";
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"displayTags('{$template['ID']}');");
}
}
}
@ -522,14 +523,16 @@ function getPopupDescriptionSkin($appNumber) {
@copy($caPaths['pluginTempDownload'],"/tmp/plugins/$pluginName");
$actionsContext[] = array("icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"installPlugin('$pluginName',true);");
}
$pluginSettings = $pluginName == "community.applications.plg" ? "ca_settings" : plugin("launch","/var/log/plugins/$pluginName");
$pluginSettings = ($pluginName == "community.applications.plg") ? "ca_settings" : plugin("launch","/var/log/plugins/$pluginName");
if ( $pluginSettings ) {
$actionsContext[] = array("icon"=>"ca_fa-pluginSettings","text"=>tr("Settings"),"action"=>"openNewWindow('/Apps/$pluginSettings');");
}
if ( ! empty($actionsContext) )
$actionsContext[] = array("divider"=>true);
if ( $pluginName != "community.applications.plg" ) {
if ( ! empty($actionsContext) )
$actionsContext[] = array("divider"=>true);
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>"<span class='ca_red'>".tr("Uninstall")."</span>","action"=>"uninstallApp('/var/log/plugins/$pluginName','{$template['Name']}');");
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>"<span class='ca_red'>".tr("Uninstall")."</span>","action"=>"uninstallApp('/var/log/plugins/$pluginName','{$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']}');");
@ -865,7 +868,7 @@ function displayCard($template) {
$card .= "
<div class='ca_holder $class'>
<div class='ca_bottomLine $bottomClass'>
<div class='infoButton $cardClass' data-apppath='$Path' data-appname='$Name' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'>".tr("Info")."</div>
<div class='infoButton $cardClass' data-apppath='$Path' data-appname='$Name' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'>".tr("Info")."</div>
";
if ( $class == "spotlightHome" ) {
if ( $actionsContext ) {
@ -883,14 +886,15 @@ function displayCard($template) {
<div class='supportButton supportButtonCardContext' id='support$ID' data-context='".json_encode($supportContext)."'>".tr("Support")."</div>
";
$card .= "
<span class='$appType' title='".htmlentities($typeTitle)."'></span>
";
$card .= "<span class='$appType' title='".htmlentities($typeTitle)."'></span>";
if ( $ca_fav ) {
$favText = $RepositoryTemplate ? tr("This is your favourite repository") : tr("This application is from your favourite repository");
$card .= "<span class='favCardBackground' title='".htmlentities($favText)."' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'></span>";
} else
$card .= "<span class='favCardBackground' title='".htmlentities($favText)."' style='display:none;' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'></span>";
if ( $Pinned )
$card .= "<span class='pinnedCard'></span>";
if ($Removable && !$DockerInfo && ! $Installed) {
$previousAppName = $Plugin ? $PluginURL : $Name;
@ -933,7 +937,8 @@ function displayCard($template) {
$ovr = str_replace("\n","<br>",$ovr);
$Overview = explode("<br>",$ovr)[0];
$card .= "<div class='cardDescription ca_backgroundClickable' data-apppath='$Path' data-appname='$Name' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'><div class='cardDesc'>$Overview</div></div>";
$descClass= $RepositoryTemplate ? "cardDescriptionRepo" : "cardDescription";
$card .= "<div class='$descClass ca_backgroundClickable' data-apppath='$Path' data-appname='$Name' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'><div class='cardDesc'>$Overview</div></div>";
if ( $RecommendedDate ) {
$card .= "
<div class='homespotlightIconArea ca_center' data-apppath='$Path' data-appname='$Name' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'>
@ -989,15 +994,15 @@ function displayPopup($template) {
$card .= "<div class='popupAuthorMain'>$Author</div>";
if ( $actionsContext ) {
$card .= "
<div class='actionsPopup' id='actionsPopup'>".tr("Actions")."</div>
";
}
if ( $newInstallAction ) {
$card .= "
<div class='actionsPopup'><span onclick=$newInstallAction><span class='ca_fa-install'> ".tr("Install")."</span></span></div>
";
if ( count($actionsContext) == 1 ) {
$card .= "<div class='actionsPopup'><span onclick={$actionsContext[0]['action']}>{$actionsContext[0]['text']}</span></div>";
} else {
$card .= "
<div class='actionsPopup' id='actionsPopup'>".tr("Actions")."</div>
";
}
}
if ( count($supportContext) == 1 )
$card .= "<div class='supportPopup'><a href='{$supportContext[0]['link']}' target='_blank'><span class='{$supportContext[0]['icon']}'> {$supportContext[0]['text']}</span></a></div>";
elseif ( count($supportContext) )