1 Commits

Author SHA1 Message Date
7c0c32dab3 chore(deps): update nextjs monorepo to v14 2023-10-26 17:01:51 +00:00
10 changed files with 789 additions and 2629 deletions

View File

@ -1,10 +1,10 @@
REACT_APP_HTTP_PROXY=<https://proxy.fascinated.cc> REACT_APP_HTTP_PROXY=https://proxy.fascinated.cc
REACT_APP_SITE_NAME=BeatSaber Overlay REACT_APP_SITE_NAME=BeatSaber Overlay
REACT_APP_SITE_TITLE=BeatSaber Overlay - Simple and easy to use BeatSaber overlay REACT_APP_SITE_TITLE=BeatSaber Overlay - Simple and easy to use BeatSaber overlay
REACT_APP_SITE_DESCRIPTION=ScoreSaber and BeatLeader overlay for Twitch streamers - Elevate your Beat Saber streams with our professional, customizable overlay that displays your real-time scores, rankings, and leaderboard information for your viewers. REACT_APP_SITE_DESCRIPTION=ScoreSaber and BeatLeader overlay for Twitch streamers - Elevate your Beat Saber streams with our professional, customizable overlay that displays your real-time scores, rankings, and leaderboard information for your viewers.
REACT_APP_SITE_COLOR=0EBFE9 REACT_APP_SITE_COLOR=0EBFE9
REACT_APP_SITE_URL=<http://localhost:3000> REACT_APP_SITE_URL=http://localhost:3000
REDIS_PORT=6379 REDIS_PORT=6379
REDIS_HOST=localhost REDIS_HOST=localhost

View File

@ -13,14 +13,14 @@
"@beam-australia/react-env": "^3.1.1", "@beam-australia/react-env": "^3.1.1",
"@emotion/cache": "^11.11.0", "@emotion/cache": "^11.11.0",
"@emotion/server": "^11.11.0", "@emotion/server": "^11.11.0",
"@nextui-org/react": "2.2.4", "@nextui-org/react": "1.0.0-beta.10",
"@typescript-eslint/eslint-plugin": "^6.7.5", "@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5", "@typescript-eslint/parser": "^6.7.5",
"axios": "^1.5.1", "axios": "^1.5.1",
"core-js-pure": "^3.33.0", "core-js-pure": "^3.33.0",
"critters": "^0.0.20", "critters": "^0.0.20",
"ioredis": "^5.3.2", "ioredis": "^5.3.2",
"next": "^13.5.4", "next": "^14.0.0",
"next-seo": "^6.1.0", "next-seo": "^6.1.0",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
@ -37,7 +37,7 @@
"@types/react": "^18.2.28", "@types/react": "^18.2.28",
"@types/websocket": "^1.0.7", "@types/websocket": "^1.0.7",
"eslint": "^8.51.0", "eslint": "^8.51.0",
"eslint-config-next": "^13.5.4", "eslint-config-next": "^14.0.0",
"npm-check": "^6.0.1", "npm-check": "^6.0.1",
"typescript": "^5.2.2" "typescript": "^5.2.2"
} }

2618
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,11 @@ export async function getMapData(hash: string): Promise<MapData | undefined> {
} }
const before = Date.now(); const before = Date.now();
const response = await axios.get(BEATSAVER_MAP_API.replace("%s", mapHash)); const response = await axios.get(BEATSAVER_MAP_API.replace("%s", mapHash), {
headers: {
"X-Requested-With": "BeatSaber Overlay",
},
});
if (response.status === 404) { if (response.status === 404) {
return undefined; return undefined;
} }

View File

@ -3,7 +3,12 @@ import LeaderboardType from "../../consts/LeaderboardType";
export async function getPlayerData(leaderboardType, playerId) { export async function getPlayerData(leaderboardType, playerId) {
const data = await axios.get( const data = await axios.get(
LeaderboardType[leaderboardType].ApiUrl.PlayerData.replace("%s", playerId) LeaderboardType[leaderboardType].ApiUrl.PlayerData.replace("%s", playerId),
{
headers: {
"x-requested-with": "BeatSaber Overlay",
},
}
); );
return data; return data;
} }

View File

@ -41,7 +41,12 @@ export default async function handler(req, res) {
const before = Date.now(); const before = Date.now();
const reesponse = await axios.get( const reesponse = await axios.get(
WebsiteTypes.BeatLeader.ApiUrl.MapData.replace("%h", mapHash) WebsiteTypes.BeatLeader.ApiUrl.MapData.replace("%h", mapHash),
{
headers: {
"X-Requested-With": "BeatSaber Overlay",
},
}
); );
if (reesponse.status === 404) { if (reesponse.status === 404) {
return res.status(404).json({ return res.status(404).json({

View File

@ -40,7 +40,12 @@ export default async function handler(req, res) {
WebsiteTypes.ScoreSaber.ApiUrl.MapData.replace("%h", mapHash).replace( WebsiteTypes.ScoreSaber.ApiUrl.MapData.replace("%h", mapHash).replace(
"%d", "%d",
diffToScoreSaberDiff(difficulty) diffToScoreSaberDiff(difficulty)
) ),
{
headers: {
"X-Requested-With": "BeatSaber Overlay",
},
}
); );
if (response.status === 404) { if (response.status === 404) {
return res.status(404).json({ return res.status(404).json({

View File

@ -63,21 +63,6 @@ export default function Overlay(props) {
<SongInfo /> <SongInfo />
<ScoreStats /> <ScoreStats />
<CutStats /> <CutStats />
<p
style={{
fontSize: 50,
position: "absolute",
top: 0,
right: 0,
paddingRight: "10px",
}}
>
This overlay is deprecated use:{" "}
<a href="https://ssr.fascinated.cc/overlay/builder">
https://ssr.fascinated.cc/overlay/builder
</a>
</p>
</div> </div>
); );
} }

View File

@ -30,7 +30,11 @@ export const usePlayerDataStore = create<PlayerDataState>()((set) => ({
const apiUrl = Utils.getWebsiteApi( const apiUrl = Utils.getWebsiteApi(
leaderboardType leaderboardType
).ApiUrl.PlayerData.replace("%s", playerId); ).ApiUrl.PlayerData.replace("%s", playerId);
const response = await axios.get(apiUrl); const response = await axios.get(apiUrl, {
headers: {
"x-requested-with": "BeatSaber Overlay",
},
});
if (response.status !== 200) { if (response.status !== 200) {
return; return;
} }

View File

@ -20,7 +20,11 @@ export default class Utils {
} }
static async isLeaderboardValid(url, steamId) { static async isLeaderboardValid(url, steamId) {
const response = await axios.get(url.replace("%s", steamId)); const response = await axios.get(url.replace("%s", steamId), {
headers: {
"X-Requested-With": "BeatSaber Overlay",
},
});
if (response.status === 429) { if (response.status === 429) {
return true; // Just assume it's true is we are rate limited return true; // Just assume it's true is we are rate limited
} }