Skip to content

Commit

Permalink
Add save changed config
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed May 8, 2024
1 parent 2305770 commit 9b21971
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 211 deletions.
6 changes: 3 additions & 3 deletions frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/static/css/main.979e07d2.css",
"main.js": "/static/js/main.07170586.js",
"main.js": "/static/js/main.ab5e3bac.js",
"static/js/453.d855a71b.chunk.js": "/static/js/453.d855a71b.chunk.js",
"index.html": "/index.html",
"main.979e07d2.css.map": "/static/css/main.979e07d2.css.map",
"main.07170586.js.map": "/static/js/main.07170586.js.map",
"main.ab5e3bac.js.map": "/static/js/main.ab5e3bac.js.map",
"453.d855a71b.chunk.js.map": "/static/js/453.d855a71b.chunk.js.map"
},
"entrypoints": [
"static/css/main.979e07d2.css",
"static/js/main.07170586.js"
"static/js/main.ab5e3bac.js"
]
}
2 changes: 1 addition & 1 deletion frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.07170586.js"></script><link href="/static/css/main.979e07d2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.ab5e3bac.js"></script><link href="/static/css/main.979e07d2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1 change: 0 additions & 1 deletion frontend/build/static/js/main.07170586.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/build/static/js/main.ab5e3bac.js.map

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions frontend/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const theme = createTheme({
},
});

export function sendCommandToMatterbridge(command, param) {
export function sendCommandToMatterbridge(command, param, body) {
const sanitizedParam = param.replace(/\\/g, '*');
console.log('sendCommandToMatterbridge:', command, param, sanitizedParam);
// Send a POST request to the Matterbridge API
Expand All @@ -29,6 +29,7 @@ export function sendCommandToMatterbridge(command, param) {
headers: {
'Content-Type': 'application/json',
},
body,
})
.then(response => {
if (!response.ok) {
Expand Down Expand Up @@ -66,7 +67,10 @@ function Header() {
};

const handleRestartClick = () => {
sendCommandToMatterbridge('restart','now');
if(matterbridgeInfo.restartMode==='')
sendCommandToMatterbridge('restart','now');
else
sendCommandToMatterbridge('shutdown','now');
setOpen(true);
setTimeout(() => {
setOpen(false);
Expand Down
Loading

0 comments on commit 9b21971

Please sign in to comment.