Switch to backup spotlight icon if download error

This commit is contained in:
Squidly271 2023-04-14 13:30:12 -04:00
parent 575f677e76
commit 9ba52bc94b
5 changed files with 13 additions and 10 deletions

Binary file not shown.

View File

@ -2034,6 +2034,9 @@ function updateDisplay(content) {
setToolTip();
enableSearch();
$('img').on("error",function() {
if ( $(this).hasClass("spotlightIcon") )
$(this).attr('src','<?=$caPaths['SpotlightIcon-backup']?>');
else
$(this).attr('src',"/plugins/dynamix.docker.manager/images/question.png");
});
context.init();

View File

@ -1,10 +1,10 @@
88af72171bdf94201de853ad7a236cf7 ./Apps.page
8bfbfe80c80a69cbe56675912c8fa7ba ./Apps.page
106b521c1feebda4d7b3f558cc016cda ./CA_notices.page
eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
c2bfb8bd4a8b9620510697813b7ba2c8 ./include/exec.php
1b595018a6f02d2667192432f8f2ae7f ./include/helpers.php
7cc3e1ffd81120a1cf407857225db275 ./include/paths.php
63a864b6f5dd0a4f3a52eeb7fa50992d ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
71f911a818d88d3d567f8a2898094ee2 ./README.md
ec075d8b9758ba00bda9b02c4692f972 ./scripts/checkForUpdates.php
@ -22,4 +22,4 @@ f2a86fd875cb73bb095388e69ca035fd ./scripts/showStatistics.php
5c088a7cf82229cb64edfd4c415a84a0 ./scripts/updatePluginSupport.php
604d77247526cb12b7bda12244527879 ./skins/Narrow/css.php
d642a25efb891e51471fc4c7636da885 ./skins/Narrow/skin.html
27c7ca56ce69782db91d14fe767925b6 ./skins/Narrow/skin.php
c342e9449e99c25e489b935460281f3b ./skins/Narrow/skin.php

View File

@ -37,8 +37,8 @@ $caPaths['startupDisplayed'] = $caPaths['tempFiles']."/startu
$caPaths['repositoriesDisplayed'] = $caPaths['tempFiles']."/repositoriesDisplayed.json";
$caPaths['application-feed'] = "https://raw.githubusercontent.com/Squidly271/AppFeed/master/applicationFeed.json";
$caPaths['application-feed-last-updated'] = "https://raw.githubusercontent.com/Squidly271/AppFeed/master/applicationFeed-lastUpdated.json";
$caPaths['application-feedBackup'] = "https://s3.amazonaws.com/dnld.lime-technology.com/appfeed/master/applicationFeed.json";
$caPaths['application-feed-last-updatedBackup'] = "https://s3.amazonaws.com/dnld.lime-technology.com/appfeed/master/applicationFeed-lastUpdated.json";
$caPaths['application-feedBackup'] = "https://dnld.lime-technology.com/appfeed/master/applicationFeed.json";
$caPaths['application-feed-last-updatedBackup'] = "https://dnld.lime-technology.com/appfeed/master/applicationFeed-lastUpdated.json";
$caPaths['appFeedDownloadError'] = $caPaths['tempFiles']."/downloaderror.txt";
$caPaths['categoryList'] = $caPaths['tempFiles']."/categoryList.json";
$caPaths['repositoryList'] = $caPaths['tempFiles']."/repositoryList.json";
@ -88,8 +88,8 @@ $caPaths['dockerSearchInstall'] = $caPaths['tempFiles']."/docker
$caPaths['dockerSearchActive'] = $caPaths['tempFiles']."/dockerSearchActive";
$caPaths['dockerConvertFlash'] = $dockerManPaths['templates-user']."/my-CA_TEST_CONTAINER_DOCKERHUB.xml";
$caPaths['pluginPending'] = "/tmp/plugins/pluginPending/";
//$caPaths['SpotlightIcon'] = "https://raw.githubusercontent.com/Squidly271/community.applications/master/webImages/Unraid.svg";
$dynamixSettings = parse_ini_file($caPaths['dynamixSettings']);
$caPaths['SpotlightIcon'] = "https://github.com/Squidly271/community.applications/raw/master/webImages/spotlight_{$dynamixSettings['theme']}.png";
$caPaths['SpotlightIcon-backup'] = "https://s3.amazonaws.com/dnld.lime-technology.com/community-apps/assets/spotlight/spotlight_{$dynamixSettings['theme']}.png";
?>

View File

@ -619,7 +619,7 @@ function getPopupDescriptionSkin($appNumber) {
$templateIcon = startsWith($template['IconFA'],"icon-") ? "{$template['IconFA']} unraidIcon" : "fa fa-{$template['IconFA']}";
$template['display_icon'] = "<i class='$templateIcon popupIcon'></i>";
} else
$template['display_icon'] = "<img class='popupIcon screenshot' href='{$template['Icon']}' src='{$template['Icon']}' onerror='this.src=&quot;/plugins/dynamix.docker.manager/images/question.png&quot;' alt='Application Icon'>";
$template['display_icon'] = "<img class='popupIcon screenshot' href='{$template['Icon']}' src='{$template['Icon']}' alt='Application Icon'>";
if ( $template['Requires'] ) {
$template['Requires'] = Markdown(strip_tags(str_replace(["\r","\n","&#xD;"],["","<br>",""],trim($template['Requires'])),"<br>"));
@ -896,7 +896,7 @@ function getRepoDescriptionSkin($repository) {
<div class='popUpBack'>".tr("BACK")."</div>
<div class='ca_popupIconArea'>
<div class='popupIcon'>
$iconPrefix<img class='popupIcon' src='{$repo['icon']}' onerror='this.src=&quot;/plugins/dynamix.docker.manager/images/question.png&quot;'>$iconPostfix
$iconPrefix<img class='popupIcon' src='{$repo['icon']}'>$iconPostfix
</div>
<div class='popupInfo'>
<div class='popupName'>$repository</div>
@ -1581,7 +1581,7 @@ function displayPopup($template) {
<div class='popupInfoRight'>
<div class='popupAuthorTitle'>".tr("Maintainer")."</div>
<div><div class='popupAuthor'>$RepoName</div>
<div class='popupAuthorIcon'>$remoteIconPrefix<img class='popupAuthorIcon' src='$ProfileIcon' onerror='this.src=&quot;/plugins/dynamix.docker.manager/images/question.png&quot;' alt='Repository Icon'></img>$remoteIconPostfix</div>
<div class='popupAuthorIcon'>$remoteIconPrefix<img class='popupAuthorIcon' src='$ProfileIcon' alt='Repository Icon'></img>$remoteIconPostfix</div>
</div>
<div class='ca_repoSearchPopUp popupProfile' data-repository='".htmlentities($Repo,ENT_QUOTES)."'>".tr("All Apps")."</div>
<div class='repoPopup' data-repository='".htmlentities($Repo,ENT_QUOTES)."'>".tr("Profile")."</div>