Commit graph

54 commits

Author SHA1 Message Date
Ayase Minori
3d55a46850 refactor: Refactor CounterCard.tsx
Refactored CounterCard.tsx to improve code readability and maintainability.
2023-12-06 11:08:18 +00:00
Ayase Minori
2d82486c48 fix: Fix socket state and onClick function in CounterCard
Fix socket state initialization, onClick function, and modify component rendering in CounterCard
2023-11-22 06:51:17 +00:00
Ayase Minori
0f63c6f833 feat: Add Partytown and update MarkdownContent import paths
Added Partytown package and updated import paths for MarkdownContent components.
2023-11-22 05:48:25 +00:00
Amnish Singh Arora
e6558e0824
Rate Limit Kuru Squash (#19)
* Rate Limit Kuru Squash

* Remove console.log

* Update the THRESHOLD_CLICKS to 30

* Improve the timeout algorithm
2023-10-26 08:33:30 +08:00
Ayase Minori
548a35c4bf
send a message immediately on connect 2023-10-24 00:15:41 +08:00
Ayase Minori
41be1559f1
refactor: Update dependencies and refactor code (#18)
* refactor: Update dependencies and refactor code

Removed axios-web and replaced with BroadcastChannel and WebSocket for counter and global count functionalities.

* feat: Update CounterCard and routes

Update CounterCard timeout and routes POST method

* Debug socket message

* ensure value is always treated as a BigInt internally

* Frogot to put it below that 💀

* Move type conversion to database

* I swear if this doesnt work im going to choke someone

* assign converted value to a variable

SURELY this will work right?

* Revert db to use numbers again
2023-10-24 00:11:50 +08:00
Ayane Satomi
06ba0c3dfc Remove clientside logging for the heartbeat
It works now so I have no need for it anymore
2023-10-23 14:03:22 +00:00
Ayane Satomi
cdf547e4bd feat: Add websocket handling
Added websocket functionality for keeping the connection alive and handling events.
2023-10-23 13:22:03 +00:00
Ayane Satomi
4ddc835f93 Gracefully log errors instead of trying something stupid here 2023-10-23 10:18:31 +00:00
Ayane Satomi
d46adc06c5 re-set connection handlers on reconnection 2023-10-23 10:16:08 +00:00
Ayane Satomi
2ab8369d4e Gracefully handle network interruptions 2023-10-23 10:04:13 +00:00
Ayane Satomi
4ea19cd5a0 Switch transport to Websockets 2023-10-22 16:34:52 +00:00
Ayane Satomi
238c01bcd7 feat: Update globalCount type to bigint
Update globalCount type from number to bigint in CounterCard and index files, and in setGlobalStatistics function
2023-10-22 05:56:36 +00:00
Ayane Satomi
f2abd5110c refactor: Refactor CounterCard component to use BigInt for globalCount
Refactor CounterCard component to use BigInt for globalCount state and parse globalCount as an integer
2023-10-22 05:50:37 +00:00
Ayane Satomi
6b05b7d6a9 refactor: Move logging to proper conditional block 2023-10-22 05:47:48 +00:00
Ayane Satomi
be94406c49 fix: guard against large numbers
Guard against numbers beyond MAX_SAFE_INTEGER and reset count if necessary.
2023-10-22 05:45:44 +00:00
Ayane Satomi
1572ec1584 fix: Updated logging message in CounterCard component
Log message in CounterCard component updated to include timestamp
2023-10-21 14:06:35 +00:00
Ayane Satomi
b82a792781 feat: Add timestamp to console log messages
Add timestamp to console log messages in CounterCard.tsx
2023-10-21 14:02:59 +00:00
Ayane Satomi
1cbb7d8651 feat: Update CounterCard and MarkdownContent styles
Update CounterCard and MarkdownContent styles, and add Credits Content
2023-10-21 13:24:38 +00:00
Ayane Satomi
45409382db Seperate Markdown content in its own island
Signed-off-by: Ayane Satomi <chinodesuuu@gmail.com>
2023-10-21 12:00:46 +00:00
Ayane Satomi
5b9a559b51 Move Footer to components
It didn't make sense to put it there anyway

Signed-off-by: Ayane Satomi <chinodesuuu@gmail.com>
2023-10-21 11:55:25 +00:00
Ayane Satomi
86a415d22d Fix mascot ordering
Signed-off-by: Ayane Satomi <chinodesuuu@gmail.com>
2023-10-21 08:27:08 +00:00
Ayane
458d32bf78
Adjust spacing on mascot
Signed-off-by: Ayane <ayane@vignetteapp.org>
2023-10-20 14:41:35 +08:00
Ayane
3221a8d417
Fix sounds duplicating too much
It will still duplicate but not as much as last time

Signed-off-by: Ayane <ayane@vignetteapp.org>
2023-10-10 12:56:45 +08:00
Ayase Minori
bd0c65636b
Okay I was doing it right after all 💀 2023-10-02 13:20:57 +08:00
Ayase Minori
7a8c49a5e2
Fix CounterCard artificially incrementing instead of the actual count 2023-10-02 13:18:38 +08:00
Ayane
0b241fa735
rewrite markdown
Signed-off-by: Ayane <ayane@vignetteapp.org>
2023-10-02 13:01:32 +08:00
Ayase Minori
ac08c242a9
What is this hellspawn of a spacing 💀 2023-09-27 00:05:04 +08:00
Ayane
d92b1a65d6
Ensure counters are pretty-printed 2023-09-19 15:07:42 +08:00
Ayane
bce27d76ed
Removed unused import 2023-09-19 14:46:57 +08:00
Ayane
65438a50ce
More styling changes 2023-09-19 14:42:54 +08:00
Ayane
7784701b98
Make footer fixed 2023-09-19 14:34:04 +08:00
Ayane
26904b6047
Implement Markdown parsing
I cba to implement the fucking website piece by piece

and localization is hell
2023-09-19 14:17:44 +08:00
Ayane
e73d8788e9
Add le license 2023-09-19 13:53:35 +08:00
Ayane
e491860f51
Add the funny audio
This is hardcoded for now, but we want to add i8n later on
2023-09-19 13:17:36 +08:00
Ayane
bdd00f95ea
Assign a tailwind class for the mascot
Signed-off-by: Ayane <ayane@vignetteapp.org>
2023-09-19 11:50:56 +08:00
Ayane
c9f2ede946
Fix internal count being submitted improperly
Fixes GH-4

Signed-off-by: Ayane <ayane@vignetteapp.org>
2023-09-19 11:30:07 +08:00
Ayase Minori
19fd837312
Perhaps I was harsh on you little one 2023-09-19 11:09:17 +08:00
Ayane Satomi
175577b723 Change branding now xd 2023-09-19 02:46:31 +00:00
Ayane Satomi
f085cd148f refactor(islands, routes): remove ScrollingMascot and add animateMascot function to CounterCard 2023-09-19 02:39:17 +00:00
Ayase Minori
38df720102
Only add a timer on click 2023-09-12 06:43:06 +00:00
Ayase Minori
1a42b2ccf0
Finally figure out how to increment this lol
Signed-off-by: GitHub <noreply@github.com>
2023-09-12 06:38:05 +00:00
Ayase Minori
4a01821907
Finally figure out how to send data from server
Signed-off-by: GitHub <noreply@github.com>
2023-09-12 06:28:01 +00:00
Ayase Minori
3062eae5a6
Properly encode responses 2023-09-11 04:57:06 +00:00
Ayase Minori
062a03c708
Add debugging
Signed-off-by: GitHub <noreply@github.com>
2023-09-11 04:30:34 +00:00
Ayase Minori
78a43c846e
Move statistics stream to another useEffect
Signed-off-by: GitHub <noreply@github.com>
2023-09-11 04:05:53 +00:00
Ayase Minori
81931acd47
Properly implement internal counter
Signed-off-by: GitHub <noreply@github.com>
2023-09-11 04:00:53 +00:00
Ayase Minori
77781faca9
Implement POSTing
Signed-off-by: GitHub <noreply@github.com>
2023-09-11 03:55:06 +00:00
Ayase Minori
237c12fb63
Add timestamping on logs
Signed-off-by: GitHub <noreply@github.com>
2023-09-11 03:31:28 +00:00
Ayase Minori
99d686c0cc Properly assign the values in server side
Signed-off-by: Ayase Minori <chinodesuuu@gmail.com>
2023-09-10 21:10:39 +08:00