Skip to content

Commit

Permalink
Frontend 2.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed Jan 7, 2025
1 parent 87936fb commit 67f93a8
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It is possible to change the mode (Classic, Dark or Light) in Settings, Matterbr
### Changed

- [websocket]: Added params to /api/clusters.
- [frontend]: Frontend v.2.3.2
- [frontend]: Frontend v.2.3.3

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.b1a621ee.css",
"main.js": "./static/js/main.41ffda23.js",
"main.js": "./static/js/main.ecd94d17.js",
"static/js/453.abd36b29.chunk.js": "./static/js/453.abd36b29.chunk.js",
"static/media/roboto-latin-700-normal.woff2": "./static/media/roboto-latin-700-normal.4535474e1cf8598695ad.woff2",
"static/media/roboto-latin-500-normal.woff2": "./static/media/roboto-latin-500-normal.7077203b1982951ecf76.woff2",
Expand Down Expand Up @@ -61,11 +61,11 @@
"static/media/roboto-greek-ext-400-normal.woff": "./static/media/roboto-greek-ext-400-normal.16eb83b4a3b1ea994243.woff",
"index.html": "./index.html",
"main.b1a621ee.css.map": "./static/css/main.b1a621ee.css.map",
"main.41ffda23.js.map": "./static/js/main.41ffda23.js.map",
"main.ecd94d17.js.map": "./static/js/main.ecd94d17.js.map",
"453.abd36b29.chunk.js.map": "./static/js/453.abd36b29.chunk.js.map"
},
"entrypoints": [
"static/css/main.b1a621ee.css",
"static/js/main.41ffda23.js"
"static/js/main.ecd94d17.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"/><base href="./"><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.41ffda23.js"></script><link href="./static/css/main.b1a621ee.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"/><base href="./"><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.ecd94d17.js"></script><link href="./static/css/main.b1a621ee.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.41ffda23.js.map

This file was deleted.

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "2.3.2",
"version": "2.3.3",
"private": true,
"homepage": "./",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Connecting.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export function Connecting() {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
height: '100vh',
fontSize: '20px',
flexDirection: 'column',
color: 'var(--main-text-color)',
height: '100vh',
backgroundColor: 'var(--main-bg-color)',
}}>
<Box sx={{ display: 'flex', alignItems: 'center', flexDirection: 'column' }}>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/Devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const devicesColumns = [
onClick={() => window.open(row.original.configUrl, '_blank')}
aria-label="Open Config"
disabled={!row.original.configUrl}
sx={{ margin: 0, padding: 0 }}
>
<SettingsIcon />
</IconButton>
Expand Down Expand Up @@ -254,6 +255,8 @@ function Devices() {
name: true,
serial: true,
uniqueId: false,
configUrl: false,
configButton: true,
cluster: true,
});

Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/WebSocketProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export function WebSocketProvider({ children }) {
if(!online) setOnline(true);
try {
const msg = JSON.parse(event.data);
if(msg.error) {
console.error(`WebSocket error message:`, msg);
}
if(msg.id===undefined) {
return; // Ignore messages without an ID
} else if(msg.id===WS_ID_REFRESH_NEEDED) {
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/components/configEditor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// React
import { useState, useMemo, useContext } from 'react';
import { useState, useMemo } from 'react';

// @mui/material
import IconButton from '@mui/material/IconButton';
Expand Down Expand Up @@ -31,7 +31,6 @@ import { Templates } from '@rjsf/mui';

// Frontend custom components
import { getCssVariable } from './muiTheme';
import { WebSocketContext } from './WebSocketProvider';
import { selectDevices } from './Home';

const { BaseInputTemplate } = Templates; // To get templates from a theme do this
Expand Down Expand Up @@ -194,14 +193,12 @@ export function createConfigTheme(primaryColor) {

export function ArrayFieldTemplate(props) {
// console.log('ArrayFieldTemplate: title', title, 'description', schema.description);
const { online, sendMessage, addListener, removeListener } = useContext(WebSocketContext);

const [dialogOpen, setDialogOpen] = useState(false);

const primaryColor = useMemo(() => getCssVariable('--primary-color', '#009a00'), []);
const theme = useMemo(() => createConfigTheme(primaryColor), []);

const { canAdd, onAddClick, schema, title, formData } = props;
const { canAdd, onAddClick, schema, title } = props;

const handleDialogToggle = () => {
setDialogOpen(!dialogOpen);
Expand Down

0 comments on commit 67f93a8

Please sign in to comment.