Compare commits
8 Commits
1ebabc3276
...
renovate/a
Author | SHA1 | Date | |
---|---|---|---|
6f7b6ff41c | |||
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
|
Usage: <https://ss-pp-to-rank-overlay.fascinated.cc/?id=YOUR_SCORESABER_ID&rank=1&started=START_TIME_IN_MILIS> </br>
|
||||||
npm run dev
|
Example:
|
||||||
# or
|
<https://ss-pp-to-rank-overlay.fascinated.cc/?id=76561198449412074&rank=1000&started=1700575968398>
|
||||||
yarn dev
|
|
||||||
# or
|
|
||||||
pnpm dev
|
|
||||||
# or
|
|
||||||
bun dev
|
|
||||||
```
|
|
||||||
|
|
||||||
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.
|
You can remove the &started= part if you don't want the day counter.
|
||||||
|
|
||||||
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.
|
|
||||||
|
45
pnpm-lock.yaml
generated
45
pnpm-lock.yaml
generated
@ -27,7 +27,7 @@ devDependencies:
|
|||||||
version: 18.2.16
|
version: 18.2.16
|
||||||
autoprefixer:
|
autoprefixer:
|
||||||
specifier: ^10.0.1
|
specifier: ^10.0.1
|
||||||
version: 10.4.16(postcss@8.4.31)
|
version: 10.4.18(postcss@8.4.31)
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^8
|
specifier: ^8
|
||||||
version: 8.54.0
|
version: 8.54.0
|
||||||
@ -519,15 +519,15 @@ packages:
|
|||||||
has-symbols: 1.0.3
|
has-symbols: 1.0.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/autoprefixer@10.4.16(postcss@8.4.31):
|
/autoprefixer@10.4.18(postcss@8.4.31):
|
||||||
resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==}
|
resolution: {integrity: sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g==}
|
||||||
engines: {node: ^10 || ^12 || >=14}
|
engines: {node: ^10 || ^12 || >=14}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
postcss: ^8.1.0
|
postcss: ^8.1.0
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist: 4.22.1
|
browserslist: 4.23.0
|
||||||
caniuse-lite: 1.0.30001563
|
caniuse-lite: 1.0.30001594
|
||||||
fraction.js: 4.3.7
|
fraction.js: 4.3.7
|
||||||
normalize-range: 0.1.2
|
normalize-range: 0.1.2
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
@ -574,15 +574,15 @@ packages:
|
|||||||
fill-range: 7.0.1
|
fill-range: 7.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/browserslist@4.22.1:
|
/browserslist@4.23.0:
|
||||||
resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==}
|
resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==}
|
||||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001563
|
caniuse-lite: 1.0.30001594
|
||||||
electron-to-chromium: 1.4.589
|
electron-to-chromium: 1.4.693
|
||||||
node-releases: 2.0.13
|
node-releases: 2.0.14
|
||||||
update-browserslist-db: 1.0.13(browserslist@4.22.1)
|
update-browserslist-db: 1.0.13(browserslist@4.23.0)
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/busboy@1.6.0:
|
/busboy@1.6.0:
|
||||||
@ -612,6 +612,11 @@ packages:
|
|||||||
|
|
||||||
/caniuse-lite@1.0.30001563:
|
/caniuse-lite@1.0.30001563:
|
||||||
resolution: {integrity: sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==}
|
resolution: {integrity: sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/caniuse-lite@1.0.30001594:
|
||||||
|
resolution: {integrity: sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/chalk@4.1.2:
|
/chalk@4.1.2:
|
||||||
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
||||||
@ -762,8 +767,8 @@ packages:
|
|||||||
esutils: 2.0.3
|
esutils: 2.0.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/electron-to-chromium@1.4.589:
|
/electron-to-chromium@1.4.693:
|
||||||
resolution: {integrity: sha512-zF6y5v/YfoFIgwf2dDfAqVlPPsyQeWNpEWXbAlDUS8Ax4Z2VoiiZpAPC0Jm9hXEkJm2vIZpwB6rc4KnLTQffbQ==}
|
resolution: {integrity: sha512-/if4Ueg0GUQlhCrW2ZlXwDAm40ipuKo+OgeHInlL8sbjt+hzISxZK949fZeJaVsheamrzANXvw1zQTvbxTvSHw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/emoji-regex@9.2.2:
|
/emoji-regex@9.2.2:
|
||||||
@ -866,8 +871,8 @@ packages:
|
|||||||
is-symbol: 1.0.4
|
is-symbol: 1.0.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/escalade@3.1.1:
|
/escalade@3.1.2:
|
||||||
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
|
resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -1818,8 +1823,8 @@ packages:
|
|||||||
- babel-plugin-macros
|
- babel-plugin-macros
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/node-releases@2.0.13:
|
/node-releases@2.0.14:
|
||||||
resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==}
|
resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/normalize-path@3.0.0:
|
/normalize-path@3.0.0:
|
||||||
@ -2524,14 +2529,14 @@ packages:
|
|||||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/update-browserslist-db@1.0.13(browserslist@4.22.1):
|
/update-browserslist-db@1.0.13(browserslist@4.23.0):
|
||||||
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
|
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
browserslist: '>= 4.21.0'
|
browserslist: '>= 4.21.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist: 4.22.1
|
browserslist: 4.23.0
|
||||||
escalade: 3.1.1
|
escalade: 3.1.2
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
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
|
setInterval(updateRank, 1000 * 60 * 1); // update every minute
|
||||||
}, [mounted, updateRank]);
|
}, [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 (
|
return (
|
||||||
<main className="text-xl text-white">
|
<main className="text-xl text-white">
|
||||||
{!playerId && <p>Invalid player ID</p>}
|
<div className="flex gap-1 flex-col p-2">
|
||||||
{!rank && <p>Invalid rank</p>}
|
<p>
|
||||||
{!ppDiff && <p>Calculating...</p>}
|
{formatNumber(ppDiff, 2)}pp until rank {formatNumber(rank)}
|
||||||
{ppDiff && (
|
</p>
|
||||||
<div className="flex gap-1 flex-col p-2">
|
{startedAt && (
|
||||||
<p>
|
<p>
|
||||||
{formatNumber(ppDiff, 2)}pp until rank {formatNumber(rank)}
|
Day {formatNumber(getDaysSince(new Date(Number(startedAt))) + 1)}
|
||||||
</p>
|
</p>
|
||||||
{startedAt && (
|
)}
|
||||||
<p>Day {getDaysSince(new Date(Number(startedAt))) + 1}</p>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user