Skip to content

Commit 434400a

Browse files
Merge branch 'main' into readmeUPDATE
2 parents da52372 + 79bb74b commit 434400a

8 files changed

Lines changed: 42 additions & 19 deletions

File tree

docs/imaging_etcher.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Download and install the latest version of RPIBoot from [here](https://github.co
1515
Download and install (if necessary) the latest version of Etcher from [etcher.io](https://etcher.io/), on windows use the portable version.
1616

1717
## 4. Connect your AmpliPi to your computer
18+
19+
**VERY IMPORTANT:** Please connect the USB cable to your computer FIRST before connecting the other side of the cable to the service port of the AmpliPro. Certain older units with TFT displays (not EINK) were susceptible to ESD damage on the USB service port. Connecting the cable to the computer first will mitigate this risk.
20+
1821
Unplug your AmpliPi from power and then connect your AmpliPi to your computer via the service port using the micro USB cable. Once connected, plug your AmpliPi back into power.
1922

2023
![connected to service port](imgs/flashing/plugged_sp.jpg)

web/src/components/List/ListItem/ListItem.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ const ListItem = ({
99
children,
1010
onClick,
1111
nameFontSize,
12-
footer
12+
footer,
13+
columns
1314
}) => {
1415
return (
1516
<div
16-
className="list-item-container"
17+
className={columns ? "list-item-container columns" : "list-item-container"}
1718
onClick={onClick != undefined ? onClick : () => {}}
1819
style={{ cursor: onClick != undefined ? "pointer" : "default" }}
1920
>
@@ -33,10 +34,12 @@ ListItem.propTypes = {
3334
onClick: PropTypes.func.isRequired,
3435
nameFontSize: PropTypes.string.isRequired,
3536
footer: PropTypes.any,
37+
columns: PropTypes.bool,
3638
};
3739
ListItem.defaultProps = {
3840
onClick: undefined,
3941
nameFontSize: "2rem",
42+
columns: true,
4043
};
4144

4245
export default ListItem;

web/src/components/List/ListItem/ListItem.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
@use "src/general.scss";
22

33
.list-item-container {
4-
display: grid;
5-
grid-template-columns: 0fr 2fr 1fr;
6-
grid-template-rows: 1fr;
74
align-items: center;
85
padding: 0.5rem;
96
border-bottom: 1px solid general.$secondary;
107
@include general.button-hover;
118
}
12-
139
.list-item-container:last-child {
1410
border-bottom: none;
1511
}
1612

13+
.columns{
14+
display: grid;
15+
grid-template-columns: 0fr 2fr 1fr;
16+
grid-template-rows: 1fr;
17+
}
18+
1719
.list-item-child {
1820
display: flex;
1921
flex-direction: row;

web/src/components/PresetsModal/PresetsModal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const PresetItem = ({ index, onClick, presetState }) => {
4545
// show spinner if presetState is 'loading'
4646
return (
4747
<>
48-
<ListItem onClick={() => onClick(index)}>
48+
<ListItem onClick={() => onClick(index)} columns={false}>
4949
<div className="preset-name-and-last-used">
5050
<div>{name}</div>
5151
<div className="preset-item-last-used">{last_used}</div>

web/src/components/PresetsModal/PresetsModal.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
.presets-modal-card {
1010
max-height: 75vh;
11+
width: 90vw;
12+
max-width: 30rem;
13+
text-overflow: wrap;
1114
overflow: hidden;
1215
display: flex;
1316
flex-direction: column;

web/src/components/StreamsModal/StreamsModal.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
border-radius: 20%;
77
margin-right: 0.6rem;
88
}
9+
10+
.streams-modal-item-text {
11+
font-size: 1.5rem
12+
}

web/src/main.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,17 @@ const darkTheme = createTheme({
8585
light: '#e3f2fd',
8686
dark: '#42a5f5',
8787
contrastText: '#fff',
88-
},
88+
},
8989
mode: "dark",
9090
background: {
9191
paper: "#2a2a2a", // TODO: no good way of getting this from scss...
9292
},
9393
},
9494
typography: {
95-
fontFamily: "open sans"
95+
fontFamily: "open sans",
96+
body1: { // Override the default generated class for all mui components, allowing them to be styled on a per-instance css level instead of hardcoding 16px font for some things
97+
fontSize: 'inherit',
98+
},
9699
},
97100
components: {
98101
MuiCssBaseline: {
@@ -102,10 +105,11 @@ const darkTheme = createTheme({
102105
color: '#ffffff';
103106
}
104107
`,
105-
}
108+
},
106109
}
107110
});
108111

112+
109113
ReactDOM.createRoot(document.getElementById("root")).render(
110114
<React.StrictMode>
111115
<ThemeProvider theme={darkTheme}>

web/src/pages/Settings/Presets/CreatePresetModal/CreatePresetModal.jsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import FormControlLabel from "@mui/material/FormControlLabel";
1414
import Box from "@mui/material/Box";
1515
import TextField from "@mui/material/TextField";
1616

17+
let is_streamer = false;
18+
1719
const setCheckedRecur = (dict, checked) => {
1820
dict.checked = checked;
1921
dict.content.forEach((it) => setCheckedRecur(it, checked));
@@ -108,7 +110,7 @@ const buildTreeDict = (status, showInactive = false) => {
108110

109111
const statusClone = JSON.parse(JSON.stringify(status));
110112
const sourceDicts = statusClone.sources
111-
.filter((source) => showInactive || getSourceInputType(source) !== "none")
113+
.filter((source) => showInactive || getSourceInputType(source) !== "none" && getSourceInputType(source) !== "unknown")
112114
.map(dictWithOptions);
113115
const top = baseDict(false, "All", sourceDicts);
114116
return top;
@@ -125,14 +127,15 @@ const StructuredDictAsTree = ({ dict, depth = 0, path = [] }) => {
125127
let entries = [];
126128
let i = 0;
127129
for (const d of dict.content) {
128-
entries.push(
129-
<StructuredDictAsTree
130-
key={i}
131-
dict={d}
132-
depth={depth + 1}
133-
path={[...path, i]}
134-
/>
135-
);
130+
let e = <StructuredDictAsTree
131+
key={i}
132+
dict={d}
133+
depth={depth + 1}
134+
path={[...path, i]}
135+
/>
136+
if(!is_streamer || (is_streamer && depth === 0)) { // depth=0 only applies to the 4 streamer outputs. This is necessary so that the tree can still save the state of the Stream checkbox without displaying it.
137+
entries.push(e)
138+
}
136139
i += 1;
137140
}
138141

@@ -200,6 +203,7 @@ const CreatePresetModal = ({ onClose }) => {
200203
const newTree = buildTreeDict(status);
201204
setTree(newTree);
202205
}, []);
206+
is_streamer = useStatusStore((s) => s.status.info.is_streamer);
203207

204208
const savePreset = () => {
205209
// create preset

0 commit comments

Comments
 (0)