From bbff99aff0f1e1a1ef4c49f02105d7e606c3ed69 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:59:03 +0100 Subject: [PATCH] Add todo and remove mockdata --- README.md | 23 ++++++++++++++++++----- pages/api/mockdata.js | 10 ---------- pages/overlay.js | 7 ++++--- src/consts/LeaderboardType.js | 3 --- 4 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 pages/api/mockdata.js diff --git a/README.md b/README.md index c78fcd3..dc1c98d 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,29 @@ # BeatSaber Overlay with real-time data from HttpSiraStatus -The public url to view/use: https://bs-overlay.fascinated.cc
+The public url to view/use:
Need help? Feel free to message me at: Fascinated#4719 ## Usage -You will need [HttpSiraStatus](https://github.com/denpadokei/HttpSiraStatus) if you wish to use the note cut and/or the song info
-To get started go to https://bs-overlay.fascinated.cc and it is fairly self explanatory on how it all works
-## Preview: +You will need [HttpSiraStatus](https://github.com/denpadokei/HttpSiraStatus) if you wish to use the note cut and/or the song info
+To get started go to and it is fairly self explanatory on how it all works
+ +## Preview + ![Overlay](https://cdn.fascinated.cc/HCrnvhsHGG.png?raw=true) ![Builder Menu](https://cdn.fascinated.cc/QwGTQLhJsq.png?raw=true) +## Todo + +- Move caches to Redis +- Move media to my CDN server +- Cache BeatSaver data +- Add cache status in the response headers +- Move configuration files to ENV files +- Add toggle for showing pp +- Cleanup the API (or just re-do it) +- Change the song time to a circular style in the song art + ## Getting Started with developent First, install the node dependencies: @@ -27,6 +40,6 @@ Secondly, open the development server npm run dev # or yarn dev -```` +``` Lastly, open the project with an IDE of your choice :) diff --git a/pages/api/mockdata.js b/pages/api/mockdata.js deleted file mode 100644 index 0443c75..0000000 --- a/pages/api/mockdata.js +++ /dev/null @@ -1,10 +0,0 @@ -export default async function handler(req, res) { - res.json({ - avatar: - "https://avatars.akamai.steamstatic.com/4322d8d20cb6dbdd1d891b4efa9952a9679c9a76_full.jpg", - country: "GB", - pp: 0, - rank: 0, - countryRank: 0, - }); -} diff --git a/pages/overlay.js b/pages/overlay.js index e67576f..f54fd61 100644 --- a/pages/overlay.js +++ b/pages/overlay.js @@ -175,9 +175,10 @@ export default class Overlay extends Component { */ async updateData(id) { const data = await fetch( - Utils.getWebsiteApi( - id == "test" ? "Test" : this.state.websiteType - ).ApiUrl.PlayerData.replace("%s", id), + Utils.getWebsiteApi(this.state.websiteType).ApiUrl.PlayerData.replace( + "%s", + id + ), { headers: { "X-Requested-With": "BeatSaber Overlay", diff --git a/src/consts/LeaderboardType.js b/src/consts/LeaderboardType.js index 47d1f6c..a9e1d2b 100644 --- a/src/consts/LeaderboardType.js +++ b/src/consts/LeaderboardType.js @@ -36,9 +36,6 @@ const WebsiteTypes = { return Number.isNaN(pp) ? undefined : pp; }, }, - Test: { - ApiUrl: "/api/mockdata", - }, }; export default WebsiteTypes;