-Tweak search results (eg: search for Unraid would return some strange results)
-More intelligent duplicated template detection
pull/11/head
Squidly271 2021-11-06 10:48:47 -04:00
parent a2c591b807
commit d0965d9b0a
6 changed files with 31 additions and 17 deletions

View File

@ -2,7 +2,7 @@ a2272d2f6216b9eb6ab98307b8a247d8 ./Apps.page
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
1b49ec9797713ce869ea0c1066a109f2 ./default.cfg
3217b5f6a993a0b035cd9ae006e8ec0b ./include/exec.php
067f9f21a2a4bc360f3a7a12fd2fef0b ./include/exec.php
5810179d140aadc0a17b2d8782a32cba ./include/helpers.php
8ba23d3d51816bbb91245cfc3fcb8024 ./include/paths.php
eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js
@ -17,9 +17,9 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
729c178196af99c94116246f0c8be7a5 ./scripts/notices.php
430966e5646376b62905b63a30de7102 ./scripts/PluginAPI.php
9c7608a4a2cf279c8a2af88960e1642d ./scripts/pluginInstall.php
9eba209fba4bbf1a02e57ddafebfdf8c ./scripts/showStatistics.php
09b5297db02076376519d92e2ce76cc6 ./scripts/showStatistics.php
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
c8e4e9a16b47ecc0acf66d46be497599 ./skins/Narrow/css.php
ff3cc1e69087b21c4a8b5f82cf4d6929 ./skins/Narrow/css.php
e965c8fafd1eae7a0387e37cee3aeaf9 ./skins/Narrow/skin.html
b8834745e98616cf88a9c2d510dae649 ./skins/Narrow/skin.php
aef14cabd998f964f251943c81428fb9 ./skins/Narrow/skin.php

View File

