Device Info on configuration

Display device info only on configuration.
This commit is contained in:
Extremesecrecy
2025-07-25 11:19:45 -07:00
parent 56d66ef7db
commit 7ae6647b62
2 changed files with 43 additions and 1 deletions
+42
View File
@@ -189,4 +189,46 @@ export default class JackHostStatus {
}
}
static getDisplayViewNoCpu(label: string, status?: JackHostStatus): React.ReactNode {
if (!status) {
return (<div style={{ whiteSpace: "nowrap" }}>
<Typography variant="caption" color="inherit">{label}</Typography>
<Typography variant="caption">&nbsp;</Typography>
</div>);
}
if (status.restarting) {
return (
<div style={{ whiteSpace: "nowrap" }}>
<Typography variant="caption" color="inherit">{label}</Typography>
<span style={{ color: RED_COLOR }}>
<Typography variant="caption" color="inherit">Restarting&nbsp;&nbsp;</Typography>
</span>
</div>
);
} else if (!status.active) {
return (
<div style={{ whiteSpace: "nowrap" }}>
<Typography variant="caption" color="inherit">{label}</Typography>
<span style={{ color: RED_COLOR }}>
<Typography variant="caption" color="inherit">{status.errorMessage === "" ? "Audio\u00A0Stopped" : status.errorMessage}&nbsp;&nbsp;</Typography>
</span>
</div>
);
} else {
let underrunError = status.msSinceLastUnderrun < 15 * 1000;
return (
<div style={{ whiteSpace: "nowrap" }}>
<Typography variant="caption" color="inherit">{label}</Typography>
<span style={{ color: underrunError ? RED_COLOR : GREEN_COLOR }}>
<Typography variant="caption" color="inherit">
XRuns:&nbsp;{status.underruns + ""}&nbsp;&nbsp;
</Typography>
</span>
</div>
);
}
}
};
@@ -738,7 +738,7 @@ const JackServerSettingsDialog = withStyles(
Latency: {this.state.latencyText}
</Typography>
<div className={classes.cpuStatusColor} style={{ paddingLeft: 24 }}>
{JackHostStatus.getDisplayView("", this.state.jackStatus)}
{JackHostStatus.getDisplayViewNoCpu("", this.state.jackStatus)}
</div>
{!this.state.okEnabled && (
<Typography display="block" variant="caption" color="error"