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

@ -87,8 +87,9 @@ const createWindow = async () => {
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
show: false, show: false,
width: 1024, width: 1024,
height: 728, height: 850,
autoHideMenuBar: true, autoHideMenuBar: true,
resizable: false,
frame: false, frame: false,
icon: getAssetPath('icon.png'), icon: getAssetPath('icon.png'),
webPreferences: { webPreferences: {

View File

@ -39,3 +39,11 @@ h2 {
h3 { h3 {
font-family: 'Benzin-Bold' !important; font-family: 'Benzin-Bold' !important;
} }
h4 {
font-family: 'Benzin-Bold' !important;
}
h5 {
font-family: 'Benzin-Bold' !important;
}

View File

@ -12,6 +12,7 @@ export default function MinecraftBackround() {
height: '100%', height: '100%',
opacity: 0.25, opacity: 0.25,
overflow: 'hidden', overflow: 'hidden',
zIndex: -10,
}} }}
> >
<Box <Box
@ -30,15 +31,33 @@ export default function MinecraftBackround() {
> >
<img <img
src={heart} src={heart}
style={{ width: '20vw', height: '20vw', rotate: '-20deg' }} draggable={false}
style={{
width: '20vw',
height: '20vw',
rotate: '-20deg',
userSelect: 'none',
}}
/> />
<img <img
src={heart} src={heart}
style={{ width: '20vw', height: '20vw', paddingBottom: '5vw' }} draggable={false}
style={{
width: '20vw',
height: '20vw',
paddingBottom: '5vw',
userSelect: 'none',
}}
/> />
<img <img
src={heart} src={heart}
style={{ width: '20vw', height: '20vw', rotate: '20deg' }} draggable={false}
style={{
width: '20vw',
height: '20vw',
rotate: '20deg',
userSelect: 'none',
}}
/> />
</Box> </Box>
<Box <Box
@ -57,15 +76,33 @@ export default function MinecraftBackround() {
> >
<img <img
src={heart} src={heart}
style={{ width: '20vw', height: '20vw', rotate: '-20deg' }} draggable={false}
style={{
width: '20vw',
height: '20vw',
rotate: '-20deg',
userSelect: 'none',
}}
/> />
<img <img
src={heart} src={heart}
style={{ width: '20vw', height: '20vw', paddingBottom: '5vw' }} draggable={false}
style={{
width: '20vw',
height: '20vw',
paddingBottom: '5vw',
userSelect: 'none',
}}
/> />
<img <img
src={heart} src={heart}
style={{ width: '20vw', height: '20vw', rotate: '20deg' }} draggable={false}
style={{
width: '20vw',
height: '20vw',
rotate: '20deg',
userSelect: 'none',
}}
/> />
</Box> </Box>
</Box> </Box>

View File

@ -0,0 +1,22 @@
import { Typography } from '@mui/material';
import { Box } from '@mui/material';
export default function PopaPopa() {
return (
<Box sx={{ display: 'flex' }}>
<Typography variant="h3">POPA</Typography>
<Typography variant="h3">-</Typography>
<Typography
variant="h3"
sx={{
background: '-webkit-linear-gradient(200.96deg, #88BCFF, #FD71FF)',
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
}}
>
POPA
</Typography>
</Box>
);
}

View File

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

View File

@ -4,6 +4,7 @@ import useAuth from '../hooks/useAuth';
import AuthForm from '../components/Login/AuthForm'; import AuthForm from '../components/Login/AuthForm';
import MemorySlider from '../components/Login/MemorySlider'; import MemorySlider from '../components/Login/MemorySlider';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import PopaPopa from '../components/popa-popa';
const Login = () => { const Login = () => {
const navigate = useNavigate(); const navigate = useNavigate();
@ -72,20 +73,7 @@ const Login = () => {
return ( return (
<Box> <Box>
<Box sx={{ display: 'flex' }}> <PopaPopa />
<Typography variant="h3">POPA</Typography>
<Typography variant="h3">-</Typography>
<Typography
variant="h3"
sx={{
background: '-webkit-linear-gradient(200.96deg, #88BCFF, #FD71FF)',
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
}}
>
POPA
</Typography>
</Box>
<AuthForm <AuthForm
config={config} config={config}
handleInputChange={handleInputChange} handleInputChange={handleInputChange}