Skip to content

Commit

Permalink
Add analytics image
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenAppers committed Nov 17, 2024
1 parent 4e6ee19 commit 458bef1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 14 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

Minecraft analytics and anti/PieRay helper.

## Analytics

![Analytics](images/analytics.png?raw=true "Analytics")

Setup log directories and regex rules for statistics visualization.

## 🥧📡 Anti/PieRay Helper

- Press F3+C in vanilla, or setup bind for [Lunar Client](https://www.lunarclient.com/) mod [Coordinates](https://lunarclient.dev/apollo/developers/mods/coordinates) to "Copy Coords to Clipboard".
Expand Down
Binary file added images/analytics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 33 additions & 14 deletions src/components/Analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ import {
Select,
Tooltip,
} from '@chakra-ui/react'
import {
ChevronDownIcon,
ChevronUpIcon,
EditIcon,
SettingsIcon,
} from '@chakra-ui/icons'
import { ChevronDownIcon, ChevronUpIcon, EditIcon } from '@chakra-ui/icons'
import React, { useEffect, useState } from 'react'

import type { TimeSeries, TimeValue } from '../types'
Expand Down Expand Up @@ -167,6 +162,8 @@ export function Analytics() {
})
const gameAnalyticsPatterns = useGameAnalyticsPatternsQuery()
const gameLogDirectories = useGameLogDirectoriesQuery()
const [showGameAnalyticsPatterns, setShowGameAnalyticsPatterns] =
useState(false)
const [showGameLogDirectories, setShowGameLogDirectories] = useState(false)
const [showGameLogFiles, setShowGameLogFiles] = useState(false)

Expand Down Expand Up @@ -293,6 +290,25 @@ export function Analytics() {
</Flex>
</Heading>

<Heading as="h6" size="xs" marginTop="1rem">
Analytics patterns&nbsp;
<Tooltip label="Show game analytics patterns">
<IconButton
aria-label="Game analtics patterns"
icon={showGameLogFiles ? <ChevronDownIcon /> : <ChevronUpIcon />}
onClick={() => setShowGameAnalyticsPatterns((x) => !x)}
/>
</Tooltip>
</Heading>

{showGameAnalyticsPatterns && (
<List>
{(gameAnalyticsPatterns?.data ?? []).map((pattern) => (
<ListItem key={pattern.name}>{pattern.pattern.toString()}</ListItem>
))}
</List>
)}

<Heading as="h6" size="xs" marginTop="1rem">
Game logs&nbsp;
<Tooltip label="Show game log files">
Expand All @@ -302,14 +318,6 @@ export function Analytics() {
onClick={() => setShowGameLogFiles((x) => !x)}
/>
</Tooltip>
&nbsp;
<Tooltip label="Setup game log directories">
<IconButton
aria-label="Game log directories"
icon={<SettingsIcon />}
onClick={() => setShowGameLogDirectories((x) => !x)}
/>
</Tooltip>
</Heading>

{showGameLogFiles && (
Expand All @@ -328,6 +336,17 @@ export function Analytics() {
</List>
)}

<Heading as="h6" size="xs" marginTop="1rem">
Game log directories&nbsp;
<Tooltip label="Setup game log directories">
<IconButton
aria-label="Game log directories"
icon={showGameLogFiles ? <ChevronDownIcon /> : <ChevronUpIcon />}
onClick={() => setShowGameLogDirectories((x) => !x)}
/>
</Tooltip>
</Heading>

{showGameLogDirectories && (
<>
<Heading as="h6" size="xs" marginTop="1rem">
Expand Down

0 comments on commit 458bef1

Please sign in to comment.