diff --git a/public/images/Passiveicon.png b/public/images/PassiveIcon.png similarity index 100% rename from public/images/Passiveicon.png rename to public/images/PassiveIcon.png diff --git a/src/App.tsx b/src/App.tsx index 06b4206..921dc29 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -69,7 +69,7 @@ function AppBarContent() { <> {isDark ? ( - + logo @@ -85,7 +85,7 @@ function AppBarContent() { ) : ( - + logo @@ -110,7 +110,7 @@ function App() { - + diff --git a/src/classes/Ability.tsx b/src/classes/Ability.tsx index d38d86c..7e1422a 100644 --- a/src/classes/Ability.tsx +++ b/src/classes/Ability.tsx @@ -31,7 +31,7 @@ function Ability(props: IAbilityProps){ {ability.activationType === "Passive ability" ? : }   {ability.name ? ability.name : ability.fileName.charAt(0).toUpperCase() + ability.fileName.slice(1).replaceAll('_', ' ').replace('.rgd', '')} - ({ability.activationType}) + ({ability.activationType}) diff --git a/src/classes/AbilityFull.tsx b/src/classes/AbilityFull.tsx index 921baf2..469ddb1 100644 --- a/src/classes/AbilityFull.tsx +++ b/src/classes/AbilityFull.tsx @@ -34,7 +34,10 @@ interface IAbilityFullState { export default function AbilityFull(props: { abilityId?: number, mod: IMod, race: Irace, isChild?: boolean, abilityFull?: IAbilityFill }) { const theme = useTheme(); - const isMobile = useMediaQuery(theme.breakpoints.down('md')); + const isSmallMobile = useMediaQuery(theme.breakpoints.down('sm')); + const isMediumMobile = useMediaQuery(theme.breakpoints.between('sm', 'md')); + const isMobile = isSmallMobile || isMediumMobile; + const columnsPerRow = isSmallMobile ? 4 : 6; const isDark = theme.palette.mode === 'dark'; const textColor = isDark ? '#dee2e6' : 'rgba(0, 0, 0, 0.85)'; @@ -233,8 +236,8 @@ export default function AbilityFull(props: { abilityId?: number, mod: IMod, race ]; const chunks = []; - for (let i = 0; i < items.length; i += 5) { - chunks.push(items.slice(i, i + 5)); + for (let i = 0; i < items.length; i += columnsPerRow) { + chunks.push(items.slice(i, i + columnsPerRow)); } return (<>{chunks.map((chunk, chunkIndex) => ( diff --git a/src/classes/DpsTable.tsx b/src/classes/DpsTable.tsx index 0b06033..cf35f63 100644 --- a/src/classes/DpsTable.tsx +++ b/src/classes/DpsTable.tsx @@ -17,7 +17,10 @@ import {StyledTableCell} from "../commons/StyledTableCell"; export default function DpsTable(props: { mod: IMod, minDamageValue?: number, minDamage?: number, maxDamage?: number, piercings: IPiercing[], targetFilter: IArmorType[], moraleDamage?: number }) { const theme = useTheme(); - const isMobile = useMediaQuery(theme.breakpoints.down('md')); + const isSmallMobile = useMediaQuery(theme.breakpoints.down('sm')); + const isMediumMobile = useMediaQuery(theme.breakpoints.between('sm', 'md')); + const isMobile = isSmallMobile || isMediumMobile; + const columnsPerRow = isSmallMobile ? 4 : 6; function getPiercingK(armorType: string): number|null { if(props.targetFilter.length > 0 && props.targetFilter.find(tf => tf.name == armorType) === undefined) return null @@ -118,8 +121,8 @@ export default function DpsTable(props: { mod: IMod, minDamageValue?: number, mi ]; const chunks = []; - for (let i = 0; i < items.length; i += 5) { - chunks.push(items.slice(i, i + 5)); + for (let i = 0; i < items.length; i += columnsPerRow) { + chunks.push(items.slice(i, i + columnsPerRow)); } return (<>{chunks.map((chunk, chunkIndex) => ( diff --git a/src/classes/Jump.tsx b/src/classes/Jump.tsx index 2c97edd..b2b523e 100644 --- a/src/classes/Jump.tsx +++ b/src/classes/Jump.tsx @@ -21,9 +21,9 @@ function Jump(props: IJumpProps) { const textColor = isDark ? '#dee2e6' : 'rgba(0, 0, 0, 0.85)'; const jumps = props.jumps; - const isTeleport = jumps.teleport; + const isTeleport = jumps.isTeleport; const icon = isTeleport ? "/images/Teleport.png" : "/images/Jump.png"; - const title = isTeleport ? "Teleport" : "Jumps"; + const title = isTeleport ? "Teleport" : "Jump"; return (
@@ -64,9 +64,10 @@ function Jump(props: IJumpProps) { rows.push({ label: "Go down time", value:  {jumps.goDownTime}s }); } } + const chunkSize = isTeleport ? 2 : 3; const chunks: { label: string; value: React.ReactNode }[][] = []; - for (let i = 0; i < rows.length; i += 3) { - chunks.push(rows.slice(i, i + 3)); + for (let i = 0; i < rows.length; i += chunkSize) { + chunks.push(rows.slice(i, i + chunkSize)); } return chunks.map((chunk, chunkIndex) => ( diff --git a/src/classes/Weapon.tsx b/src/classes/Weapon.tsx index 5877390..1ca9ab5 100644 --- a/src/classes/Weapon.tsx +++ b/src/classes/Weapon.tsx @@ -52,7 +52,7 @@ class Weapon extends React.Component { : )}   {weapon.name ? weapon.name : this.humanReadableName(weapon.filename)} - {this.props.isDefault && (default)} + {this.props.isDefault && (default)} diff --git a/src/classes/WeaponFull.tsx b/src/classes/WeaponFull.tsx index 8ae3915..cd38fc4 100644 --- a/src/classes/WeaponFull.tsx +++ b/src/classes/WeaponFull.tsx @@ -29,7 +29,10 @@ interface IWeaponFull { export default function WeaponFull(props: {weaponId: number, isDefault: Boolean, mod: IMod, race: Irace, haveReinforceMenu: Boolean}) { const theme = useTheme(); - const isMobile = useMediaQuery(theme.breakpoints.down('md')); + const isSmallMobile = useMediaQuery(theme.breakpoints.down('sm')); + const isMediumMobile = useMediaQuery(theme.breakpoints.between('sm', 'md')); + const isMobile = isSmallMobile || isMediumMobile; + const columnsPerRow = isSmallMobile ? 4 : 6; const isDark = theme.palette.mode === 'dark'; const textColor = isDark ? '#dee2e6' : 'rgba(0, 0, 0, 0.85)'; @@ -274,8 +277,8 @@ export default function WeaponFull(props: {weaponId: number, isDefault: Boolean, ]; const chunks = []; - for (let i = 0; i < items.length; i += 5) { - chunks.push(items.slice(i, i + 5)); + for (let i = 0; i < items.length; i += columnsPerRow) { + chunks.push(items.slice(i, i + columnsPerRow)); } return chunks.map((chunk, chunkIndex) => ( diff --git a/src/pages/UnitPage.tsx b/src/pages/UnitPage.tsx index 8a5e4d7..e5fb895 100644 --- a/src/pages/UnitPage.tsx +++ b/src/pages/UnitPage.tsx @@ -198,7 +198,7 @@ function Unit(unit: IUnit, mod: IMod, theme: Theme) { {(unit?.reinforceTime !== 0 && unit.reinforceTime !== null && unit.squadMaxSize > 1) && - Reinforce cost + Reinforce cost {unit.reinforceCostRequisition && unit.reinforceCostRequisition > 0 ?  } {unit.jumps != null && - Jumps } diff --git a/src/types/IUnit.tsx b/src/types/IUnit.tsx index 257907b..602c623 100644 --- a/src/types/IUnit.tsx +++ b/src/types/IUnit.tsx @@ -24,7 +24,7 @@ export interface IJumps { chargeMax: number; setupTime: number; goDownTime?: number; - teleport: boolean; + isTeleport: boolean; requirements: IRequirement | null; }