-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
168 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Card, CardContent, Stack, Typography } from '@mui/material'; | ||
import { notateNumber, prefix } from '@utility/helpers'; | ||
import React from 'react'; | ||
|
||
const Monsters = ({ killroy }) => { | ||
return ( | ||
<Stack direction={'row'} flexWrap={'wrap'} gap={1}> | ||
{killroy?.list?.map(({ rawName, world, killRoyKills, icon }, index) => { | ||
return <Card key={rawName + index}> | ||
<CardContent> | ||
<Stack alignItems={'center'} gap={1}> | ||
<img src={`${prefix}data/${icon}.png`} alt=""/> | ||
<Typography>{notateNumber(killRoyKills ?? 0, 'Big')}</Typography> | ||
</Stack> | ||
</CardContent> | ||
</Card> | ||
})} | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default Monsters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Card, CardContent, Stack, Typography } from '@mui/material'; | ||
import { format, isValid } from 'date-fns'; | ||
import React from 'react'; | ||
import { prefix } from '@utility/helpers'; | ||
|
||
const Schedule = ({ schedule }) => { | ||
return ( | ||
<Stack direction={'row'} flexWrap={'wrap'} gap={1}> | ||
{schedule?.map(({ classes, date, monsters }, classesIndex) => { | ||
return <Card key={`schedule-${classesIndex}`} sx={{ width: 330 }}> | ||
<CardContent> | ||
<Typography sx={{ ml: 1, mb: 2 }}>{isValid(date) | ||
? format(date, 'dd/MM/yyyy HH:mm:ss') | ||
: null}</Typography> | ||
<Stack direction={'row'} gap={1}> | ||
{classes.map(({ className, classIndex }, classIdIndex) => { | ||
const monsterFaceId = monsters?.[classIdIndex]; | ||
return <React.Fragment key={`schedule-${classesIndex}-classId-${classIdIndex}`}> | ||
<Card variant={'outlined'}> | ||
<CardContent> | ||
<Stack alignItems={'center'}> | ||
<Stack direction={'row'} alignItems={'center'}> | ||
<img src={`${prefix}data/ClassIcons${classIndex}.png`} alt=""/> | ||
<img src={`${prefix}data/Mface${monsterFaceId}.png`} alt=""/> | ||
</Stack> | ||
<Typography>{className}</Typography> | ||
</Stack> | ||
</CardContent> | ||
</Card> | ||
</React.Fragment> | ||
})} | ||
</Stack> | ||
</CardContent> | ||
</Card> | ||
})} | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default Schedule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Card, CardContent, Divider, Stack, Typography } from '@mui/material'; | ||
import React from 'react'; | ||
import { prefix } from '@utility/helpers'; | ||
|
||
const Upgrades = ({ killroy }) => { | ||
return ( | ||
<Stack direction={'row'} alignItems={'center'} flexWrap={'wrap'} gap={1}> | ||
{killroy?.upgrades?.map(({ level, description, upgrade }, index) => <Card key={`upgrade-${index}`} | ||
sx={{ height: 200, width: 350 }}> | ||
<CardContent> | ||
<Stack direction={'row'} gap={2}> | ||
<img style={{ objectFit: 'contain' }} src={`${prefix}etc/Killroy_${index}.png`} alt=""/> | ||
<Stack> | ||
<Typography>Lv. {level}</Typography> | ||
<Divider sx={{ my: 1 }}/> | ||
<Typography>{upgrade}</Typography> | ||
<Typography>{description}</Typography> | ||
</Stack> | ||
</Stack> | ||
</CardContent> | ||
</Card>)} | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default Upgrades; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { NextSeo } from 'next-seo'; | ||
import React, { useContext } from 'react'; | ||
import { AppContext } from '@components/common/context/AppProvider'; | ||
import { Stack } from '@mui/material'; | ||
import { CardTitleAndValue } from '@components/common/styles'; | ||
import { notateNumber } from '@utility/helpers'; | ||
import { getKillroySchedule } from '@parsers/misc'; | ||
import Tabber from '@components/common/Tabber'; | ||
import Monsters from '@components/account/Worlds/World2/Killroy/Monsters'; | ||
import Schedule from '@components/account/Worlds/World2/Killroy/Schedule'; | ||
import Upgrades from '@components/account/Worlds/World2/Killroy/Upgrades'; | ||
|
||
const MyComponent = () => { | ||
const { state } = useContext(AppContext); | ||
const { killroy } = state?.account || { deathNote: {} }; | ||
const schedule = getKillroySchedule(state?.account, state?.characters, state?.account?.serverVars); | ||
return <> | ||
<NextSeo | ||
title="Killroy | Idleon Toolbox" | ||
description="Keep track of kill roy kills progression" | ||
/> | ||
<Stack direction={'row'} flexWrap={'wrap'} gap={1}> | ||
<CardTitleAndValue title={'Skulls'} value={notateNumber(killroy?.skulls)} icon={'etc/Killroy_Skull.png'}/> | ||
<CardTitleAndValue title={'Total Kills'} value={notateNumber(killroy.totalKills)} /> | ||
<CardTitleAndValue title={'Total Damage Multi'} value={`${killroy.totalDamageMulti}x`}/> | ||
</Stack> | ||
<Tabber tabs={['Schedule', 'Upgrades', 'Monsters']}> | ||
<Schedule schedule={schedule}/> | ||
<Upgrades killroy={killroy}/> | ||
<Monsters killroy={killroy}/> | ||
</Tabber> | ||
</> | ||
}; | ||
|
||
export default MyComponent; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.