minor redesign shop(завтра доделаю)

This commit is contained in:
aurinex
2025-12-29 00:04:23 +05:00
parent 1a78b95524
commit 2777e9b008
2 changed files with 164 additions and 174 deletions

View File

@ -82,7 +82,7 @@ export const BonusShopItem: React.FC<BonusShopItemProps> = ({
sx={{ sx={{
position: 'relative', position: 'relative',
width: '100%', width: '100%',
maxWidth: 220, maxWidth: '27.5vw',
height: 440, height: 440,
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',

View File

@ -58,6 +58,7 @@ import {
getNotifPositionFromSettings, getNotifPositionFromSettings,
} from '../utils/notifications'; } from '../utils/notifications';
import { translateServer } from '../utils/serverTranslator'; import { translateServer } from '../utils/serverTranslator';
import { Server } from 'http';
interface TabPanelProps { interface TabPanelProps {
children?: React.ReactNode; children?: React.ReactNode;
@ -70,7 +71,7 @@ function TabPanel(props: TabPanelProps) {
return ( return (
<div role="tabpanel" hidden={value !== index} {...other}> <div role="tabpanel" hidden={value !== index} {...other}>
{value === index && <Box sx={{ pt: '1.4vw' }}>{children}</Box>} {value === index && <Box>{children}</Box>}
</div> </div>
); );
} }
@ -577,11 +578,11 @@ export default function Shop() {
flexDirection: 'column', flexDirection: 'column',
width: '100%', width: '100%',
height: '100%', height: '100%',
gap: '2vw',
overflow: 'auto', overflow: 'auto',
paddingBottom: '5vw', paddingBottom: '2w',
paddingLeft: '2.5vw', paddingLeft: '7vw',
paddingRight: '1.5vw', paddingRight: '1.5vw',
gap: '2vw',
}} }}
> >
<Tabs <Tabs
@ -589,8 +590,8 @@ export default function Shop() {
onChange={handleTabChange} onChange={handleTabChange}
disableRipple disableRipple
sx={{ sx={{
minHeight: '3vw', // minHeight: '3vw',
mb: '1.2vw', // mb: '1.2vw',
'& .MuiTabs-indicator': { '& .MuiTabs-indicator': {
height: '0.35vw', height: '0.35vw',
borderRadius: '999px', borderRadius: '999px',
@ -598,7 +599,7 @@ export default function Shop() {
}, },
}} }}
> >
{['Прокачка', 'Кейсы', 'Плащи', 'Предметы/пакости'].map((label) => ( {['Прокачка', 'Кейсы', 'Плащи', 'Предметы'].map((label) => (
<Tab <Tab
key={label} key={label}
label={label} label={label}
@ -630,10 +631,9 @@ export default function Shop() {
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 2, gap: 2,
mt: '2vh',
}} }}
> >
<Typography {/* <Typography
variant="h6" variant="h6"
sx={{ sx={{
fontFamily: 'Benzin-Bold', fontFamily: 'Benzin-Bold',
@ -644,7 +644,7 @@ export default function Shop() {
}} }}
> >
Прокачка Прокачка
</Typography> </Typography> */}
{bonusesLoading ? ( {bonusesLoading ? (
<FullScreenLoader <FullScreenLoader
@ -731,7 +731,8 @@ export default function Shop() {
flexDirection: 'column', flexDirection: 'column',
}} }}
> >
<Box sx={{ display: 'flex', gap: 2 }}> {caseServers.length > 1 ? (
<Box sx={{ display: 'flex', gap: 2, alignItems: 'center' }}>
<Typography <Typography
variant="h6" variant="h6"
sx={{ sx={{
@ -742,10 +743,9 @@ export default function Shop() {
WebkitTextFillColor: 'transparent', WebkitTextFillColor: 'transparent',
}} }}
> >
Кейсы Выберите сервер:
</Typography> </Typography>
{caseServers.length > 0 && (
<FormControl <FormControl
size="small" size="small"
sx={{ sx={{
@ -833,7 +833,6 @@ export default function Shop() {
border: '1px solid rgba(255,255,255,0.10)', border: '1px solid rgba(255,255,255,0.10)',
borderRadius: '1vw', borderRadius: '1vw',
backdropFilter: 'blur(14px)', backdropFilter: 'blur(14px)',
'& .MuiMenuItem-root': { '& .MuiMenuItem-root': {
color: 'rgba(255,255,255,0.9)', color: 'rgba(255,255,255,0.9)',
fontFamily: 'Benzin-Bold', fontFamily: 'Benzin-Bold',
@ -856,69 +855,60 @@ export default function Shop() {
))} ))}
</Select> </Select>
</FormControl> </FormControl>
// <FormControl size="small" sx={{ minWidth: 220 }}>
// <InputLabel id="cases-server-label" sx={{ fontFamily: 'Benzin-Bold', color: 'rgba(255,255,255,0.75)' }}>
// Сервер
// </InputLabel>
// <Select
// labelId="cases-server-label"
// label="Сервер"
// value={selectedCaseServerIp}
// onChange={(e) => setSelectedCaseServerIp(String(e.target.value))}
// MenuProps={{
// PaperProps: {
// sx: {
// bgcolor: 'rgba(10,10,20,0.96)',
// border: '1px solid rgba(255,255,255,0.10)',
// borderRadius: '1vw',
// backdropFilter: 'blur(14px)',
// '& .MuiMenuItem-root': {
// color: 'rgba(255,255,255,0.9)',
// fontFamily: 'Benzin-Bold',
// },
// '& .MuiMenuItem-root.Mui-selected': {
// backgroundColor: 'rgba(242,113,33,0.16)',
// },
// '& .MuiMenuItem-root:hover': {
// backgroundColor: 'rgba(233,64,205,0.14)',
// },
// },
// },
// }}
// sx={{
// borderRadius: '999px',
// bgcolor: 'rgba(255,255,255,0.04)',
// color: 'rgba(255,255,255,0.92)',
// fontFamily: 'Benzin-Bold',
// '& .MuiSelect-select': {
// py: '0.9vw',
// px: '1.2vw',
// },
// '& .MuiOutlinedInput-notchedOutline': {
// borderColor: 'rgba(255,255,255,0.14)',
// },
// '&:hover .MuiOutlinedInput-notchedOutline': {
// borderColor: 'rgba(242,113,33,0.55)',
// },
// '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
// borderColor: 'rgba(233,64,205,0.65)',
// borderWidth: '2px',
// },
// '& .MuiSelect-icon': {
// color: 'rgba(255,255,255,0.75)',
// },
// }}
// >
// {caseServers.map((ip) => (
// <MenuItem key={ip} value={ip}>
// {translateServer(`Server ${ip}`)}
// </MenuItem>
// ))}
// </Select>
// </FormControl>
)}
</Box> </Box>
) : (
<Box sx={{ display: 'flex', alignItems: 'center', gap: '1vw', position: 'absolute', top: '93%', left: '35%' }}>
<Typography
variant="h6"
sx={{
fontFamily: 'Benzin-Bold',
backgroundImage:
'linear-gradient(136deg, rgb(242,113,33), rgb(233,64,87), rgb(138,35,135))',
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
}}
>
Сервер:
</Typography>
<Typography
variant="h6"
sx={{
fontFamily: 'Benzin-Bold',
alignSelf: 'center',
justifySelf: 'center',
textAlign: 'center',
fontSize: '2vw',
position: 'relative',
px: '1vw',
borderRadius: '3vw',
color: 'rgba(255,255,255,0.95)',
background:
'radial-gradient(circle at 10% 10%, rgba(242,113,33,0.20), transparent 55%), radial-gradient(circle at 90% 20%, rgba(233,64,205,0.16), transparent 55%), rgba(10,10,20,0.92)',
border: '1px solid rgba(255,255,255,0.10)',
boxShadow: '0 1.4vw 3.8vw rgba(0,0,0,0.55)',
backdropFilter: 'blur(14px)',
overflow: 'hidden',
'&:after': {
content: '""',
position: 'absolute',
left: '8%',
right: '8%',
bottom: 0,
height: '0.35vw',
borderRadius: '999px',
background: GRADIENT,
opacity: 0.9,
},
}}
>
{caseServers.map((ip) => (
<MenuItem key={ip} value={ip} sx={{ fontFamily: 'Benzin-Bold' }}>
{translateServer(`Server ${ip}`)}
</MenuItem>
))}
</Typography>
</Box>
)}
{casesLoading ? ( {casesLoading ? (
<FullScreenLoader <FullScreenLoader