paint buttons / minor change

This commit is contained in:
aurinex
2025-07-21 15:17:21 +05:00
parent 212b58c072
commit 932d867505
7 changed files with 150 additions and 19 deletions

View File

@ -1,11 +1,23 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="4" width="8" height="4" fill="#FF2D0F"/>
<rect x="8" y="4" width="4" height="16" fill="#FF2D0F"/>
<rect x="4" y="8" width="4" height="8" fill="#FF2D0F"/>
<rect x="0" y="12" width="28" height="4" fill="#BD2211"/>
<rect x="4" y="16" width="20" height="4" fill="#BD2211"/>
<rect x="8" y="20" width="12" height="4" fill="#BD2211"/>
<rect x="12" y="24" width="4" height="4" fill="#BD2211"/>
<rect x="4" width="8" height="4.5" fill="#FF2D0F"/>
<rect x="16" width="8" height="4.5" fill="#FF2D0F"/>
<rect x="0" y="4" width="28" height="8" fill="#FF2D0F"/>
<rect x="4" y="8" width="20" height="8" fill="#FF2D0F"/>
<rect x="8" y="12" width="12" height="8" fill="#FF2D0F"/>
<rect x="12" y="16" width="4" height="8" fill="#FF2D0F"/>
<rect x="4" y="4" width="4" height="4" fill="#FFCAC8"/>
<!-- <rect x="7" y="4" width="6" height="16" fill="#FF2D0F"/>
<rect x="6" y="3" width="6" height="16" fill="#FF2D0F"/>
<rect x="3" y="8" width="4" height="8" fill="#FF2D0F"/>
<rect y="4" width="4" height="8" fill="#FF2D0F"/>
<rect x="24" y="4" width="4" height="8" fill="#FF2D0F"/>
<rect x="16" width="8" height="16" fill="#FF2D0F"/>
<rect x="16" y="16" width="4" height="4" fill="#FF2D0F"/>
<rect x="20" y="4" width="8" height="12" fill="#FF2D0F"/>
<rect x="15" y="4" width="5" height="16" fill="#FF2D0F"/>
<rect x="24" y="12" width="4" height="4" fill="#BD2211"/>
<rect x="20" y="16" width="4" height="4" fill="#BD2211"/>
<rect x="16" y="20" width="4" height="4" fill="#BD2211"/>
@ -14,5 +26,5 @@
<rect x="4" y="16" width="4" height="4" fill="#BD2211"/>
<rect x="4" y="4" width="4" height="4" fill="#FFCAC8"/>
<rect y="12" width="4" height="4" fill="#BD2211"/>
<rect x="12" y="4" width="4" height="20" fill="#FF2D0F"/>
<rect x="12" y="4" width="4" height="20" fill="#FF2D0F"/> -->
</svg>

Before

