Any changes will be written to config/wrolpi.yaml.
}
}
}
class WROLMode extends React.Component {
constructor(props) {
super(props);
this.state = {
WROLMode: false,
}
}
async componentDidMount() {
try {
let settings = await getSettings();
this.setState({ready: true, WROLMode: settings.wrol_mode});
} catch (e) {
console.error(e);
}
}
toggleWROLMode = async (checked) => {
// Handle WROL Mode toggling by itself so that other settings are not modified.
let config = {
wrol_mode: checked,
}
await saveSettings(config);
this.setState({disabled: !this.state.WROLMode, WROLMode: checked});
}
render() {
if (this.state.ready === false) {
return
}
return
{({i, t}) => WROL Mode
Enable read-only mode. No content can be deleted or modified. Enable this when the SHTF and you
want to prevent any potential loss of data.
Note: User settings and favorites can still be modified.
}
}
}
function DriveInfo({used, size, percent, mount}) {
let color;
if (percent >= 90) {
color = 'red';
} else if (percent >= 80) {
color = 'orange';
}
return
}
function CPUTemperatureStatistic({value}) {
if (!value) {
return
}
let color;
if (value >= 75) {
color = 'red';
} else if (value >= 50) {
color = 'yellow';
}
return
}
export function CPUUsageProgress({value, label}) {
if (value === null) {
return
}
let color = 'black';
if (value >= 90) {
color = 'red';
} else if (value >= 70) {
color = 'brown';
} else if (value >= 50) {
color = 'orange';
} else if (value >= 30) {
color = 'green';
}
return