@ -803,13 +803,12 @@ function get_content() {
$searchResults['favNameHit'][] = $template;
continue;
}
if ( filterMatch($filter,array($template['SortName'],$template['RepoName'],$template['Language'],$template['LanguageLocal'],$template['ExtraSearchTerms'])) ) {
if ( filterMatch($filter,array($template['SortName'],$template['RepoShort'],$template['Language'],$template['LanguageLocal'],$template['ExtraSearchTerms'])) ) {
if ( filterMatch($filter,array($template['ExtraSearchTerms'])) && $template['Plugin'] && $template['Author'] == "limetech" )
$searchResults['extraHit'][] = $template;
else
$searchResults['nameHit'][] = $template;
} elseif ( filterMatch($filter,array($template['Author'],$template['Overview'],$template['translatedCategories'])) ) {
} elseif ( filterMatch($filter,array($template['Author'],$template['RepoName'],$template['Overview'],$template['translatedCategories'])) ) {
if ( $template['RepoName'] == $caSettings['favourite'] ) {
$searchResults['nameHit'][] = $template;
} else {

View File

@ -109,7 +109,7 @@ switch ($_GET['arg1']) {
$count = 0;
foreach ($templates as $searchTemplates) {
if ( $template['Language'] ) continue;
if ( ($template['Repository'] == str_replace(":latest","",$searchTemplates['Repository'])) ) {
if ( (str_replace(["lscr.io/","ghcr.io/"],"",$template['Repository']) == str_replace(":latest","",str_replace(["lscr.io/","ghcr.io/"],"",$searchTemplates['Repository']))) ) {
if ( $searchTemplates['BranchName'] || $searchTemplates['Blacklist'] || $searchTemplates['Deprecated']) {
continue;
}

View File

@ -136,7 +136,7 @@ a.appIconsPopUp { text-decoration:none;color:inherit;}
.appLanguage{float:right;font-size:2rem;opacity:0.7;margin-left:1rem;}
.appLanguage::before{font-family:'Unraid';content:'\e987';}
.appDriver{float:right;font-size:1.8rem;opacity:0.7;margin-left:1rem;}
.appDriver::before{content:"\f085";font-family:fontAwesome;}
.appDriver::before{content:"\f2db";font-family:fontAwesome;}
.appsPerPage{float:right;}
.appsPerPage::before{content:"\f009";font-family:fontAwesome;}
.appsPerPage:hover{color:<?=$unRaid66color?>;}
@ -171,11 +171,14 @@ a.ca_author {text-decoration:none;color:inherit;}
.ca_categories {font-size:1rem;font-style:italic;}
a.ca_categories {text-decoration:none;color:inherit;}
.ca_center {margin:auto;text-align:center;}
.ca_credit { padding:.5rem 0 1rem 0; font-size:1.5rem;line-height:2rem; font-style:italic;}
.ca_creditheader { font-size:2rem; padding-top:1rem;}
.ca_discord::before{content:"\e988";font-family:Unraid;}
.ca_discord_popup::before{content:"\e988";font-family:Unraid;font-size:2.2rem;vertical-align:middle;}
img.ca_displayIcon{height:8rem;width:8rem;}
.ca_fa-additional::before{content:"\f055";font-family:fontAwesome;}
.ca_fa-comment::before{content:"\f075";font-family:fontAwesome;}
.ca_fa-delete {color:#882626;}
.ca_fa-delete::before {content:"\f00d";font-family:fontAwesome;}
a.ca_fa-delete{text-decoration:none;margin-left:1rem;font-size:2rem;margin-top:-0.25rem;cursor:pointer;float:right;}
@ -245,8 +248,7 @@ a.ca_repoPopup:hover {color:<?=$unRaid66color?>;}
.cardDescription{cursor: pointer;display: block;position: relative;top:0.5rem;max-height: 7rem;overflow: hidden;}
.cardDesc{display:inline-block;max-height:7rem;overflow:hidden;}
.card_readmore{color:<?=$unRaid66color?>;}
.cardWarning{font-size:1.5rem;animation: pulse 3s infinite;}
@keyframes pulse {0%,100% {color:#bdbd14;} 50% {color:transparent;}}
.cardWarning{font-size:1.5rem;color:#bdbd14;}
#Category{font-size:2rem;margin-bottom:0.5rem;}
.changelogTitle{font-size:2rem;line-height:2rem;margin-top:2rem;font-weight:normal;}
@ -314,6 +316,8 @@ input[type=button][disabled]{background:none;}
.myReadmoreButton {color:#6363ca;}
.noClick{cursor:default !important;}
.notice.shift {margin-top:0px;}
.officialCardBackground{clip-path: polygon(0 0,100% 0, 100% 100%);background-color: #854153;top:0px;height:9rem;width:9rem;position: relative;left:-10rem;margin-right:-9rem;}
.officialPopupText{position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform: rotate(45deg);color:white;font-size:2rem;position:absolute;top:2.25rem;right:-1rem;width:100%;overflow:hidden;height:2.5rem;}
p {margin:auto;text-align:left;margin-bottom:10px;} /* override dynamix styling for popup */
.pageDots::after {content:"...";}
.pageDots{color:grey;cursor:default;}

View File

@ -256,6 +256,10 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
if ( $template['Language'] ) {
$template['Installed'] = is_dir("{$caPaths['languageInstalled']}{$template['LanguagePack']}") && ! $template['Uninstall'];
}
if ( startsWith($template['Repository'],"library/") || startsWith($template['Repository'],"registry.hub.docker.com/library/") || strpos($template['Repository'],"/") === false)
$template['Official'] = true;
# Entries created. Now display it
$ct .= displayCard($template);
$count++;
@ -989,9 +993,16 @@ function displayCard($template) {
$card .= "
<div class='ca_applicationName'>$Name
";
if ( $CAComment || $ModeratorComment || $Deprecated || (isset($Compatible) && ! $Compatible) || $Blacklist ) {
if ( $CAComment || $ModeratorComment)
$commentIcon = "ca_fa-warning";
if ( $CAComment || $ModeratorComment || $Deprecated || (isset($Compatible) && ! $Compatible) || $Blacklist || $Requires) {
if ( $CAComment || $ModeratorComment) {
$commentIcon = "ca_fa-comment";
$warning = tr("Click info to see the notes regarding this application");
}
if ( $Requires) {
$commentIcon = "ca_fa-additional";
$warning = tr("This application has additional requirements");
}
if ( $Deprecated )
$warning = tr("This application template has been deprecated");
if ( ! $Compatible )
@ -999,7 +1010,7 @@ function displayCard($template) {
if ( $Blacklist )
$warning = tr("This application template has been blacklisted");
$card .= "&nbsp;<span class='ca_fa-warning cardWarning' title='".htmlentities($warning,ENT_QUOTES)."'></span>";
$card .= "&nbsp;<span class='$commentIcon cardWarning' title='".htmlentities($warning,ENT_QUOTES)."'></span>";
}
$card .= "
</div>
@ -1052,10 +1063,10 @@ function displayCard($template) {
<div class='spotlightPopupText' title='".tr("This is a spotlight application")."'></div>
</div>
";
} else if ( $Official ) {
} else if ( ($Official || strtolower($Author) == strtolower($Name) || in_array($Author,["plexinc","emby","onlyoffice"])) && ! $Language ) {
$card .= "
<div class='betaCardBackground'>
<div class='betaPopupText ca_center' title='This is an official container'>".tr("OFFICIAL")."</div>
<div class='officialCardBackground'>
<div class='officialPopupText ca_center' title='This is an official container'>".tr("OFFICIAL")."</div>
</div>
";
} else if ( $Trusted ) {