This commit is contained in:
Anthony Stirling 2025-10-25 11:03:14 +01:00
parent cbf48b409b
commit d9e03ccf2c
16 changed files with 21 additions and 24 deletions

View File

@ -172,7 +172,7 @@ export default function AdminAdvancedSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -9,9 +9,6 @@ import PendingBadge from '../PendingBadge';
import ProviderCard from './ProviderCard';
import {
ALL_PROVIDERS,
OAUTH2_PROVIDERS,
GENERIC_OAUTH2_PROVIDER,
SAML2_PROVIDER,
Provider,
} from './providerDefinitions';
import apiClient from '../../../../services/apiClient';
@ -98,7 +95,7 @@ export default function AdminConnectionsSection() {
return result;
},
saveTransformer: (settings) => {
saveTransformer: () => {
// This section doesn't have a global save button
// Individual providers save through their own handlers
return {
@ -210,7 +207,7 @@ export default function AdminConnectionsSection() {
throw new Error('Failed to save');
}
}
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),
@ -264,7 +261,7 @@ export default function AdminConnectionsSection() {
throw new Error('Failed to disconnect');
}
}
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),
@ -299,7 +296,7 @@ export default function AdminConnectionsSection() {
} else {
throw new Error('Failed to save');
}
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -85,7 +85,7 @@ export default function AdminDatabaseSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -36,7 +36,7 @@ export default function AdminEndpointsSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -76,7 +76,7 @@ export default function AdminFeaturesSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -145,7 +145,7 @@ export default function AdminGeneralSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -40,7 +40,7 @@ export default function AdminLegalSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -40,7 +40,7 @@ export default function AdminMailSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -37,7 +37,7 @@ export default function AdminPremiumSection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -83,7 +83,7 @@ export default function AdminPrivacySection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -1,6 +1,6 @@
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { TextInput, NumberInput, Switch, Button, Stack, Paper, Text, Loader, Group, Select, PasswordInput, Alert, Badge, Accordion, Textarea } from '@mantine/core';
import { NumberInput, Switch, Button, Stack, Paper, Text, Loader, Group, Select, Alert, Badge, Accordion, Textarea } from '@mantine/core';
import { alert } from '../../../toast';
import LocalIcon from '../../LocalIcon';
import RestartConfirmationModal from '../RestartConfirmationModal';
@ -147,7 +147,7 @@ export default function AdminSecuritySection() {
try {
await saveSettings();
showRestartModal();
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -61,7 +61,7 @@ const Overview: React.FC = () => {
try {
await signOut();
navigate('/login');
} catch (error) {
} catch (_error) {
console.error('Logout error:', error);
}
};

View File

@ -1,5 +1,5 @@
import { useState } from 'react';
import { Paper, Group, Text, Badge, Button, Collapse, Stack, TextInput, Textarea, Switch, PasswordInput } from '@mantine/core';
import { Paper, Group, Text, Button, Collapse, Stack, TextInput, Textarea, Switch, PasswordInput } from '@mantine/core';
import { useTranslation } from 'react-i18next';
import LocalIcon from '../../LocalIcon';
import { Provider, ProviderField } from './providerDefinitions';

View File

@ -39,7 +39,7 @@ export function useRestartServer() {
} else {
throw new Error('Failed to restart');
}
} catch (error) {
} catch (_error) {
alert({
alertType: 'error',
title: t('admin.error', 'Error'),

View File

@ -1,6 +1,6 @@
import { useState } from 'react';
import apiClient from '../services/apiClient';
import { mergePendingSettings, isFieldPending, hasPendingChanges, getCurrentValue } from '../utils/settingsPendingHelper';
import { mergePendingSettings, isFieldPending, hasPendingChanges } from '../utils/settingsPendingHelper';
interface UseAdminSettingsOptions<T> {
sectionName: string;
@ -152,7 +152,7 @@ function computeDelta(original: any, current: any): any {
const delta: any = {};
for (const key in current) {
if (!current.hasOwnProperty(key)) continue;
if (!Object.prototype.hasOwnProperty.call(current, key)) continue;
const originalValue = original[key];
const currentValue = current[key];

View File

@ -120,7 +120,7 @@ function deepMerge(target: any, source: any): any {
const result = { ...target };
for (const key in source) {
if (source.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
const sourceValue = source[key];
const targetValue = result[key];