feat: LaunchPage redisgned
This commit is contained in:
@ -39,3 +39,11 @@ h2 {
|
||||
h3 {
|
||||
font-family: 'Benzin-Bold' !important;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-family: 'Benzin-Bold' !important;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-family: 'Benzin-Bold' !important;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export default function MinecraftBackround() {
|
||||
height: '100%',
|
||||
opacity: 0.25,
|
||||
overflow: 'hidden',
|
||||
zIndex: -10,
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
@ -30,15 +31,33 @@ export default function MinecraftBackround() {
|
||||
>
|
||||
<img
|
||||
src={heart}
|
||||
style={{ width: '20vw', height: '20vw', rotate: '-20deg' }}
|
||||
draggable={false}
|
||||
style={{
|
||||
width: '20vw',
|
||||
height: '20vw',
|
||||
rotate: '-20deg',
|
||||
userSelect: 'none',
|
||||
}}
|
||||
/>
|
||||
<img
|
||||
src={heart}
|
||||
style={{ width: '20vw', height: '20vw', paddingBottom: '5vw' }}
|
||||
draggable={false}
|
||||
style={{
|
||||
width: '20vw',
|
||||
height: '20vw',
|
||||
paddingBottom: '5vw',
|
||||
userSelect: 'none',
|
||||
}}
|
||||
/>
|
||||
<img
|
||||
src={heart}
|
||||
style={{ width: '20vw', height: '20vw', rotate: '20deg' }}
|
||||
draggable={false}
|
||||
style={{
|
||||
width: '20vw',
|
||||
height: '20vw',
|
||||
rotate: '20deg',
|
||||
userSelect: 'none',
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
<Box
|
||||
@ -57,15 +76,33 @@ export default function MinecraftBackround() {
|
||||
>
|
||||
<img
|
||||
src={heart}
|
||||
style={{ width: '20vw', height: '20vw', rotate: '-20deg' }}
|
||||
draggable={false}
|
||||
style={{
|
||||
width: '20vw',
|
||||
height: '20vw',
|
||||
rotate: '-20deg',
|
||||
userSelect: 'none',
|
||||
}}
|
||||
/>
|
||||
<img
|
||||
src={heart}
|
||||
style={{ width: '20vw', height: '20vw', paddingBottom: '5vw' }}
|
||||
draggable={false}
|
||||
style={{
|
||||
width: '20vw',
|
||||
height: '20vw',
|
||||
paddingBottom: '5vw',
|
||||
userSelect: 'none',
|
||||
}}
|
||||
/>
|
||||
<img
|
||||
src={heart}
|
||||
style={{ width: '20vw', height: '20vw', rotate: '20deg' }}
|
||||
draggable={false}
|
||||
style={{
|
||||
width: '20vw',
|
||||
height: '20vw',
|
||||
rotate: '20deg',
|
||||
userSelect: 'none',
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
|
22
src/renderer/components/popa-popa.tsx
Normal file
22
src/renderer/components/popa-popa.tsx
Normal 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>
|
||||
);
|
||||
}
|
@ -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}
|
||||
|
@ -4,6 +4,7 @@ import useAuth from '../hooks/useAuth';
|
||||
import AuthForm from '../components/Login/AuthForm';
|
||||
import MemorySlider from '../components/Login/MemorySlider';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import PopaPopa from '../components/popa-popa';
|
||||
|
||||
const Login = () => {
|
||||
const navigate = useNavigate();
|
||||
@ -72,20 +73,7 @@ const Login = () => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<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>
|
||||
<PopaPopa />
|
||||
<AuthForm
|
||||
config={config}
|
||||
handleInputChange={handleInputChange}
|
||||
|
Reference in New Issue
Block a user