mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Fix safari not resizing flasgs correctly
This commit is contained in:
parent
4da2c89812
commit
37ddf702e6
BIN
archive/community.applications-2023.05.13-x86_64-1.txz
Normal file
BIN
archive/community.applications-2023.05.13-x86_64-1.txz
Normal file
Binary file not shown.
@ -2105,17 +2105,33 @@ function updateDisplay(content) {
|
||||
$(this).html(description + "... <span class='card_readmore'><?=tr("Read more")?></span>");
|
||||
}
|
||||
});
|
||||
var newSize;
|
||||
$(".ca_applicationName,.betaPopupText,.installedCardText,.upgradePopupText,.ltofficialPopupText").each(function() {
|
||||
$(".ca_applicationName").each(function() {
|
||||
var newSize = 100;
|
||||
while (isOverflown(this)) {
|
||||
console.log(this);
|
||||
var existingSize = $(this).css("font-size");
|
||||
var size = parseInt(existingSize);
|
||||
if ( size == newSize + 1 ) { // looks like browsers in Chinese have a minimum enforced font-size
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
var newSize = size - 1;
|
||||
if (newSize == 8)
|
||||
break;
|
||||
|
||||
$(this).css("font-size",newSize+"px");
|
||||
}
|
||||
});
|
||||
$(".betaPopupText,.installedCardText,.upgradePopupText,.ltofficialPopupText").each(function() {
|
||||
var newSize = 100;
|
||||
while (isOverflown(this,true)) {
|
||||
var existingSize = $(this).css("font-size");
|
||||
var size = parseInt(existingSize);
|
||||
if ( size == newSize + 1 ) { // looks like browsers in Chinese have a minimum enforced font-size
|
||||
break;
|
||||
}
|
||||
var newSize = size - 1;
|
||||
if (newSize == 0)
|
||||
return false;
|
||||
break;
|
||||
|
||||
$(this).css("font-size",newSize+"px");
|
||||
}
|
||||
@ -2133,8 +2149,13 @@ function updateDisplay(content) {
|
||||
|
||||
}
|
||||
|
||||
function isOverflown(el){
|
||||
return (el.scrollHeight > el.clientHeight) || (el.scrollWidth > el.clientWidth);
|
||||
function isOverflown(el,type=false){
|
||||
if (type)
|
||||
return (el.scrollWidth > el.clientWidth);
|
||||
else
|
||||
return (el.scrollHeight > el.clientHeight);
|
||||
|
||||
return (el.scrollHeight > el.clientHeight) || (el.scrollWidth > el.clientWidth)||(el.offsetWidth < el.scrollWidth);
|
||||
}
|
||||
|
||||
function saveState() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
6643ff499b587226a3f672e97b03da31 ./Apps.page
|
||||
60172372ae88e06955c66d0046ffd0db ./Apps.page
|
||||
106b521c1feebda4d7b3f558cc016cda ./CA_notices.page
|
||||
39053aadf8ec0771de1e2c2dd47e9058 ./ca_settings.page
|
||||
01ed7990078dee7cecfeda9a4e49377e ./default.cfg
|
||||
@ -20,6 +20,7 @@ ed42a35b3524b55e2024cdd56a795733 ./scripts/pluginInstall.php
|
||||
f2a86fd875cb73bb095388e69ca035fd ./scripts/showStatistics.php
|
||||
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
|
||||
5c088a7cf82229cb64edfd4c415a84a0 ./scripts/updatePluginSupport.php
|
||||
c91992cf753a12f379773603c800958c ./skins/Narrow/css.php
|
||||
49278ae3008d2e2c54d39c1817a8c249 ./skins/Narrow/._css.php
|
||||
05ba118108ebacddaadbc03f08ee310a ./skins/Narrow/css.php
|
||||
d642a25efb891e51471fc4c7636da885 ./skins/Narrow/skin.html
|
||||
a485fbc40a8b8a21dd359032bab90d2d ./skins/Narrow/skin.php
|
||||
515abf863dad9ccf5331050546cc246b ./skins/Narrow/skin.php
|
||||
|
@ -296,7 +296,7 @@ img.displayIcon{height:6.4rem;width:6.4rem;border-radius:1rem 1rem 1rem 1rem;}
|
||||
.initDockerSearch:hover{color:<?=$unRaid66color?>}
|
||||
a.initDockerSearch{cursor:pointer;text-decoration:none;color:unset;}
|
||||
.installedCardBackground{clip-path: polygon(0 0,100% 0, 100% 100%);background-color: #322fff;top:0px;height:9rem;width:9rem;position: relative;left:-10rem;margin-right:-9rem;}
|
||||
.installedCardText{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.5rem;right:-1rem;width:100%;overflow:hidden;height:2rem;}
|
||||
.installedCardText{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:2rem;right:0rem;width:6rem;overflow:hidden;height:2.5rem; display:inline;}
|
||||
input[type=checkbox]{width:2rem;height:2rem;margin-left:0rem;}
|
||||
input[type=button]{background:none;font-size:1.5rem;}
|
||||
input:hover[type=button]{color:<?=$unRaid66color?>;background:none !important;}
|
||||
|
@ -694,9 +694,11 @@ function getPopupDescriptionSkin($appNumber) {
|
||||
$template['Installed'] = true;
|
||||
$template['installedVersion'] = plugin("version","/var/log/plugins/$pluginName");
|
||||
if ( ($template['installedVersion'] != $template['pluginVersion'] || $template['installedVersion'] != plugin("version","/tmp/plugins/$pluginName") ) && $template['Name'] !== "Community Applications") {
|
||||
@copy($caPaths['pluginTempDownload'],"/tmp/plugins/$pluginName");
|
||||
$template['UpdateAvailable'] = true;
|
||||
$actionsContext[] = ["icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"installPlugin('$pluginName',true);"];
|
||||
if (is_file($caPaths['pluginTempDownload'])) {
|
||||
@copy($caPaths['pluginTempDownload'],"/tmp/plugins/$pluginName");
|
||||
$template['UpdateAvailable'] = true;
|
||||
$actionsContext[] = ["icon"=>"ca_fa-update","text"=>tr("Update"),"action"=>"installPlugin('$pluginName',true);"];
|
||||
}
|
||||
} else {
|
||||
$template['UpdateAvailable'] = false;
|
||||
}
|
||||
@ -1343,44 +1345,44 @@ function displayCard($template) {
|
||||
} elseif ( $Blacklist ) {
|
||||
$card .= "
|
||||
<div class='warningCardBackground'>
|
||||
<div class='betaPopupText ca_center' title='".tr("This application template / has been blacklisted")."'>".tr("Blacklisted")."$flagTextEnd</div>
|
||||
<div class='installedCardText ca_center' title='".tr("This application template / has been blacklisted")."'>".tr("Blacklisted")."$flagTextEnd</div>
|
||||
</div>
|
||||
";
|
||||
} elseif ( $caTemplateExists ) {
|
||||
$card .= "
|
||||
<div class='warningCardBackground'>
|
||||
<div class='betaPopupText ca_center' title='".tr("Template already exists in Apps")."'>".tr("Template Exists")."</div>
|
||||
<div class='installedCardText ca_center' title='".tr("Template already exists in Apps")."'>".tr("Template Exists")."</div>
|
||||
</div>
|
||||
";
|
||||
} elseif ( isset($Compatible) && ! $Compatible ) {
|
||||
$verMsg = $VerMessage ?? tr("This application is not compatible with your version of Unraid");
|
||||
$card .= "
|
||||
<div class='warningCardBackground'>
|
||||
<div class='betaPopupText ca_center' title='$verMsg'>$flagTextStart".tr("Incompatible")."$flagTextEnd</div>
|
||||
<div class='installedCardText ca_center' title='$verMsg'>$flagTextStart".tr("Incompatible")."$flagTextEnd</div>
|
||||
</div>
|
||||
";
|
||||
} elseif ( $Deprecated ) {
|
||||
$card .= "
|
||||
<div class='warningCardBackground'>
|
||||
<div class='betaPopupText ca_center' title='".tr("This application template has been deprecated")."'>".tr("Deprecated")."$flagTextEnd</div>
|
||||
<div class='installedCardText ca_center' title='".tr("This application template has been deprecated")."'>".tr("Deprecated")."$flagTextEnd</div>
|
||||
</div>
|
||||
";
|
||||
} elseif ( $Official ) {
|
||||
$card .= "
|
||||
<div class='officialCardBackground'>
|
||||
<div class='officialPopupText ca_center' title='".tr('This is an official container')."'>".tr("OFFICIAL")."</div>
|
||||
<div class='installedCardText ca_center' title='".tr('This is an official container')."'>".tr("OFFICIAL")."</div>
|
||||
</div>
|
||||
";
|
||||
} elseif ( $LTOfficial ?? false ) {
|
||||
$card .= "
|
||||
<div class='LTOfficialCardBackground'>
|
||||
<div class='ltofficialPopupText ca_center' title='".tr("This is an offical plugin")."'>".tr("OFFICIAL")."</div>
|
||||
<div class='installedCardText ca_center' title='".tr("This is an offical plugin")."'>".tr("OFFICIAL")."</div>
|
||||
</div>
|
||||
";
|
||||
} elseif ( $Beta ) {
|
||||
$card .= "
|
||||
<div class='betaCardBackground'>
|
||||
<div class='betaPopupText ca_center'>".tr("BETA")."</div>
|
||||
<div class='installedCardText ca_center'>".tr("BETA")."</div>
|
||||
</div>
|
||||
";
|
||||
}/* elseif ( $RecommendedDate ) {
|
||||
@ -1392,7 +1394,7 @@ function displayCard($template) {
|
||||
} */ elseif ( $Trusted ) {
|
||||
$card .= "
|
||||
<div class='spotlightCardBackground'>
|
||||
<div class='betaPopupText ca_center' title='".tr("This container is digitally signed")."'>".tr("Digitally Signed")."</div>
|
||||
<div class='installedCardText ca_center' title='".tr("This container is digitally signed")."'>".tr("Digitally Signed")."</div>
|
||||
</div>
|
||||
";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user