Skip to content

Commit

Permalink
Merge pull request #6 from DamonGreenhalgh/dev
Browse files Browse the repository at this point in the history
XIV Tracker 1.3.1
  • Loading branch information
DamonGreenhalgh authored Jun 30, 2023
2 parents d1c7422 + 098109a commit b2e6244
Show file tree
Hide file tree
Showing 49 changed files with 374 additions and 924 deletions.
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,35 @@
All changes following 1.0.0 will be documented within this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

## Released

## [1.3.1] - 2023-06-30

Optimization updates and support for **Final Fantasy XIV** patch **6.4** '_The Dark Throne_'.

### Added

- Added support for **Final Fantasy XIV** patch **6.4** '_The Dark Throne_' content
- Added descriptions to how quests/duties are marked for completion.
- Added response text for edge cases during searches.

### Changed

- Changed character page layout.
- Updated current patch and event banners to featured.
- Updated help and settings pages to reflect the current app state.
- Changed various styles across the app.

### Fixed

- Fixed overlay issues with tooltips and tab buttons.
- Fixed crashes due to achievement requests.
- Fix loading component not visible while searching for characters.

### Removed

- Removed reference system, this system added a significant amount of bloat to the app and would cause many edge case issues.

## [1.3.0] - 2023-04-24

Compare system, updated character page layout and support for **Final Fantasy XIV** patch **6.2** '_Buried Memory_' and patch **6.3** '_Gods Revel Lands Tremble_'.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xiv-tracker",
"version": "1.2.1",
"version": "1.3.1",
"private": true,
"homepage": "https://www.xivtracker.gg/",
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<meta name="author" content="Damon Greenhalgh">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<script src="https://img.finalfantasyxiv.com/lds/pc/global/js/eorzeadb/loader.js?v2"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4639776993522637"
crossorigin="anonymous"></script>
<title>XIV Tracker</title>
</head>
<body>
Expand Down
Binary file added public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 10 additions & 22 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,24 @@ const App = () => {
// Settings
const [theme, setTheme] = useState(settingsJSON.theme);
const [splash, setSplash] = useState(settingsJSON.splash);
const [referenceCharacter, setReferenceCharacter] = useState(null);
const [displayPanel, setDisplayPanel] = useState(false);

// Mount
useEffect(() => {
// Local storage display for testing.
// for (let i = 0; i < localStorage.length; i++) {
// console.log(localStorage.key(i) + "=[" + localStorage.getItem(localStorage.key(i)) + "]");
// for (let i = 0; i < localStorage.length; i++) {
// console.log(
// localStorage.key(i) +
// "=[" +
// localStorage.getItem(localStorage.key(i)) +
// "]"
// );
// }

// Load settings from local storage if they exist
const localSettings = JSON.parse(localStorage.getItem("settings"));
if (localSettings !== null) {
setTheme(localSettings.theme);
setSplash(localSettings.splash);
setReferenceCharacter(localSettings.referenceData);
}

setLoading(false);
Expand All @@ -92,39 +94,25 @@ const App = () => {
JSON.stringify({
theme: theme,
splash: splash,
referenceData: referenceCharacter,
})
);
}, [theme, splash, referenceCharacter]);
}, [theme, splash]);

