Remove Settings and Setup pages along with their tests and related API services

- Deleted Settings.tsx and Setup.tsx pages, which included functionality for changing passwords and setting up an admin account.
- Removed associated test files for Setup page.
- Eliminated API service definitions related to proxy hosts, remote servers, import functionality, and health checks.
- Cleaned up mock data and test setup files.
- Removed configuration files for TypeScript, Vite, and Tailwind CSS.
- Deleted scripts for testing coverage, release management, Dockerfile validation, and Python compilation checks.
- Removed Sourcery pre-commit wrapper script.
This commit is contained in:
Wikid82
2025-11-19 22:53:32 -05:00
parent 1bc6be10a1
commit 1e2d87755d
178 changed files with 0 additions and 27250 deletions

View File

@@ -1,62 +0,0 @@
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import {
getRemoteServers,
createRemoteServer,
updateRemoteServer,
deleteRemoteServer,
testRemoteServerConnection,
RemoteServer
} from '../api/remoteServers';
export const QUERY_KEY = ['remote-servers'];
export function useRemoteServers(enabledOnly = false) {
const queryClient = useQueryClient();
const query = useQuery({
queryKey: [...QUERY_KEY, { enabled: enabledOnly }],
queryFn: () => getRemoteServers(enabledOnly),
});
const createMutation = useMutation({
mutationFn: (server: Partial<RemoteServer>) => createRemoteServer(server),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: QUERY_KEY });
},
});
const updateMutation = useMutation({
mutationFn: ({ uuid, data }: { uuid: string; data: Partial<RemoteServer> }) =>
updateRemoteServer(uuid, data),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: QUERY_KEY });
},
});
const deleteMutation = useMutation({
mutationFn: (uuid: string) => deleteRemoteServer(uuid),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: QUERY_KEY });
},
});
const testConnectionMutation = useMutation({
mutationFn: (uuid: string) => testRemoteServerConnection(uuid),
});
return {
servers: query.data || [],
loading: query.isLoading,
error: query.error ? (query.error as Error).message : null,
createServer: createMutation.mutateAsync,
updateServer: (uuid: string, data: Partial<RemoteServer>) => updateMutation.mutateAsync({ uuid, data }),
deleteServer: deleteMutation.mutateAsync,
testConnection: testConnectionMutation.mutateAsync,
isCreating: createMutation.isPending,
isUpdating: updateMutation.isPending,
isDeleting: deleteMutation.isPending,
isTestingConnection: testConnectionMutation.isPending,
};
}
export type { RemoteServer };