quagga plugin refactor
This commit is contained in:
parent
bd4c7b25c4
commit
5ed9abb12f
|
|
@ -29,7 +29,7 @@ class Config implements ArrayAccess
|
||||||
|
|
||||||
public function save(): void
|
public function save(): void
|
||||||
{
|
{
|
||||||
file_put_contents($this->path, json_encode($this->data));
|
file_put_contents($this->path, json_encode($this->data,JSON_PRETTY_PRINT));
|
||||||
}
|
}
|
||||||
|
|
||||||
private mixed $data = [];
|
private mixed $data = [];
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import {App} from "/assets/App.js";
|
||||||
(async function () {
|
(async function () {
|
||||||
$("#buttons").append(`<button id="restart-quagga">Restart quagga</button>`);
|
$("#buttons").append(`<button id="restart-quagga">Restart quagga</button>`);
|
||||||
$("#restart-quagga").click(function () {
|
$("#restart-quagga").click(function () {
|
||||||
|
|
@ -6,7 +7,7 @@
|
||||||
self.prop("disabled", true);
|
self.prop("disabled", true);
|
||||||
(async function () {
|
(async function () {
|
||||||
try {
|
try {
|
||||||
alert(await JSONRPC.__invoke("restart_quagga"));
|
alert(await App.RPC.__invoke("quagga::restart"));
|
||||||
} finally {
|
} finally {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
self.prop("disabled", false);
|
self.prop("disabled", false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue