feat: add daily win recording endpoint, user authentication, and profile management

- Implemented a POST endpoint for recording daily wins in the game.
- Created login and signup functionality with email and password.
- Developed a profile page allowing users to update their profile information, change passwords, and manage active sessions.
- Added a toggle feature for switching between login and signup forms.
- Enhanced the layout by removing the profile button and adjusting the header structure.
This commit is contained in:
2026-03-01 23:01:44 +01:00
parent 40bdc80773
commit b849e6c4dc
28 changed files with 2603 additions and 31 deletions

View File

@@ -65,7 +65,7 @@
<svg
class="h-4 w-4 transition {isMenuOpen ? 'rotate-180' : ''}"
fill="none"
stroke="currentColor"
stroke="white"
viewBox="0 0 24 24"
>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3" />

View File

@@ -1 +1,3 @@
// place files you want to import through the `$lib` alias in this folder.
export { formatBounty } from './utils';

13
src/lib/utils.ts Normal file
View File

@@ -0,0 +1,13 @@
export function formatBounty(bounty: number): string {
if (bounty >= 1_000_000_000) {
const billions = bounty / 1_000_000_000;
return `${billions}B`;
} else if (bounty >= 1_000_000) {
const millions = bounty / 1_000_000;
return `${millions}M`;
} else if (bounty >= 1_000) {
const thousands = bounty / 1_000;
return `${thousands}K`;
}
return bounty.toString();
}