resolve warnings and type errors

This commit is contained in:
2026-03-19 21:31:07 +01:00
parent f8510c8db3
commit 75d88257c8
99 changed files with 11 additions and 12 deletions

0
src/app/dashboard/layout.tsx Normal file → Executable file
View File

0
src/app/dashboard/membership/page.tsx Normal file → Executable file
View File

0
src/app/dashboard/page.tsx Normal file → Executable file
View File

0
src/app/dashboard/server/[id]/page.tsx Normal file → Executable file
View File

0
src/app/favicon.ico Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

0
src/app/globals.css Normal file → Executable file
View File

0
src/app/layout.tsx Normal file → Executable file
View File

0
src/app/login/page.tsx Normal file → Executable file
View File

0
src/app/page.tsx Normal file → Executable file
View File

0
src/components/configuration/AssistRulesEditor.tsx Normal file → Executable file
View File

0
src/components/configuration/ConfigurationEditor.tsx Normal file → Executable file
View File

0
src/components/configuration/EventConfigEditor.tsx Normal file → Executable file
View File

0
src/components/configuration/EventRulesEditor.tsx Normal file → Executable file
View File

2
src/components/configuration/ServerSettingsEditor.tsx Normal file → Executable file
View File

@@ -98,7 +98,7 @@ export function ServerSettingsEditor({ serverId, config }: ServerSettingsEditorP
const formDataObj = new FormData();
Object.entries(formData).forEach(([key, value]) => {
formDataObj.append(key, value.toString());
formDataObj.append(key, value?.toString() ?? '');
});
if (restart) {
formDataObj.append('restart', 'on');

0
src/components/leaderboard/LeaderboardManager.tsx Normal file → Executable file
View File

0
src/components/leaderboard/LeaderboardStandings.tsx Normal file → Executable file
View File

0
src/components/leaderboard/editors/DriversEditor.tsx Normal file → Executable file
View File

0
src/components/leaderboard/editors/FlPointsEditor.tsx Normal file → Executable file
View File

View File

0
src/components/leaderboard/editors/TracksEditor.tsx Normal file → Executable file
View File

0
src/components/login/LoginForm.tsx Normal file → Executable file
View File

0
src/components/membership/CreateUserModal.tsx Normal file → Executable file
View File

0
src/components/membership/DeleteUserModal.tsx Normal file → Executable file
View File

0
src/components/membership/UserManagementTable.tsx Normal file → Executable file
View File

0
src/components/providers/QueryProvider.tsx Normal file → Executable file
View File

0
src/components/server/CreateServerModal.tsx Normal file → Executable file
View File

0
src/components/server/DeleteServerModal.tsx Normal file → Executable file
View File

0
src/components/server/ServerCard.tsx Normal file → Executable file
View File

0
src/components/server/ServerConfigurationTabs.tsx Normal file → Executable file
View File

6
src/components/server/ServerCreationPopup.tsx Normal file → Executable file
View File

@@ -78,15 +78,15 @@ export function ServerCreationPopup({
setEntries((prev) => [...prev, newEntry]);
}, []);
const scrollToBottom = () => {
const scrollToBottom = useCallback(() => {
if (consoleRef.current && !isMinimized && isConsoleVisible) {
consoleRef.current.scrollTop = consoleRef.current.scrollHeight;
}
};
}, [isMinimized, isConsoleVisible]);
useEffect(() => {
scrollToBottom();
}, [entries, isMinimized, isConsoleVisible]);
}, [entries, scrollToBottom]);
useEffect(() => {
if (serverId && isOpen) {

0
src/components/server/ServerCreationPopupContainer.tsx Normal file → Executable file
View File

0
src/components/server/ServerHeader.tsx Normal file → Executable file
View File

0
src/components/server/ServerListWithActions.tsx Normal file → Executable file
View File

0
src/components/statistics/DailyActivityChart.tsx Normal file → Executable file
View File

0
src/components/statistics/PlayerCountChart.tsx Normal file → Executable file
View File

0
src/components/statistics/RecentSessions.tsx Normal file → Executable file
View File

0
src/components/statistics/SessionTypesChart.tsx Normal file → Executable file
View File

0
src/components/statistics/StatCard.tsx Normal file → Executable file
View File

0
src/components/statistics/StatisticsDashboard.tsx Normal file → Executable file
View File

0
src/components/ui/Button.tsx Normal file → Executable file
View File

0
src/components/ui/Input.tsx Normal file → Executable file
View File

0
src/components/ui/LoadingSpinner.tsx Normal file → Executable file
View File

0
src/components/ui/LogoutButton.tsx Normal file → Executable file
View File

0
src/components/ui/Modal.tsx Normal file → Executable file
View File

0
src/components/ui/Pagination.tsx Normal file → Executable file
View File

0
src/components/ui/RefreshButton.tsx Normal file → Executable file
View File

0
src/components/ui/Select.tsx Normal file → Executable file
View File

0
src/components/ui/SteamCMDNotification.tsx Normal file → Executable file
View File

0
src/components/ui/Toast.tsx Normal file → Executable file
View File

0
src/components/websocket/WebSocketInitializer.tsx Normal file → Executable file
View File

0
src/lib/actions/auth.ts Normal file → Executable file
View File

0
src/lib/actions/configuration.ts Normal file → Executable file
View File

0
src/lib/actions/leaderboard.ts Normal file → Executable file
View File

0
src/lib/actions/membership.ts Normal file → Executable file
View File

0
src/lib/actions/server-management.ts Normal file → Executable file
View File

0
src/lib/actions/servers.ts Normal file → Executable file
View File

0
src/lib/api/client/base.ts Normal file → Executable file
View File

0
src/lib/api/client/hooks.ts Normal file → Executable file
View File

0
src/lib/api/client/query-client.ts Normal file → Executable file
View File

0
src/lib/api/server/auth.ts Normal file → Executable file
View File

0
src/lib/api/server/base.ts Normal file → Executable file
View File

0
src/lib/api/server/configuration.ts Normal file → Executable file
View File

0
src/lib/api/server/leaderboard.ts Normal file → Executable file
View File

0
src/lib/api/server/lookups.ts Normal file → Executable file
View File

1
src/lib/api/server/membership.ts Normal file → Executable file
View File

@@ -1,4 +1,3 @@
import { use } from 'react';
import { fetchServerAPI } from './base';
import { User, Role, userSchema, UserCreate, userCreateSchema, roleSchema } from '@/lib/schemas';

0
src/lib/api/server/servers.ts Normal file → Executable file
View File

0
src/lib/api/server/statistics.ts Normal file → Executable file
View File

0
src/lib/auth/server.ts Normal file → Executable file
View File

0
src/lib/context/ServerCreationPopupContext.tsx Normal file → Executable file
View File

0
src/lib/context/SteamCMDContext.tsx Normal file → Executable file
View File

4
src/lib/schemas/config.ts Normal file → Executable file
View File

@@ -23,7 +23,7 @@ export const serverTabSchema = z.enum(ServerTab);
export const configurationSchema = z.object({
udpPort: z.number().min(1025).max(65535),
tcpPort: z.number().min(1025).max(65535),
maxConnections: z.number().min(1).max(64),
maxConnections: z.number().min(1).max(100),
lanDiscovery: z.number().min(0).max(1),
registerToLobby: z.number().min(0).max(2),
configVersion: z.number().min(1).max(2).default(1).optional()
@@ -47,7 +47,7 @@ export type AssistRules = z.infer<typeof assistRulesSchema>;
export const serverSettingsSchema = z.object({
serverName: z.string().min(3).max(150),
adminPassword: z.string().min(6).max(50),
adminPassword: z.string().min(6).max(50).or(z.literal('').nullable()),
carGroup: z.string().min(1).max(50),
trackMedalsRequirement: z.number().min(-1).max(3),
safetyRatingRequirement: z.number().min(-1).max(99),

0
src/lib/schemas/index.ts Normal file → Executable file
View File

0
src/lib/schemas/leaderboard.ts Normal file → Executable file
View File

0
src/lib/schemas/lookups.ts Normal file → Executable file
View File

0
src/lib/schemas/server.ts Normal file → Executable file
View File

8
src/lib/schemas/statistics.ts Normal file → Executable file
View File

@@ -43,10 +43,10 @@ export const stateHistoryStatsSchema = z.object({
peakPlayers: z.number(),
totalSessions: z.number(),
totalPlaytime: z.number(),
playerCountOverTime: z.array(playerCountPointSchema),
sessionTypes: z.array(sessionCountSchema),
dailyActivity: z.array(dailyActivitySchema),
recentSessions: z.array(recentSessionSchema)
playerCountOverTime: z.array(playerCountPointSchema).nullable(),
sessionTypes: z.array(sessionCountSchema).nullable(),
dailyActivity: z.array(dailyActivitySchema).nullable(),
recentSessions: z.array(recentSessionSchema).nullable()
});
export type StateHistoryStats = z.infer<typeof stateHistoryStatsSchema>;

0
src/lib/schemas/user.ts Normal file → Executable file
View File

0
src/lib/schemas/websocket.ts Normal file → Executable file
View File

0
src/lib/session/config.ts Normal file → Executable file
View File

0
src/lib/utils.ts Normal file → Executable file
View File

0
src/lib/websocket/client.ts Normal file → Executable file
View File

0
src/lib/websocket/config.ts Normal file → Executable file
View File

2
src/lib/websocket/context.tsx Normal file → Executable file
View File

@@ -117,7 +117,7 @@ export function WebSocketProvider({ children, openToken }: WebSocketProviderProp
client.associateWithServer(serverId);
}
},
[client, isConnected, connect]
[client, isConnected, connect, openToken]
);
const addMessageHandler = useCallback(