Automatically store/retrieve the current replay in the page URL #1

Merged
max merged 7 commits from timotree/deck-website:import-json into main 2025-08-13 16:25:18 +02:00
Collaborator

This PR makes it so that the page URL is always of the form https://hanabi.maximilian-kessler.de/#replay-json/<compressedJson> where compressedJson is a string in the format expected by https://hanab.live/replay-json/<compressedJson>. If such a URL is entered, the page automatically loads the replay from the URL. In addition to allowing users to save, restore, and share their solitaire game inputs, this gives a version of undo and redo for free via the browser back and forward buttons.

This PR makes it so that the page URL is always of the form `https://hanabi.maximilian-kessler.de/#replay-json/<compressedJson>` where `compressedJson` is a string in the format expected by `https://hanab.live/replay-json/<compressedJson>`. If such a URL is entered, the page automatically loads the replay from the URL. In addition to allowing users to save, restore, and share their solitaire game inputs, this gives a version of undo and redo for free via the browser back and forward buttons.
Automatically searches for whether the deck already appears in the database
This commit makes it so that the page URL is always of the form `https://hanabi.maximilian-kessler.de/#replay-json/<compressedJson>`
where `compressedJson` is a string in the format expected by `https://hanab.live/replay-json/<compressedJson>`.
If such a URL is entered, the page automatically loads the replay from the URL.
In addition to allowing users to save, restore, and share their solitaire game inputs,
this gives a version of undo and redo for free via the browser back and forward buttons.
max approved these changes 2025-08-13 16:18:07 +02:00
max merged commit 3249505513 into main 2025-08-13 16:25:18 +02:00
Sign in to join this conversation.
No reviewers
max
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Hanabi/deck-website!1
No description provided.