Compare commits
8 Commits
1ebabc3276
...
renovate/n
Author | SHA1 | Date | |
---|---|---|---|
e41cd084c4 | |||
47b8116fd7 | |||
394e65d0da | |||
58149a8061 | |||
2fc7257929 | |||
c64f38eec7 | |||
d6f4dd8c19 | |||
e691bcfd26 |
42
README.md
42
README.md
@ -1,36 +1,16 @@
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
# Scoresaber PP to Rank Overlay
|
||||
|
||||
## Getting Started
|
||||
Nothing fancy, just made this for me and a friend but feel free to use it. </br>
|
||||
The text is white, so it you won't be able to see it. It will show up on OBS though.
|
||||
|
||||
First, run the development server:
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
```
|
||||
Usage: <https://ss-pp-to-rank-overlay.fascinated.cc/?id=YOUR_SCORESABER_ID&rank=1&started=START_TIME_IN_MILIS> </br>
|
||||
Example:
|
||||
<https://ss-pp-to-rank-overlay.fascinated.cc/?id=76561198449412074&rank=1000&started=1700575968398>
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
- ID: Your scoresaber ID
|
||||
- Rank: The rank you want to get to
|
||||
- Started: The time you started the song in miliseconds. You can get this at <https://www.unixtimestamp.com>
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
You can remove the &started= part if you don't want the day counter.
|
||||
|
@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"next": "14.0.3"
|
||||
"next": "14.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5",
|
||||
@ -22,6 +22,6 @@
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.0.3"
|
||||
"eslint-config-next": "14.2.1"
|
||||
}
|
||||
}
|
||||
|
3347
pnpm-lock.yaml
generated
3347
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
6
renovate.json
Normal file
6
renovate.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"local>Fascinated/renovate-config"
|
||||
]
|
||||
}
|
@ -53,21 +53,41 @@ export default function Home() {
|
||||
setInterval(updateRank, 1000 * 60 * 1); // update every minute
|
||||
}, [mounted, updateRank]);
|
||||
|
||||
if (!playerId || !rank) {
|
||||
return (
|
||||
<main className="text-xl p-2 text-black">
|
||||
<p>
|
||||
Usage:{" "}
|
||||
<span className="text-blue-500">
|
||||
<a href="https://git.fascinated.cc/Fascinated/scoresaber-pp-to-rank-overlay#usage">
|
||||
https://git.fascinated.cc/Fascinated/scoresaber-pp-to-rank-overlay#usage
|
||||
</a>
|
||||
</span>
|
||||
</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
if (!ppDiff) {
|
||||
return (
|
||||
<main className="text-xl p-2 text-white">
|
||||
<p>Calculating...</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="text-xl text-white">
|
||||
{!playerId && <p>Invalid player ID</p>}
|
||||
{!rank && <p>Invalid rank</p>}
|
||||
{!ppDiff && <p>Calculating...</p>}
|
||||
{ppDiff && (
|
||||
<div className="flex gap-1 flex-col p-2">
|
||||
<div className="flex gap-1 flex-col p-2">
|
||||
<p>
|
||||
{formatNumber(ppDiff, 2)}pp until rank {formatNumber(rank)}
|
||||
</p>
|
||||
{startedAt && (
|
||||
<p>
|
||||
{formatNumber(ppDiff, 2)}pp until rank {formatNumber(rank)}
|
||||
Day {formatNumber(getDaysSince(new Date(Number(startedAt))) + 1)}
|
||||
</p>
|
||||
{startedAt && (
|
||||
<p>Day {getDaysSince(new Date(Number(startedAt))) + 1}</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user