feat: add usage display mode options to settings update
This commit is contained in:
@@ -1706,6 +1706,9 @@ const sanitizeSettingsUpdate = (payload) => {
|
|||||||
if (typeof candidate.usageRefreshIntervalMs === 'number' && Number.isFinite(candidate.usageRefreshIntervalMs)) {
|
if (typeof candidate.usageRefreshIntervalMs === 'number' && Number.isFinite(candidate.usageRefreshIntervalMs)) {
|
||||||
result.usageRefreshIntervalMs = Math.max(30000, Math.min(300000, Math.round(candidate.usageRefreshIntervalMs)));
|
result.usageRefreshIntervalMs = Math.max(30000, Math.min(300000, Math.round(candidate.usageRefreshIntervalMs)));
|
||||||
}
|
}
|
||||||
|
if (candidate.usageDisplayMode === 'usage' || candidate.usageDisplayMode === 'remaining') {
|
||||||
|
result.usageDisplayMode = candidate.usageDisplayMode;
|
||||||
|
}
|
||||||
if (Array.isArray(candidate.usageDropdownProviders)) {
|
if (Array.isArray(candidate.usageDropdownProviders)) {
|
||||||
result.usageDropdownProviders = normalizeStringArray(candidate.usageDropdownProviders);
|
result.usageDropdownProviders = normalizeStringArray(candidate.usageDropdownProviders);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user