Vibe-code дизайн light theme

This commit is contained in:
anibus
2026-07-21 03:55:59 +03:00
parent b603732dd6
commit c750e19443
24 changed files with 280 additions and 265 deletions
+12 -5
View File
@@ -1,5 +1,6 @@
import {Paper, Table, TableCell, TableContainer, TableRow} from "@mui/material";
import React from "react";
import {useTheme} from "@mui/material/styles";
import {IModifier} from "../types/IModifier";
import {IconUrl} from "../core/api";
import {Irace} from "../types/Irace";
@@ -142,6 +143,9 @@ function getChangeDescription(ref: String, v: number) {
}
export function ModifiersProvidesAddonTable(props: IModifiersProvidesTable) {
const theme = useTheme();
const isDark = theme.palette.mode === 'dark';
const textColor = isDark ? '#dee2e6' : 'rgba(0, 0, 0, 0.85)';
let noWeaponMods = props.modifiers.filter(m => !m.reference.includes("default_weapon_modifier_hardpoint"))
@@ -152,8 +156,8 @@ export function ModifiersProvidesAddonTable(props: IModifiersProvidesTable) {
<TableRow
sx={{'&:last-child td, &:last-child th': {border: 0}}}
>
<TableCell component="th" scope="row" sx={{color: '#dee2e6'}}>{getModName(m.reference)}</TableCell>
<TableCell component="th" scope="row" sx={{color: '#dee2e6'}}>{getModIcon(m.reference)} {getChangeDescription(m.usageType, m.value)}</TableCell>
<TableCell component="th" scope="row" sx={{color: textColor}}>{getModName(m.reference)}</TableCell>
<TableCell component="th" scope="row" sx={{color: textColor}}>{getModIcon(m.reference)} {getChangeDescription(m.usageType, m.value)}</TableCell>
</TableRow>
)}
</Table>
@@ -162,6 +166,9 @@ export function ModifiersProvidesAddonTable(props: IModifiersProvidesTable) {
}
export function ModifiersProvidesTable(props: IModifiersProvidesResearchTable) {
const theme = useTheme();
const isDark = theme.palette.mode === 'dark';
const textColor = isDark ? '#dee2e6' : 'rgba(0, 0, 0, 0.85)';
let mods = props.modifiers
@@ -237,9 +244,9 @@ export function ModifiersProvidesTable(props: IModifiersProvidesResearchTable) {
<TableRow
sx={{'&:last-child td, &:last-child th': {border: 0}}}
>
<TableCell component="th" scope="row" sx={{color: '#dee2e6'}}>{getTarget(m.target)}</TableCell>
<TableCell component="th" scope="row" sx={{color: '#dee2e6', minWidth: 120}}>{getModName(m.reference)}</TableCell>
<TableCell component="th" scope="row" sx={{color: '#dee2e6'}}>{getModIcon(m.reference)} {getChangeDescription(m.usageType, m.value)}
<TableCell component="th" scope="row" sx={{color: textColor}}>{getTarget(m.target)}</TableCell>
<TableCell component="th" scope="row" sx={{color: textColor, minWidth: 120}}>{getModName(m.reference)}</TableCell>
<TableCell component="th" scope="row" sx={{color: textColor}}>{getModIcon(m.reference)} {getChangeDescription(m.usageType, m.value)}
{m.maxLifeTime !== undefined && m.maxLifeTime > 0 &&
<span><img style={{verticalAlign: "top"}} src='/images/Time_icon.webp'/>{m.maxLifeTime}s
</span>}