Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenAppers committed Oct 16, 2024
1 parent e00b249 commit 9b51034
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 25 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Minecraft analytics and anti/PieRay helper.
- Find two more corners: one with the same X chunk coordinate, one with the same Z chunk coordinate.
- The solution is added.

![Test6](images/test6.png?raw=true "Test6")
![Test5](images/test5.png?raw=true "Test5")
![Test1](images/test1.png?raw=true "Test1")
![Test2](images/test2.png?raw=true "Test2")
Expand Down
Binary file added images/test6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/components/Analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
} from 'recharts'
import type { GameLog, TimeSeries } from '../types'
import { addSampleToTimeseries } from '../utils/timeseries'
import { Heading, Link, Spacer } from '@chakra-ui/react'
import { Heading, Link } from '@chakra-ui/react'

const vanillaTimestamp = /^\[(\d\d:\d\d:\d\d)\]/
const lunarTimestamp = /^\[(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d.\d\d\d)\]/

const connectingTo = /Connecting to (\W),/
const connectingTo = /Connecting to (\S+),/
const soldContainer = /Successfully sold a container worth: \$([,\d]+.\d+)!/

const contentDelimiter = ': '
Expand Down Expand Up @@ -168,7 +168,7 @@ export function Analytics() {

return (
<>
<Heading>{serverName || 'Analytics'}</Heading>
<Heading>📊 {serverName || ''}</Heading>
<Heading as="h6" size="xs">
Game log&nbsp;
<Link
Expand Down
35 changes: 19 additions & 16 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,27 @@ import {
TabPanel,
TabPanels,
Spacer,
Box,
useColorMode,
useColorModeValue,
} from '@chakra-ui/react'
import React from 'react'
import { PieRayHelper } from './PieRayHelper'
import { Analytics } from './Analytics'

function App() {
return (
<Container>
<Tabs variant="soft-rounded" colorScheme="green" defaultIndex={1}>
<Flex alignItems="center">
<Tabs variant="soft-rounded" colorScheme="green" defaultIndex={1}>
<Box bg={useColorModeValue('gray.100', 'gray.900')} px={4}>
<Flex alignItems="center" height="6rem">
<IconButton
aria-label="logo"
width = "5rem"
icon={
<Image src="https://github.com/GreenAppers/EmpireUtils/blob/389e3594b37a48f48d01fd8b8b48fa09fe9987fa/images/1024.png?raw=true" />
}
/>
&nbsp;
<Spacer />
<TabList>
<Tab>Analytics</Tab>
<Tab>Anti/PieRay</Tab>
Expand All @@ -35,18 +38,18 @@ function App() {
<Tab>Waypoints</Tab>
</TabList>
</Flex>
<TabPanels>
<TabPanel>
<Analytics />
</TabPanel>
<TabPanel>
<PieRayHelper />
</TabPanel>
<TabPanel></TabPanel>
<TabPanel></TabPanel>
</TabPanels>
</Tabs>
</Container>
</Box>
<TabPanels>
<TabPanel>
<Analytics />
</TabPanel>
<TabPanel>
<PieRayHelper />
</TabPanel>
<TabPanel></TabPanel>
<TabPanel></TabPanel>
</TabPanels>
</Tabs>
)
}

Expand Down
8 changes: 6 additions & 2 deletions src/components/PieRayHelper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ export function PieRayHelper() {
return (
<>
<Flex>
<Heading>🥧📡 Anti/PieRay Helper</Heading>
<Spacer />
<Heading>
<Tooltip label="Anti/PieRay Helper">🥧📡</Tooltip>
</Heading>
&nbsp;
<Box>
<Tooltip label="Show help">
<IconButton
Expand All @@ -228,6 +230,7 @@ export function PieRayHelper() {
onClick={() => setShowHelp(!showHelp)}
/>
</Tooltip>
&nbsp;
<Tooltip label="Open logfile">
<IconButton
aria-label="Logfile"
Expand All @@ -239,6 +242,7 @@ export function PieRayHelper() {
}
/>
</Tooltip>
&nbsp;
<Tooltip label="Clear">
<IconButton
aria-label="Clear"
Expand Down
3 changes: 0 additions & 3 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
Arial, sans-serif;
margin: auto;
max-width: 40rem;
padding: 2rem;
}
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Empire Utils</title>
<title>🏰 Empire Utils</title>
</head>
<body>
<div id="root"></div>
Expand Down

0 comments on commit 9b51034

Please sign in to comment.