feature: переработал качества в рейтинг качеств

This commit is contained in:
dhaverd 2026-07-21 15:04:55 +08:00
parent 68ce3e6904
commit 8de5220070
2 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,78 @@
export const afkLabels: { [index: string]: string } = {
0: 'No AFK',
0.5: 'Tactical break',
1: 'Briefly away',
1.5: 'Statue mode',
2: 'Freezing up',
2.5: 'Ghost teammate',
3: 'Free meat',
3.5: 'Dead weight',
4: 'Match ruiner',
4.5: 'Game quitter',
5: 'Report bait',
};
export const cheaterLabels: { [index: string]: string } = {
0: 'Cheats not detected',
0.5: 'Gaming chair',
1: 'Pure skill',
1.5: 'Matrix dodger',
2: 'Code wizard',
2.5: 'Wall observer',
3: 'Aim botter',
3.5: 'Script kiddie',
4: 'Vac receiver',
4.5: 'Skill issuer',
5: 'Trash cheater',
};
export const grieferLabels: { [index: string]: string } = {
0: 'Not a griefer',
0.5: 'Clown',
1: 'Content creator',
1.5: 'Friendly fire',
2: 'Chaos enjoyer',
2.5: 'Team flasher',
3: 'Secret enemy',
3.5: 'Sabotage master',
4: 'Fun vampire',
4.5: 'Toxic troll',
5: 'Game terrorist',
};
export const toxicLabels: { [index: string]: string } = {
0: 'Nice player',
0.5: 'Passion speaker',
1: 'Coach mode',
1.5: 'Keyboard warrior',
2: 'Tilt machine',
2.5: 'Cry baby',
3: 'Salt miner',
3.5: 'Rage quitter',
4: 'Mic blaster',
4.5: 'Radioactive waste',
5: 'Chat ban',
};
export const uselessLabels: { [index: string]: string } = {
0: 'Useful',
0.5: 'Cute newbie',
1: 'Tourist player',
1.5: 'Bot simulator',
2: 'Walking ward',
2.5: 'Decoration item',
3: 'Zero impact',
3.5: 'Free kill',
4: 'XP deliverer',
4.5: 'Dead weight',
5: 'Space taker',
};
export const smurfLabels: { [index: string]: string } = {
0: 'Straight as an arrow',
0.5: 'Hidden coach',
1: 'Pro disguise',
1.5: 'Rank hider',
2: 'Smurf enjoyer',
2.5: 'Noob stomper',
3: 'Ego booster',
3.5: 'Lobby ruiner',
4: 'Fun killer',
4.5: 'Rank thief',
5: 'Matchmaking cancer',
};

View File

@ -0,0 +1,30 @@
import {IconButton, Rating} from "@mui/material";
import CloseIcon from '@mui/icons-material/Close';
import NameField from "~/components/itemDialog/NameField";
import {useState} from "react";
export default function QualityItem({ name, value, setValue, labels }:{ name: string|undefined, value: number, setValue: Function, labels: { [key: string]: string} }) {
const [hoverText, setHoverText] = useState(0);
return (
<>
<div style={{display: "flex", flexDirection: "column", alignItems: "start", marginBottom: "10px"}}>
<span style={{fontSize: "1.2rem", marginBottom: "3px"}}>{name}</span>
<div style={{display: "flex", alignItems: "center"}}>
<Rating
defaultValue={0}
value={value}
precision={0.5}
onChange={(event, newValue) => {
setValue(newValue ? newValue : 0);
}}
onChangeActive={(event, newHover) => {
setHoverText(newHover);
}}
/>
<span style={{marginLeft: "5px"}}>{labels[hoverText !== -1 ? hoverText : value]}</span>
</div>
</div>
</>
)
}