Skip to content

feat: add import/export functionality to the game screen#40

Open
oneeyedman wants to merge 1 commit intochr15m:masterfrom
oneeyedman:master
Open

feat: add import/export functionality to the game screen#40
oneeyedman wants to merge 1 commit intochr15m:masterfrom
oneeyedman:master

Conversation

@oneeyedman
Copy link

@oneeyedman oneeyedman commented Mar 3, 2024

Hi, @chr15m:

I made the importer/exporter development, and though it works I don't properly know Clojure, so I found a way to copy the JS file with the functionality to the public folder, and I'm sure it's further than right insufficient or incorrect..

For the importer/exporter system to work, you need to follow these steps.
On your browser:

  1. Play your current game or access to the final page (in case you already played today).
  2. Export your data with the Elf's button. It saves it to a JSON file.

On the new browser:

  1. Play a game, just to access the final page.
  2. Use the Wizard's button. It shows an "Are you sure" modal layer and then asks you to locate the backup JSON file, and that's it.

I made a basic design, trying to match the game's looks.

Game page with the new buttons:
game

Game page warning modal:
game-warning

Please look at the code, knowing that I've tried my best. Please keep what you like, ask for improvements or changes as you see fit, and if you change your mind or simply discover that you don't like the PR, please know that it is completely okay with me.

Close #39

@chr15m
Copy link
Owner

chr15m commented Mar 4, 2024

This is super cool, thanks for sending it through. I really like the simple design you came up with. I will probably do an implementation in ClojureScript at some point but I will leave this PR here for reference. Thank you very much for taking a crack at it!

@oneeyedman
Copy link
Author

yes-sweet

I'm super glad you like the solution.
Let me know if you end up implementing the idea. Learning while having fun is always great.

^___^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Method for sync'ing progress to another machine [1]

2 participants