resolve warnings and type errors
0
.gitignore
vendored
Normal file → Executable file
0
.prettierignore
Normal file → Executable file
0
.prettierrc
Normal file → Executable file
0
Dockerfile
Normal file → Executable file
0
eslint.config.mjs
Normal file → Executable file
0
next.config.ts
Normal file → Executable file
0
package-lock.json
generated
Normal file → Executable file
0
package.json
Normal file → Executable file
0
postcss.config.mjs
Normal file → Executable file
0
public/file.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
0
public/globe.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
public/next.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
0
public/vercel.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
0
public/window.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 385 B |
0
src/app/dashboard/layout.tsx
Normal file → Executable file
0
src/app/dashboard/membership/page.tsx
Normal file → Executable file
0
src/app/dashboard/page.tsx
Normal file → Executable file
0
src/app/dashboard/server/[id]/page.tsx
Normal file → Executable file
0
src/app/favicon.ico
Normal file → Executable file
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
0
src/app/globals.css
Normal file → Executable file
0
src/app/layout.tsx
Normal file → Executable file
0
src/app/login/page.tsx
Normal file → Executable file
0
src/app/page.tsx
Normal file → Executable file
0
src/components/configuration/AssistRulesEditor.tsx
Normal file → Executable file
0
src/components/configuration/ConfigurationEditor.tsx
Normal file → Executable file
0
src/components/configuration/EventConfigEditor.tsx
Normal file → Executable file
0
src/components/configuration/EventRulesEditor.tsx
Normal file → Executable file
2
src/components/configuration/ServerSettingsEditor.tsx
Normal file → Executable file
@@ -98,7 +98,7 @@ export function ServerSettingsEditor({ serverId, config }: ServerSettingsEditorP
|
|||||||
|
|
||||||
const formDataObj = new FormData();
|
const formDataObj = new FormData();
|
||||||
Object.entries(formData).forEach(([key, value]) => {
|
Object.entries(formData).forEach(([key, value]) => {
|
||||||
formDataObj.append(key, value.toString());
|
formDataObj.append(key, value?.toString() ?? '');
|
||||||
});
|
});
|
||||||
if (restart) {
|
if (restart) {
|
||||||
formDataObj.append('restart', 'on');
|
formDataObj.append('restart', 'on');
|
||||||
|
|||||||
0
src/components/leaderboard/LeaderboardManager.tsx
Normal file → Executable file
0
src/components/leaderboard/LeaderboardStandings.tsx
Normal file → Executable file
0
src/components/leaderboard/editors/DriversEditor.tsx
Normal file → Executable file
0
src/components/leaderboard/editors/FlPointsEditor.tsx
Normal file → Executable file
0
src/components/leaderboard/editors/PointsTableEditor.tsx
Normal file → Executable file
0
src/components/leaderboard/editors/TracksEditor.tsx
Normal file → Executable file
0
src/components/login/LoginForm.tsx
Normal file → Executable file
0
src/components/membership/CreateUserModal.tsx
Normal file → Executable file
0
src/components/membership/DeleteUserModal.tsx
Normal file → Executable file
0
src/components/membership/UserManagementTable.tsx
Normal file → Executable file
0
src/components/providers/QueryProvider.tsx
Normal file → Executable file
0
src/components/server/CreateServerModal.tsx
Normal file → Executable file
0
src/components/server/DeleteServerModal.tsx
Normal file → Executable file
0
src/components/server/ServerCard.tsx
Normal file → Executable file
0
src/components/server/ServerConfigurationTabs.tsx
Normal file → Executable file
6
src/components/server/ServerCreationPopup.tsx
Normal file → Executable file
@@ -78,15 +78,15 @@ export function ServerCreationPopup({
|
|||||||
setEntries((prev) => [...prev, newEntry]);
|
setEntries((prev) => [...prev, newEntry]);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const scrollToBottom = () => {
|
const scrollToBottom = useCallback(() => {
|
||||||
if (consoleRef.current && !isMinimized && isConsoleVisible) {
|
if (consoleRef.current && !isMinimized && isConsoleVisible) {
|
||||||
consoleRef.current.scrollTop = consoleRef.current.scrollHeight;
|
consoleRef.current.scrollTop = consoleRef.current.scrollHeight;
|
||||||
}
|
}
|
||||||
};
|
}, [isMinimized, isConsoleVisible]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
}, [entries, isMinimized, isConsoleVisible]);
|
}, [entries, scrollToBottom]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (serverId && isOpen) {
|
if (serverId && isOpen) {
|
||||||
|
|||||||
0
src/components/server/ServerCreationPopupContainer.tsx
Normal file → Executable file
0
src/components/server/ServerHeader.tsx
Normal file → Executable file
0
src/components/server/ServerListWithActions.tsx
Normal file → Executable file
0
src/components/statistics/DailyActivityChart.tsx
Normal file → Executable file
0
src/components/statistics/PlayerCountChart.tsx
Normal file → Executable file
0
src/components/statistics/RecentSessions.tsx
Normal file → Executable file
0
src/components/statistics/SessionTypesChart.tsx
Normal file → Executable file
0
src/components/statistics/StatCard.tsx
Normal file → Executable file
0
src/components/statistics/StatisticsDashboard.tsx
Normal file → Executable file
0
src/components/ui/Button.tsx
Normal file → Executable file
0
src/components/ui/Input.tsx
Normal file → Executable file
0
src/components/ui/LoadingSpinner.tsx
Normal file → Executable file
0
src/components/ui/LogoutButton.tsx
Normal file → Executable file
0
src/components/ui/Modal.tsx
Normal file → Executable file
0
src/components/ui/Pagination.tsx
Normal file → Executable file
0
src/components/ui/RefreshButton.tsx
Normal file → Executable file
0
src/components/ui/Select.tsx
Normal file → Executable file
0
src/components/ui/SteamCMDNotification.tsx
Normal file → Executable file
0
src/components/ui/Toast.tsx
Normal file → Executable file
0
src/components/websocket/WebSocketInitializer.tsx
Normal file → Executable file
0
src/lib/actions/auth.ts
Normal file → Executable file
0
src/lib/actions/configuration.ts
Normal file → Executable file
0
src/lib/actions/leaderboard.ts
Normal file → Executable file
0
src/lib/actions/membership.ts
Normal file → Executable file
0
src/lib/actions/server-management.ts
Normal file → Executable file
0
src/lib/actions/servers.ts
Normal file → Executable file
0
src/lib/api/client/base.ts
Normal file → Executable file
0
src/lib/api/client/hooks.ts
Normal file → Executable file
0
src/lib/api/client/query-client.ts
Normal file → Executable file
0
src/lib/api/server/auth.ts
Normal file → Executable file
0
src/lib/api/server/base.ts
Normal file → Executable file
0
src/lib/api/server/configuration.ts
Normal file → Executable file
0
src/lib/api/server/leaderboard.ts
Normal file → Executable file
0
src/lib/api/server/lookups.ts
Normal file → Executable file
1
src/lib/api/server/membership.ts
Normal file → Executable file
@@ -1,4 +1,3 @@
|
|||||||
import { use } from 'react';
|
|
||||||
import { fetchServerAPI } from './base';
|
import { fetchServerAPI } from './base';
|
||||||
import { User, Role, userSchema, UserCreate, userCreateSchema, roleSchema } from '@/lib/schemas';
|
import { User, Role, userSchema, UserCreate, userCreateSchema, roleSchema } from '@/lib/schemas';
|
||||||
|
|
||||||
|
|||||||
0
src/lib/api/server/servers.ts
Normal file → Executable file
0
src/lib/api/server/statistics.ts
Normal file → Executable file
0
src/lib/auth/server.ts
Normal file → Executable file
0
src/lib/context/ServerCreationPopupContext.tsx
Normal file → Executable file
0
src/lib/context/SteamCMDContext.tsx
Normal file → Executable file
4
src/lib/schemas/config.ts
Normal file → Executable file
@@ -23,7 +23,7 @@ export const serverTabSchema = z.enum(ServerTab);
|
|||||||
export const configurationSchema = z.object({
|
export const configurationSchema = z.object({
|
||||||
udpPort: z.number().min(1025).max(65535),
|
udpPort: z.number().min(1025).max(65535),
|
||||||
tcpPort: 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),
|
lanDiscovery: z.number().min(0).max(1),
|
||||||
registerToLobby: z.number().min(0).max(2),
|
registerToLobby: z.number().min(0).max(2),
|
||||||
configVersion: z.number().min(1).max(2).default(1).optional()
|
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({
|
export const serverSettingsSchema = z.object({
|
||||||
serverName: z.string().min(3).max(150),
|
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),
|
carGroup: z.string().min(1).max(50),
|
||||||
trackMedalsRequirement: z.number().min(-1).max(3),
|
trackMedalsRequirement: z.number().min(-1).max(3),
|
||||||
safetyRatingRequirement: z.number().min(-1).max(99),
|
safetyRatingRequirement: z.number().min(-1).max(99),
|
||||||
|
|||||||
0
src/lib/schemas/index.ts
Normal file → Executable file
0
src/lib/schemas/leaderboard.ts
Normal file → Executable file
0
src/lib/schemas/lookups.ts
Normal file → Executable file
0
src/lib/schemas/server.ts
Normal file → Executable file
8
src/lib/schemas/statistics.ts
Normal file → Executable file
@@ -43,10 +43,10 @@ export const stateHistoryStatsSchema = z.object({
|
|||||||
peakPlayers: z.number(),
|
peakPlayers: z.number(),
|
||||||
totalSessions: z.number(),
|
totalSessions: z.number(),
|
||||||
totalPlaytime: z.number(),
|
totalPlaytime: z.number(),
|
||||||
playerCountOverTime: z.array(playerCountPointSchema),
|
playerCountOverTime: z.array(playerCountPointSchema).nullable(),
|
||||||
sessionTypes: z.array(sessionCountSchema),
|
sessionTypes: z.array(sessionCountSchema).nullable(),
|
||||||
dailyActivity: z.array(dailyActivitySchema),
|
dailyActivity: z.array(dailyActivitySchema).nullable(),
|
||||||
recentSessions: z.array(recentSessionSchema)
|
recentSessions: z.array(recentSessionSchema).nullable()
|
||||||
});
|
});
|
||||||
export type StateHistoryStats = z.infer<typeof stateHistoryStatsSchema>;
|
export type StateHistoryStats = z.infer<typeof stateHistoryStatsSchema>;
|
||||||
|
|
||||||
|
|||||||
0
src/lib/schemas/user.ts
Normal file → Executable file
0
src/lib/schemas/websocket.ts
Normal file → Executable file
0
src/lib/session/config.ts
Normal file → Executable file
0
src/lib/utils.ts
Normal file → Executable file
0
src/lib/websocket/client.ts
Normal file → Executable file
0
src/lib/websocket/config.ts
Normal file → Executable file
2
src/lib/websocket/context.tsx
Normal file → Executable file
@@ -117,7 +117,7 @@ export function WebSocketProvider({ children, openToken }: WebSocketProviderProp
|
|||||||
client.associateWithServer(serverId);
|
client.associateWithServer(serverId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[client, isConnected, connect]
|
[client, isConnected, connect, openToken]
|
||||||
);
|
);
|
||||||
|
|
||||||
const addMessageHandler = useCallback(
|
const addMessageHandler = useCallback(
|
||||||
|
|||||||