This commit is contained in:
Abdulrahman
2019-05-03 00:07:56 +03:00
parent 675a6df464
commit a824aea554
2 changed files with 12 additions and 8 deletions

View File

@@ -131,12 +131,12 @@
<!-- end new plugin modal --> <!-- end new plugin modal -->
<!-- ...... --> <!-- ...... -->
<!-- store --> <!-- store/check -->
<!-- ..... --> <!-- ..... -->
<ELSEIF NAME="case == store" OR="case == check"> <ELSEIF NAME="case == store" OR="case == check">
<IF NAME="no_store_plugins"> <IF NAME="no_store_plugins">
<div class="alert alert-info my-1"> <div class="alert alert-info my-3">
<IF NAME="case == check">{lang.ALL_PLUGINS_UPDATED}<ELSE>{lang.NO_PLUGINS}</IF> <IF NAME="case == check">{lang.ALL_PLUGINS_UPDATED}<ELSE>{lang.NO_PLUGINS}</IF>
</div> </div>
</IF> </IF>
@@ -146,11 +146,14 @@
<li class="media d-flex justify-content-between list-group-item"> <li class="media d-flex justify-content-between list-group-item">
<img class="mr-3 rounded-circle" src="{{icon}}" alt="{{title}}" style="width: 75px"> <img class="mr-3 rounded-circle" src="{{icon}}" alt="{{title}}" style="width: 75px">
<div class="media-body"> <div class="media-body">
<h5 class="mt-0 mb-1 pull-(lang.DIR==ltr?left:right)">{{title}}</h5> <h5 class="mt-0 mb-2">{{title}}</h5>
<!-- Button trigger modal --> <!-- Button trigger modal -->
<button type="button" class="btn btn-primary pull-(lang.DIR==ltr?right:left)" data-toggle="modal" data-target="#Modal_{{name}}"> <div class="justify-content-between">
<IF NAME="case == check">{lang.UPDATE}<ELSE>{lang.VIEW}</IF> <span>{{version}} <IF NAME="case == check"> → {{current_version}}</IF></span>
</button> <button type="button" class="btn btn-primary pull-(lang.DIR==ltr?right:left)" data-toggle="modal" data-target="#Modal_{{name}}">
<IF NAME="case == check">{lang.UPDATE}<ELSE>{lang.VIEW}</IF>
</button>
</div>
<!-- Modal --> <!-- Modal -->
<div class="modal fade" id="Modal_{{name}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="Modal_{{name}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">

View File

@@ -180,8 +180,8 @@ switch ($case):
// is there a new version of this in the store // is there a new version of this in the store
elseif ($case == 'check' && (! empty($installed_plugins[$plugin_info['name']]) && elseif ($case == 'check' && (! empty($installed_plugins[$plugin_info['name']]) &&
version_compare( version_compare(
strtolower($installed_plugins[$row['plg_name']]['extra_info']['plugin_version']), strtolower($installed_plugins[$plugin_info['name']]['extra_info']['plugin_version']),
$plugin_info['file']['version'], strtolower($plugin_info['file']['version']),
'>=') || empty($installed_plugins[$plugin_info['name']])) '>=') || empty($installed_plugins[$plugin_info['name']]))
) { ) {
continue; continue;
@@ -193,6 +193,7 @@ switch ($case):
'version' => $plugin_info['file']['version'], 'version' => $plugin_info['file']['version'],
'title' => ! empty($plugin_info['title'][$config['language']]) ? $plugin_info['title'][$config['language']] : $plugin_info['title']['en'], 'title' => ! empty($plugin_info['title'][$config['language']]) ? $plugin_info['title'][$config['language']] : $plugin_info['title']['en'],
'website' => $plugin_info['website'], 'website' => $plugin_info['website'],
'current_version' => ! empty($installed_plugins[$plugin_info['name']]) ? strtolower($installed_plugins[$plugin_info['name']]['extra_info']['plugin_version']) : '',
'kj_min_version' => $plugin_info['kleeja_version']['min'], 'kj_min_version' => $plugin_info['kleeja_version']['min'],
'kj_max_version' => $plugin_info['kleeja_version']['max'], 'kj_max_version' => $plugin_info['kleeja_version']['max'],
'kj_version_cmtp' => sprintf($lang[ 'KLJ_VER_NO_PLUGIN'], $plugin_info['kleeja_version']['min'], $plugin_info['kleeja_version']['max']), 'kj_version_cmtp' => sprintf($lang[ 'KLJ_VER_NO_PLUGIN'], $plugin_info['kleeja_version']['min'], $plugin_info['kleeja_version']['max']),