Width:  |  Height:  |  Size: 994 B

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -281,7 +281,7 @@ export async function findJava(): Promise<string> {
});
// Предпочитаем Java 21 или 17 для совместимости с authlib-injector
const preferredVersions = [21, 17, 11];
const preferredVersions = [24, 21, 17, 11];
for (const preferredVersion of preferredVersions) {
const preferred = javaVersions.find(

View File

@ -107,6 +107,16 @@ export default function CapeCard({
color={actionButton.color as 'primary' | 'success' | 'error'}
onClick={() => onAction(capeId)}
disabled={actionDisabled}
sx={{
borderRadius: '20px',
p: '5px 25px',
color: 'white',
backgroundColor: 'rgb(0, 134, 0)',
'&:hover': {
backgroundColor: 'rgba(0, 134, 0, 0.5)',
},
fontFamily: 'Benzin-Bold',
}}
>
{actionButton.text}
</Button>

View File

@ -34,6 +34,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
const navigate = useNavigate();
const [coins, setCoins] = useState<number>(0);
const [value, setValue] = useState(0);
const [activePage, setActivePage] = useState('versions');
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
setValue(newValue);
@ -60,7 +61,18 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
return 'Запуск';
}
if (isVersionsExplorerPage) {
return 'Версии';
if (activePage === 'versions') {
return 'Версии';
}
if (activePage === 'profile') {
return 'Профиль';
}
if (activePage === 'shop') {
return 'Магазин';
}
if (activePage === 'marketplace') {
return 'Рынок';
}
}
return 'Неизвестная страница';
};
@ -122,7 +134,6 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
{(isLaunchPage || isRegistrationPage) && (
<Button
variant="outlined"
color="primary"
onClick={() => handleLaunchPage()}
sx={{
width: '3em',
@ -138,42 +149,95 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
</Button>
)}
{!isLaunchPage && !isRegistrationPage && !isLoginPage && (
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
<Box
sx={{
borderBottom: 1,
borderColor: 'transparent',
'& .MuiTabs-indicator': {
backgroundColor: 'rgba(255, 77, 77, 1)',
},
}}
>
<Tabs
value={value}
onChange={handleChange}
aria-label="basic tabs example"
disableRipple={true}
>
<Tab
label="Версии"
disableRipple={true}
onClick={() => {
setActivePage('versions');
}}
sx={{
color: 'white',
fontFamily: 'Benzin-Bold',
fontSize: '0.7em',
'&.Mui-selected': {
color: 'rgba(255, 77, 77, 1)',
},
'&:hover': {
color: 'rgb(199, 199, 199)',
},
transition: 'all 0.3s ease',
}}
/>
<Tab
label="Профиль"
disableRipple={true}
onClick={() => {
setActivePage('profile');
}}
sx={{
color: 'white',
fontFamily: 'Benzin-Bold',
fontSize: '0.7em',
'&.Mui-selected': {
color: 'rgba(255, 77, 77, 1)',
},
'&:hover': {
color: 'rgb(199, 199, 199)',
},
transition: 'all 0.3s ease',
}}
/>
<Tab
label="Магазин"
disableRipple={true}
onClick={() => {
setActivePage('shop');
}}
sx={{
color: 'white',
fontFamily: 'Benzin-Bold',
fontSize: '0.7em',
'&.Mui-selected': {
color: 'rgba(255, 77, 77, 1)',
},
'&:hover': {
color: 'rgb(199, 199, 199)',
},
transition: 'all 0.3s ease',
}}
/>
<Tab
label="Рынок"
disableRipple={true}
onClick={() => {
setActivePage('marketplace');
}}
sx={{
color: 'white',
fontFamily: 'Benzin-Bold',
fontSize: '0.7em',
'&.Mui-selected': {
color: 'rgba(255, 77, 77, 1)',
},
'&:hover': {
color: 'rgb(199, 199, 199)',
},
transition: 'all 0.3s ease',
}}
/>
</Tabs>
@ -193,7 +257,10 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
WebkitAppRegion: 'drag',
}}
>
<Typography variant="h6" sx={{ color: 'white' }}>
<Typography
variant="h6"
sx={{ color: 'white', fontFamily: 'Benzin-Bold' }}
>
{getPageTitle()}
</Typography>
</Box>

View File

@ -221,9 +221,18 @@ export default function Marketplace() {
</Typography>
<Button
variant="contained"
color="primary"
onClick={checkPlayerStatus}
sx={{ mt: 2 }}
sx={{
mt: '1%',
borderRadius: '20px',
p: '10px 25px',
color: 'white',
backgroundColor: 'rgb(255, 77, 77)',
'&:hover': {
backgroundColor: 'rgba(255, 77, 77, 0.5)',
},
fontFamily: 'Benzin-Bold',
}}
>
Проверить снова
</Button>

View File

@ -167,7 +167,9 @@ export default function Profile() {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
gap: 2,
gap: '100px',
width: '100%',
justifyContent: 'center',
}}
>
{loading ? (
@ -185,6 +187,20 @@ export default function Profile() {
}}
>
{/* Используем переработанный компонент SkinViewer */}
<Typography
sx={{
fontFamily: 'Benzin-Bold',
alignSelf: 'center',
justifySelf: 'center',
textAlign: 'center',
width: '100%',
mb: '5vw',
fontSize: '3vw',
color: 'white',
}}
>
{username}
</Typography>
<SkinViewer
width={300}
height={400}
@ -195,7 +211,13 @@ export default function Profile() {
/>
</Paper>
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
<Box
sx={{
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<Box
sx={{
width: '100%',
@ -284,9 +306,17 @@ export default function Profile() {
)}
<Button
sx={{ color: 'white' }}
sx={{
color: 'white',
borderRadius: '20px',
p: '10px 25px',
backgroundColor: 'rgb(0, 134, 0)',
'&:hover': {
backgroundColor: 'rgba(0, 134, 0, 0.5)',
},
fontFamily: 'Benzin-Bold',
}}
variant="contained"
color="primary"
fullWidth
onClick={handleUploadSkin}
disabled={uploadStatus === 'loading' || !skinFile}

View File

@ -83,9 +83,10 @@ export default function Shop() {
gap: '2vw',
justifyContent: 'center',
alignItems: 'center',
width: '100%',
height: '100%',
}}
>
<Typography variant="h4">Shop</Typography>
{loading ? (
<Typography>Загрузка...</Typography>
) : (
@ -93,9 +94,11 @@ export default function Shop() {
sx={{
display: 'flex',
flexDirection: 'column',
flexWrap: 'wrap',
alignContent: 'flex-start',
width: '90%',
height: '80%',
gap: '2vw',
justifyContent: 'center',
alignItems: 'center',
}}
>
<Typography variant="h6">Доступные плащи</Typography>