mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-16 02:06:08 +01:00
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:
@@ -355,6 +355,8 @@ class AdminPlugin extends Plugin
|
|||||||
'OF_THIS',
|
'OF_THIS',
|
||||||
'HAVE_AN_UPDATE_AVAILABLE',
|
'HAVE_AN_UPDATE_AVAILABLE',
|
||||||
'UPDATE_AVAILABLE',
|
'UPDATE_AVAILABLE',
|
||||||
|
'UPDATES_AVAILABLE',
|
||||||
|
'FULLY_UPDATED',
|
||||||
'DAYS'];
|
'DAYS'];
|
||||||
|
|
||||||
foreach($strings as $string) {
|
foreach($strings as $string) {
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ en:
|
|||||||
METADATA_KEY: "Key (e.g. 'Keywords')"
|
METADATA_KEY: "Key (e.g. 'Keywords')"
|
||||||
METADATA_VALUE: "Value (e.g. 'Blog, Grav')"
|
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
|
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:
|
es:
|
||||||
PLUGIN_ADMIN:
|
PLUGIN_ADMIN:
|
||||||
@@ -865,6 +866,7 @@ it:
|
|||||||
METADATA_KEY: "Key (e.g. 'Keywords')"
|
METADATA_KEY: "Key (e.g. 'Keywords')"
|
||||||
METADATA_VALUE: "Value (e.g. 'Blog, Grav')"
|
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
|
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:
|
de:
|
||||||
PLUGIN_ADMIN:
|
PLUGIN_ADMIN:
|
||||||
@@ -1287,3 +1289,5 @@ de:
|
|||||||
METADATA_KEY: "Key (e.g. 'Keywords')"
|
METADATA_KEY: "Key (e.g. 'Keywords')"
|
||||||
METADATA_VALUE: "Value (e.g. 'Blog, Grav')"
|
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
|
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
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,13 @@ $(function () {
|
|||||||
UpdatesChart.on('draw', function(data){
|
UpdatesChart.on('draw', function(data){
|
||||||
if (data.index) { return; }
|
if (data.index) { return; }
|
||||||
chart.find('.numeric span').text(Math.round(data.value) + '%');
|
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');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,9 +35,9 @@
|
|||||||
<div class="updates-chart">
|
<div class="updates-chart">
|
||||||
<div class="chart-wrapper">
|
<div class="chart-wrapper">
|
||||||
<div class="ct-chart"></div>
|
<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>
|
</div>
|
||||||
<p>{{ "PLUGIN_ADMIN.UPDATES_AVAILABLE"|tu }}</p>
|
<p class="js__updates-available-description"> </p>
|
||||||
</div>
|
</div>
|
||||||
<div class="backups-chart">
|
<div class="backups-chart">
|
||||||
<div class="chart-wrapper">
|
<div class="chart-wrapper">
|
||||||
|
|||||||
Reference in New Issue
Block a user