feat: LaunchPage redisgned

This commit is contained in:
2025-07-07 05:32:22 +05:00
parent 7eaf7a7610
commit b14de1d15a
6 changed files with 107 additions and 37 deletions

View File

@ -9,6 +9,7 @@ import {
import { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import ServerStatus from '../components/ServerStatus/ServerStatus';
import PopaPopa from '../components/popa-popa';
declare global {
interface Window {
@ -62,7 +63,7 @@ const LaunchPage = ({ launchOptions }: LaunchPageProps) => {
setDownloadProgress(progress);
setBuffer(Math.min(progress + 10, 100));
};
const statusListener = (...args: unknown[]) => {
const status = args[0] as { step: string; message: string };
setInstallStep(status.step);
@ -84,11 +85,6 @@ const LaunchPage = ({ launchOptions }: LaunchPageProps) => {
};
}, [navigate]);
const handleLogout = () => {
localStorage.removeItem('launcher_config');
navigate('/login');
};
const showNotification = (
message: string,
severity: 'success' | 'error' | 'info',
@ -185,12 +181,35 @@ const LaunchPage = ({ launchOptions }: LaunchPageProps) => {
};
return (
<Box sx={{ p: 3, display: 'flex', flexDirection: 'column' }}>
<Typography variant="h4" sx={{ mb: 3 }}>
Добро пожаловать в лаунчер
</Typography>
<Box sx={{ gap: '1vh', display: 'flex', flexDirection: 'column' }}>
<PopaPopa />
<Box sx={{ mb: 3 }}>
<Typography variant="h4">Игровой сервер</Typography>
<Typography variant="h4">долбаёбов в Minecraft</Typography>
<Box>
<Typography variant="body1" sx={{ color: '#FFFFFF61' }}>
СЕРВЕР ГДЕ ВСЕМ НА ВАС ПОХУЙ
</Typography>
<Typography variant="body1" sx={{ color: '#FFFFFF61' }}>
СЕРВЕР ГДЕ РАЗРЕШИНЫ ОДНОПОЛЫЕ БРАКИ
</Typography>
<Typography variant="body1" sx={{ color: '#FFFFFF61' }}>
СЕРВЕР ГДЕ ВСЕ ДОЛБАЕБЫ
</Typography>
<Typography variant="body1" sx={{ color: '#FFFFFF61' }}>
СЕРВЕР ГДЕ НА СПАВНЕ БУДЕТ ХУЙ (ВОЗМОЖНО)
</Typography>
<Typography variant="body1" sx={{ color: '#FFFFFF61' }}>
СЕРВЕР ЗА КОТОРЫЙ ВЫ ПРОДАДИТЕ МАТЬ
</Typography>
<Typography variant="body1" sx={{ color: '#FFFFFF61' }}>
ТЫ МОЖЕШЬ КУПИТЬ АДМИНКУ И ПОЛУЧИТЬ ПИЗДЫ
</Typography>
</Box>
<Box>
<ServerStatus
serverIp={launchOptions.serverIp}
refreshInterval={30000}
@ -219,17 +238,12 @@ const LaunchPage = ({ launchOptions }: LaunchPageProps) => {
<Button
variant="contained"
color="primary"
sx={{ mb: 3 }}
onClick={handleLaunchMinecraft}
>
Запустить Minecraft
</Button>
)}
<Button onClick={handleLogout} variant="contained" color="error">
Выйти
</Button>
<Snackbar
open={notification.open}
autoHideDuration={6000}