mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
backup extension shows alerts on check and repair inconsistency actions
This commit is contained in:
parent
39ba94e303
commit
9191031140
3 changed files with 11 additions and 4 deletions
|
|
@ -118,12 +118,17 @@ class Controller extends \ApiController
|
|||
];
|
||||
return;
|
||||
}
|
||||
$html = "<pre>". htmlspecialchars($check->report). "</pre>";
|
||||
$this->response->data = [
|
||||
'total' => 1,
|
||||
'ok' => true,
|
||||
'msg' => __("backup.done"),
|
||||
'html' => $html,
|
||||
];
|
||||
if ($check->report == 'OK') {
|
||||
$this->response->data['alertText'] = "OK";
|
||||
}
|
||||
else {
|
||||
$this->response->data['html'] = "<pre>". htmlspecialchars($check->report). "</pre>";
|
||||
}
|
||||
}
|
||||
|
||||
function postRepairInconsistency()
|
||||
|
|
@ -141,7 +146,9 @@ class Controller extends \ApiController
|
|||
}
|
||||
$this->response->data = [
|
||||
'total' => 1,
|
||||
'ok' => true,
|
||||
'msg' => __("backup.done"),
|
||||
'alertText' => __("backup.done"),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"bundleId": "backup",
|
||||
"name": "Backup",
|
||||
"version": "0.9",
|
||||
"version": "1.0",
|
||||
"description": "Backup"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ function onBackupFileChange(el) {
|
|||
<div class="descr">{$e('backup.d_inconsistency')}</div>
|
||||
</div>
|
||||
<div class="td">
|
||||
<button type=button data-ext-settings-action="post:checkInconsistency:file" data-ext="$ext"> {$e('backup.check')} </button>
|
||||
<button type=button data-ext-settings-action="post:checkInconsistency" data-ext="$ext"> {$e('backup.check')} </button>
|
||||
<button type=button data-ext-settings-action="post:repairInconsistency" data-ext="$ext"> {$e('backup.repair')} </button> <br>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue