Plugins page loading improvements

This commit is contained in:
bergware
2021-05-10 11:17:21 +02:00
parent 33dc2e6d94
commit 3a70606dab
@@ -89,7 +89,7 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
$version = plugin('version',$plugin_file) ?: _('unknown');
$date = str_replace('.','',$version);
//status
$status = _('unknown');
$status = _('checking');
$id = str_replace('.','-',$name);
$empty = false;
echo "<tr id=\"".str_replace(['.',' ','_'],'',basename($plugin_file,'.plg'))."\">";
@@ -97,7 +97,7 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
echo "<td><span class='desc_readmore' style='display:block'>$desc</span> $support</td>";
echo "<td>$author</td>";
echo "<td id='vid-$id' data='$date'>$version&nbsp;<span class='fa fa-info-circle fa-fw big blue-text'></span></td>";
echo "<td id='sid-$id' data='0'><span class='fa fa-spin fa-refresh'></span>&nbsp;$status</td>";
echo "<td id='sid-$id' data='0'><span style='color:#267CA8'><i class='fa fa-refresh fa-spin fa-fw'></i>&nbsp;$status...</span></td>";
echo "<td>";
if ($os) {
$regular = ['stable','next'];
@@ -150,7 +150,7 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
if (!$os) $updates++;
} else {
//status is considered outdated when older than 1 day
$status = filectime($filename) > (time()-86400) ? _('up-to-date') : _('need check');
$status = filectime($filename) > (time()-86400) ? "<span class='green-text'><i class='fa fa-check fa-fw'></i>&nbsp;"._('up-to-date')."</span>" : "<span class='orange-text'><i class='fa fa-flash fa-fw'></i>&nbsp;"._('need check')."</span>";
}
}
}