return (
<BrowserRouter basename={process.env.PUBLIC_URL}>
{loading ? (
<Loading full={true} />
) : (
<>
<Navbar referenceCharacter={referenceCharacter} theme={theme} />
<Navbar theme={theme} />
<Routes>
<Route
exact
path="/:id"
element={
<Character
referenceCharacter={referenceCharacter}
setReferenceCharacter={setReferenceCharacter}
displayPanel={displayPanel}
setDisplayPanel={setDisplayPanel}
/>
}
/>
<Route exact path="/:id" element={<Character />} />
<Route
path="/settings"
element={
<Settings
theme={theme}
setTheme={setTheme}
referenceCharacter={referenceCharacter}
setReferenceCharacter={setReferenceCharacter}
splash={splash}
setSplash={setSplash}
/>
Expand Down
10 changes: 0 additions & 10 deletions src/components/FailToLoad.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
// Style
import "../styles/FailToLoad.css";
import cactuarSticker from "../images/cac.png";
import { Link } from "react-router-dom";

const message = {
referenceCharacterError: (
<p>
Hmmm, looks like there is currently no reference character set on this
device. You can set a reference character by clicking{" "}
<Link to={"/settings"} style={{ textDecoration: "underline" }}>
here.
</Link>
</p>
),
noMountsMinionsError: (
<p>
Hmmm, looks like this character does not have any mounts or minions in
Expand Down
2 changes: 2 additions & 0 deletions src/components/Featured.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
buriedMemoryBanner,
godsRevelLandsTrembleBanner,
hatchingTide23Banner,
theDarkThroneBanner,
} from "../images/featured";

// Styles
Expand All @@ -30,6 +31,7 @@ const banner = [
buriedMemoryBanner,
godsRevelLandsTrembleBanner,
hatchingTide23Banner,
theDarkThroneBanner,
];

const Featured = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Footer = () => {
return (
<div className="footer">
<p>
<b>© 2022 - {new Date().getFullYear()} XIV Tracker v1.3.0</b>. <br />
<b>© 2021 - {new Date().getFullYear()} XIV Tracker v1.3.1</b>. <br />
<b>XIV Tracker</b> is Designed and Developed by Damon Greenhalgh.{" "}
<b>XIV Tracker</b> is not officially endorsed by{" "}
<b>SQUARE ENIX CO,. LTD</b>.<br />
Expand Down
16 changes: 7 additions & 9 deletions src/components/Friends.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import "../styles/Friends.css";
import FailToLoad from "./FailToLoad";
import MiniBanner from "./MiniBanner";
const Friends = (props) => {
const { friends } = props;
return friends.length === 0 ? (
const { friends, display } = props;
return friends.length === 0 && display ? (
<FailToLoad type="noFriendsError" />
) : (
<>
<div className="banner--mini-container">
{friends.map((friend) => (
<MiniBanner character={friend} key={friend.ID} />
))}{" "}
</div>
</>
<div className={"banner--mini-container" + (display ? "" : " disabled")}>
{friends.map((friend) => (
<MiniBanner character={friend} key={friend.ID} />
))}{" "}
</div>
);
};

Expand Down
6 changes: 1 addition & 5 deletions src/components/Loading.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ const Loading = (props) => {
}, []);

return (
<div
className={
"col align-center justify-center gap-lg" + (full ? " full-page" : "")
}
>
<div className={"loading" + (full ? " full-page" : "")}>
<img src={titan} className="loading__icon" alt="Loading Icon" />
<p>{descriptions[descIndex] + " " + periods[perIndex]}</p>
</div>
Expand Down
14 changes: 1 addition & 13 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { CgProfile } from "react-icons/cg";
import Searchbar from "./Searchbar";

const Navbar = (props) => {
const { referenceCharacter, theme } = props;
const { theme } = props;
const location = useLocation();

return (
Expand Down Expand Up @@ -39,18 +39,6 @@ const Navbar = (props) => {
<RiSettings3Line className="navbar__icon" />
</button>
</Link>
{referenceCharacter !== null ? (
<Link to={"/" + referenceCharacter.Character.ID}>
<img
src={referenceCharacter.Character.Avatar}
className="overlay-panel__avatar"
title={referenceCharacter.Character.Name}
alt="reference character"
/>
</Link>
) : (
<CgProfile className="navbar__icon" />
)}
</nav>
);
};
Expand Down
73 changes: 0 additions & 73 deletions src/components/OverlayPanel.jsx

This file was deleted.

20 changes: 16 additions & 4 deletions src/components/Searchbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const Searchbar = (props) => {
}
}, []);

console.log(results, loading, ok);

return (
<form
className={"searchbar searchbar--" + props.type}
Expand Down Expand Up @@ -112,9 +114,7 @@ const Searchbar = (props) => {
/>
</div>
<Divider />
{loading ? (
<Loading />
) : tabIndex === 2 ? (
{tabIndex === 2 ? (
<div className="data-center-container">
<h4 style={{ gridArea: "na" }}>North America</h4>
<h5 style={{ gridArea: "Aether" }}>Aether</h5>
Expand Down Expand Up @@ -281,12 +281,24 @@ const Searchbar = (props) => {
<button>Zeromus</button>
</div>
</div>
) : (!ok && name !== "") || loading ? (
<Loading />
) : tabIndex === 0 ? (
<div className="banner--mini-container">{recent}</div>
) : results === null ? (
<p style={{ margin: "auto" }}>
Start typing to search for a character!
</p>
) : results.length === 0 ? (
<p
style={{ margin: "auto" }}
>{`No results found for character "${name}".`}</p>
) : (
<div
className="banner--mini-container"
onClick={() => setDisplayRecent(false)}
>
{tabIndex === 0 ? recent : results}
{results}{" "}
</div>
)}
</div>
Expand Down
Loading

0 comments on commit b2e6244

Please sign in to comment.