diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c20a7629..155827ae8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Add streams to the stream list on the homepage in the order they were added * Add firmware version for main and expansion units on About page * Limit length of displayed stream names with ellipsis + * Minor security increase to Pandora passwords * Add restart stream button to stream player and stream modal * Add dynamic scaling to controls on Player page * System diff --git a/web/src/pages/Settings/Streams/StreamModal/StreamModal.jsx b/web/src/pages/Settings/Streams/StreamModal/StreamModal.jsx index 27c811031..f70d97998 100644 --- a/web/src/pages/Settings/Streams/StreamModal/StreamModal.jsx +++ b/web/src/pages/Settings/Streams/StreamModal/StreamModal.jsx @@ -14,13 +14,14 @@ const RESTART_DESC = "Sometimes the stream gets into a bad state and neds to be // We're already using mui, why are we reinventing the wheel? https://mui.com/material-ui/react-text-field/ // if it's a matter of className control on the underlying components, that still works with the mui textfield with the InputLabelProps prop and other componentProps -const TextField = ({ name, desc, defaultValue, onChange }) => { +const TextField = ({ name, desc, type="text", defaultValue, onChange }) => { + return ( <>
{name}
{ onChange(e.target.value); @@ -35,6 +36,7 @@ const TextField = ({ name, desc, defaultValue, onChange }) => { TextField.propTypes = { name: PropTypes.string.isRequired, desc: PropTypes.string.isRequired, + type: PropTypes.string, defaultValue: PropTypes.string, onChange: PropTypes.func.isRequired, }; @@ -209,19 +211,34 @@ const StreamModal = ({ stream, onClose, apply, del }) => { // Render fields from StreamFields.json streamTemplate.fields.map((field) => { switch (field.type) { - case "text": - return ( - { - setStreamFields({ ...streamFields, [field.name]: v }); - }} - /> - ); + case "text": + return ( + { + setStreamFields({ ...streamFields, [field.name]: v }); + }} + /> + ); + case "password": + return ( + { + setStreamFields({ ...streamFields, [field.name]: v }); + }} + /> + ); case "bool": return (