diff --git a/src/app/components/AlertModeButton/AlertModeButton.tsx b/src/app/components/AlertModeButton/AlertModeButton.tsx deleted file mode 100644 index cc3e804..0000000 --- a/src/app/components/AlertModeButton/AlertModeButton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SessionContext } from "@/app/context/Context"; -import { Button, Tooltip } from "@mui/material"; -import { useContext } from "react"; - -export const AlertModeButton = () => { - const { alertMode, toggleAlertMode } = useContext(SessionContext); - return ( - - - - ); -}; diff --git a/src/app/components/AppBar/AppBar.tsx b/src/app/components/AppBar/AppBar.tsx index a77f947..bc51260 100644 --- a/src/app/components/AppBar/AppBar.tsx +++ b/src/app/components/AppBar/AppBar.tsx @@ -12,20 +12,25 @@ import * as React from "react"; import { DowloadButton } from "../Backup/DowloadButton"; import { UploadButton } from "../Backup/UploadButton"; import { CCPButton } from "../CCP/CCPButton"; -import { CompactModeButton } from "../CompactModeButton/CompactModeButton"; import { DiscordButton } from "../Discord/DiscordButton"; import { GitHubButton } from "../Github/GitHubButton"; import { LoginButton } from "../Login/LoginButton"; -import { PlanModeButton } from "../PlanModeButton/PlanModeButton"; import { SettingsButton } from "../Settings/SettingsButtons"; -import { AlertModeButton } from "../AlertModeButton/AlertModeButton"; -import { SupportButton } from "../SupportButton/SupportButton"; - +import { + Button, + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + DialogActions, +} from "@mui/material"; +import { useState } from "react"; function ResponsiveAppBar() { const [anchorElNav, setAnchorElNav] = React.useState( null, ); + const [faqOpen, setFaqOpen] = useState(false); const handleOpenNavMenu = (event: React.MouseEvent) => { setAnchorElNav(event.currentTarget); @@ -102,23 +107,26 @@ function ResponsiveAppBar() { - - - - - - + - - + { + handleCloseNavMenu(); + setFaqOpen(true); + }} + > + - - - - + @@ -146,7 +154,7 @@ function ResponsiveAppBar() { flexGrow: 1, display: { xs: "none", md: "flex" }, alignItems: "center", - gap: "0.2rem" + gap: "0.2rem", }} > @@ -154,15 +162,132 @@ function ResponsiveAppBar() { - - + - - - + + + setFaqOpen(false)} + aria-labelledby="faq-dialog-title" + > + + Frequently Asked Questions + + + + EVE Online Partner Code +
+ Consider using my partner code for CCP related purchases to support + this project: + {" "} + Click button above to copy to clipboard. +
+
+ What is this application? +
+ This EVE Online Planetary Interaction tool that helps you track and + manage your colonies and production chains. Main usecase is to see + if your extractors are running. +
+
+ How do I add characters? +
+ You can add characters by clicking the "Add Character" + button in the app bar and following the authentication process. +
+
+ Why don't my storage numbers add up? +
+ EVE Online API (ESI) provides planetary interaction endpoints. These + are updated when you submit changes to planet. For example after an + extractor restart. +
+
+ What does exclude mean? +
+ Exclude means that this planet will not be counted in totals. This + is useful if you have longer production chains where exports of a + planet are consumed by another planet. +
+
+ How do see my planets production chains? +
+ Click on the planet row to open the extraction simulation. +
+
+ What is Compact Mode? +
+ Compact Mode reduces the size of character cards to show more + information at once. You can toggle it in the settings. +
+
+ What is Alert Mode? +
+ Alert mode shows only the planets that have extractors offline and + need attention. +
+
+ What does off-blanace mean? +
+ Off-blanace alert shows up for planets that have two extractors that + are extracting different amount of material. Treshold can be set in + settings. Generally you want to keep this below 1000. +
+
+ How do I reorder accounts? +
+ You can drag and drop account cards to reorder them. The order will + be saved automatically. +
+
+ How do I add a character to account groups? +
+ You can add a character to an account group by clicking the cog on + the character card and typing in the account/group name. +
+
+ I like icons! Why so much text? +
+ Toggle this option in settings. +
+
+ I like colors! Why your alert colors are so ugly? +
+ Change the color scheme in settings. +
+
+ What does the 3D view do? +
+ Nothing. Just made it for fun +
+
+ Why are planet settings empty? +
+ Its a work in progress feature. Plan is to be able to configuer + planet and planet exports to belong to production chains. +
+
+
+
+ + + +
); } diff --git a/src/app/components/CompactModeButton/CompactModeButton.tsx b/src/app/components/CompactModeButton/CompactModeButton.tsx deleted file mode 100644 index 5af6a36..0000000 --- a/src/app/components/CompactModeButton/CompactModeButton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SessionContext } from "@/app/context/Context"; -import { Button, Tooltip } from "@mui/material"; -import { useContext } from "react"; - -export const CompactModeButton = () => { - const { compactMode, toggleCompactMode } = useContext(SessionContext); - return ( - - - - ); -}; diff --git a/src/app/components/MainGrid.tsx b/src/app/components/MainGrid.tsx index 89a55b4..3143be5 100644 --- a/src/app/components/MainGrid.tsx +++ b/src/app/components/MainGrid.tsx @@ -6,15 +6,21 @@ import { ThemeProvider, createTheme, Button, + Tooltip, } from "@mui/material"; import { AccountCard } from "./Account/AccountCard"; import { AccessToken } from "@/types"; import { CharacterContext, SessionContext } from "../context/Context"; import ResponsiveAppBar from "./AppBar/AppBar"; import { Summary } from "./Summary/Summary"; -import { DragDropContext, Droppable, Draggable, DropResult } from "@hello-pangea/dnd"; -import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; -import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp'; +import { + DragDropContext, + Droppable, + Draggable, + DropResult, +} from "@hello-pangea/dnd"; +import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; +import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; interface Grouped { [key: string]: AccessToken[]; @@ -43,6 +49,7 @@ declare module "@mui/material/styles" { export const MainGrid = () => { const { characters, updateCharacter } = useContext(CharacterContext); + const { compactMode, toggleCompactMode, alertMode, toggleAlertMode, planMode, togglePlanMode } = useContext(SessionContext); const [accountOrder, setAccountOrder] = useState([]); const [allCollapsed, setAllCollapsed] = useState(false); @@ -54,15 +61,19 @@ export const MainGrid = () => { group[account ?? ""] = group[account ?? ""] ?? []; group[account ?? ""].push(character); return group; - }, {}) + }, {}), ); - const savedOrder = localStorage.getItem('accountOrder'); + const savedOrder = localStorage.getItem("accountOrder"); if (savedOrder) { try { const parsedOrder = JSON.parse(savedOrder); - const validOrder = parsedOrder.filter((account: string) => currentAccounts.includes(account)); - const newAccounts = currentAccounts.filter(account => !validOrder.includes(account)); + const validOrder = parsedOrder.filter((account: string) => + currentAccounts.includes(account), + ); + const newAccounts = currentAccounts.filter( + (account) => !validOrder.includes(account), + ); setAccountOrder([...validOrder, ...newAccounts]); } catch (e) { setAccountOrder(currentAccounts); @@ -74,7 +85,7 @@ export const MainGrid = () => { useEffect(() => { if (accountOrder.length > 0) { - localStorage.setItem('accountOrder', JSON.stringify(accountOrder)); + localStorage.setItem("accountOrder", JSON.stringify(accountOrder)); } }, [accountOrder]); @@ -85,7 +96,6 @@ export const MainGrid = () => { return group; }, {}); - const { compactMode } = useContext(SessionContext); const [darkTheme, setDarkTheme] = useState( createTheme({ palette: { @@ -138,14 +148,62 @@ export const MainGrid = () => { {compactMode ? <> : } - + + + + + + + + + + @@ -153,7 +211,7 @@ export const MainGrid = () => { @@ -172,17 +230,18 @@ export const MainGrid = () => { {...provided.draggableProps} {...provided.dragHandleProps} sx={{ - '& > *': { - width: '100%', + "& > *": { + width: "100%", }, }} > - {groupByAccount[account] && groupByAccount[account].length > 0 && ( - - )} + {groupByAccount[account] && + groupByAccount[account].length > 0 && ( + + )} )} diff --git a/src/app/components/PlanModeButton/PlanModeButton.tsx b/src/app/components/PlanModeButton/PlanModeButton.tsx deleted file mode 100644 index 0ba7818..0000000 --- a/src/app/components/PlanModeButton/PlanModeButton.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { SessionContext } from "@/app/context/Context"; -import { Button, Tooltip } from "@mui/material"; -import { useContext } from "react"; - -export const PlanModeButton = () => { - const { planMode, togglePlanMode } = useContext(SessionContext); - return ( - - - - ); -}; diff --git a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx index 0e7161b..fb57548 100644 --- a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx +++ b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx @@ -167,20 +167,20 @@ export const PlanetTableRow = ({ /> {amount !== undefined && ( - {amount}/h + {amount} )} ); } return ( -
+
{PI_TYPES_MAP[typeId].name} {amount !== undefined && ( - {amount}/h + {amount} )}
diff --git a/src/app/components/PlanetaryInteraction/PlanetaryInteractionRow.tsx b/src/app/components/PlanetaryInteraction/PlanetaryInteractionRow.tsx index 09ba6f8..cbf47c8 100644 --- a/src/app/components/PlanetaryInteraction/PlanetaryInteractionRow.tsx +++ b/src/app/components/PlanetaryInteraction/PlanetaryInteractionRow.tsx @@ -84,8 +84,8 @@ const PlanetaryIteractionTable = ({ - - u/h + + uph @@ -98,7 +98,7 @@ const PlanetaryIteractionTable = ({ - Storage Fill rate + Storage% diff --git a/src/app/components/SupportButton/SupportButton.tsx b/src/app/components/SupportButton/SupportButton.tsx deleted file mode 100644 index 81f3229..0000000 --- a/src/app/components/SupportButton/SupportButton.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Box, Button, Tooltip } from "@mui/material"; -export const SupportButton = () => { - return ( - - - - - - ); -};