mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 02:17:34 +00:00
add force-updatecheck renew icon for update-check popover
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
parent
cda0b3116f
commit
597f338353
@ -193,7 +193,8 @@ class Ajax
|
||||
UI::initTwig();
|
||||
|
||||
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['full_version'] = Froxlor::getFullVersion();
|
||||
$result['dbversion'] = Froxlor::DBVERSION;
|
||||
|
@ -4,8 +4,17 @@ export default function () {
|
||||
* updatecheck
|
||||
*/
|
||||
if (document.getElementById('updatecheck')) {
|
||||
runCheck();
|
||||
}
|
||||
|
||||
$('#forceUpdateCheck').on('click', function () {
|
||||
runCheck(1);
|
||||
});
|
||||
|
||||
function runCheck(force = 0)
|
||||
{
|
||||
$.ajax({
|
||||
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme,
|
||||
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&force=" + force,
|
||||
type: "GET",
|
||||
success: function (data) {
|
||||
$("#updatecheck").html(data);
|
||||
|
@ -86,3 +86,6 @@ $heading-border-color-dark: rgba(0,0,0,0.15);
|
||||
|
||||
// Search
|
||||
$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>
|
||||
{% 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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user