mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 12:31:13 -05:00
Add admin panel refresh settings
This commit is contained in:
@@ -115,6 +115,17 @@ export function useAdminSettings() {
|
||||
return value === true || value === 'true';
|
||||
};
|
||||
|
||||
const getAdminPanelRefreshMode = () => {
|
||||
const value = getSettingValue('system.admin_panel_refresh_mode', 'auto');
|
||||
// Remove quotes if they exist (JSON string stored in DB)
|
||||
return typeof value === 'string' ? value.replace(/"/g, '') : value;
|
||||
};
|
||||
|
||||
const getAdminPanelPollInterval = () => {
|
||||
const value = getSettingValue('system.admin_panel_poll_interval', 30);
|
||||
return parseInt(value?.toString() || '30') * 1000; // Convert to milliseconds
|
||||
};
|
||||
|
||||
return {
|
||||
settings,
|
||||
isLoading,
|
||||
@@ -132,5 +143,7 @@ export function useAdminSettings() {
|
||||
getReportThreshold,
|
||||
getAuditRetentionDays,
|
||||
getAutoCleanupEnabled,
|
||||
getAdminPanelRefreshMode,
|
||||
getAdminPanelPollInterval,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user