If all updates are applied, show Fully Updated. Fixes #101

Also include code for a more smooth visualization of the data
This commit is contained in:
Flavio Copes
2015-08-28 17:31:45 +02:00
parent 6a755ec692
commit 4176b32e61
4 changed files with 15 additions and 2 deletions

View File

@@ -355,6 +355,8 @@ class AdminPlugin extends Plugin
'OF_THIS',
'HAVE_AN_UPDATE_AVAILABLE',
'UPDATE_AVAILABLE',
'UPDATES_AVAILABLE',
'FULLY_UPDATED',
'DAYS'];
foreach($strings as $string) {

View File

@@ -424,6 +424,7 @@ en:
METADATA_KEY: "Key (e.g. 'Keywords')"
METADATA_VALUE: "Value (e.g. 'Blog, Grav')"
USERNAME_HELP: Username should be between 3 and 16 characters, including lowercase letters, numbers, underscores, and hyphens. Uppercase letters, spaces, and special characters are not allowed
FULLY_UPDATED: Fully Updated
es:
PLUGIN_ADMIN:
@@ -865,6 +866,7 @@ it:
METADATA_KEY: "Key (e.g. 'Keywords')"
METADATA_VALUE: "Value (e.g. 'Blog, Grav')"
USERNAME_HELP: Il nome utente deve essere compreso tra 3 e 16 caratteri, composti da lettere minuscole, numeri, trattini o il carattere di sottolineatura. Lettere maiuscole, spazi e caratteri speciali non sono consentiti
FULLY_UPDATED: Tutto aggiornato
de:
PLUGIN_ADMIN:
@@ -1287,3 +1289,5 @@ de:
METADATA_KEY: "Key (e.g. 'Keywords')"
METADATA_VALUE: "Value (e.g. 'Blog, Grav')"
USERNAME_HELP: Username should be between 3 and 16 characters, including lowercase letters, numbers, underscores, and hyphens. Uppercase letters, spaces, and special characters are not allowed
FULLY_UPDATED: Fully Updated

View File

@@ -78,6 +78,13 @@ $(function () {
UpdatesChart.on('draw', function(data){
if (data.index) { return; }
chart.find('.numeric span').text(Math.round(data.value) + '%');
var text = translations.PLUGIN_ADMIN.UPDATES_AVAILABLE;
if (data.value == 100) {
text = translations.PLUGIN_ADMIN.FULLY_UPDATED;
}
$('.js__updates-available-description').html(text)
$('.updates-chart .hidden').removeClass('hidden');
});
}

View File

@@ -35,9 +35,9 @@
<div class="updates-chart">
<div class="chart-wrapper">
<div class="ct-chart"></div>
<span class="numeric"><span>-</span><em>{{ "PLUGIN_ADMIN.UPDATED"|tu|lower }}</em></span>
<span class="numeric hidden"><span>-</span><em>{{ "PLUGIN_ADMIN.UPDATED"|tu|lower }}</em></span>
</div>
<p>{{ "PLUGIN_ADMIN.UPDATES_AVAILABLE"|tu }}</p>
<p class="js__updates-available-description">&nbsp;</p>
</div>
<div class="backups-chart">
<div class="chart-wrapper">