0.16.1-4 Hardware Monitoring
This commit is contained in:
@@ -129,6 +129,11 @@ function getDownloadIndicatorMeta(summary) {
|
||||
};
|
||||
}
|
||||
|
||||
const HARDWARE_MONITOR_SETTING_KEYS = new Set([
|
||||
'hardware_monitoring_enabled',
|
||||
'hardware_monitoring_interval_ms'
|
||||
]);
|
||||
|
||||
function App() {
|
||||
const appVersion = __APP_VERSION__;
|
||||
const [pipeline, setPipeline] = useState({ state: 'IDLE', progress: 0, context: {} });
|
||||
@@ -511,10 +516,15 @@ function App() {
|
||||
const val = setting?.value;
|
||||
setExpertMode(val === 'true' || val === true);
|
||||
}
|
||||
const normalizedKey = String(setting?.key || '').trim().toLowerCase();
|
||||
if (HARDWARE_MONITOR_SETTING_KEYS.has(normalizedKey)) {
|
||||
refreshPipeline().catch(() => null);
|
||||
}
|
||||
}
|
||||
|
||||
if (message.type === 'SETTINGS_BULK_UPDATED') {
|
||||
const keys = message.payload?.keys || [];
|
||||
const normalizedKeys = keys.map((key) => String(key || '').trim().toLowerCase());
|
||||
if (keys.includes('ui_expert_mode')) {
|
||||
api.getSettings({ forceRefresh: true })
|
||||
.then((response) => {
|
||||
@@ -524,6 +534,9 @@ function App() {
|
||||
})
|
||||
.catch(() => null);
|
||||
}
|
||||
if (normalizedKeys.some((key) => HARDWARE_MONITOR_SETTING_KEYS.has(key))) {
|
||||
refreshPipeline().catch(() => null);
|
||||
}
|
||||
}
|
||||
|
||||
if (message.type === 'DOWNLOADS_UPDATED') {
|
||||
|
||||
Reference in New Issue
Block a user