add force-updatecheck renew icon for update-check popover
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -193,7 +193,8 @@ class Ajax
|
|||||||
UI::initTwig();
|
UI::initTwig();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$json_result = \Froxlor\Api\Commands\Froxlor::getLocal($this->userinfo)->checkUpdate();
|
$force = Request::get('force', 0);
|
||||||
|
$json_result = \Froxlor\Api\Commands\Froxlor::getLocal($this->userinfo, ['force' => $force])->checkUpdate();
|
||||||
$result = json_decode($json_result, true)['data'];
|
$result = json_decode($json_result, true)['data'];
|
||||||
$result['full_version'] = Froxlor::getFullVersion();
|
$result['full_version'] = Froxlor::getFullVersion();
|
||||||
$result['dbversion'] = Froxlor::DBVERSION;
|
$result['dbversion'] = Froxlor::DBVERSION;
|
||||||
|
|||||||
@@ -4,8 +4,17 @@ export default function () {
|
|||||||
* updatecheck
|
* updatecheck
|
||||||
*/
|
*/
|
||||||
if (document.getElementById('updatecheck')) {
|
if (document.getElementById('updatecheck')) {
|
||||||
|
runCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#forceUpdateCheck').on('click', function () {
|
||||||
|
runCheck(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
function runCheck(force = 0)
|
||||||
|
{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme,
|
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&force=" + force,
|
||||||
type: "GET",
|
type: "GET",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$("#updatecheck").html(data);
|
$("#updatecheck").html(data);
|
||||||
|
|||||||
@@ -86,3 +86,6 @@ $heading-border-color-dark: rgba(0,0,0,0.15);
|
|||||||
|
|
||||||
// Search
|
// Search
|
||||||
$search-bg: $navbar-bg;
|
$search-bg: $navbar-bg;
|
||||||
|
|
||||||
|
// Popover size
|
||||||
|
$popover-max-width: 320px;
|
||||||
|
|||||||
@@ -26,4 +26,7 @@
|
|||||||
<code>{{ call_static('\\Froxlor\\Froxlor', 'getInstallDir') }}bin/froxlor-cli froxlor:update</code>
|
<code>{{ call_static('\\Froxlor\\Froxlor', 'getInstallDir') }}bin/froxlor-cli froxlor:update</code>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<div class='d-flex justify-content-end mt-3'>
|
||||||
|
<i role='button' class='fa-solid fa-arrows-rotate' id='forceUpdateCheck' title='Force re-check of version'></i>
|
||||||
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
Reference in New Issue
Block a user