Closed imnaiyar closed 1 year ago
Hello!
Although I don't use cookies for this data I'm well aware browser storage can be cleared just as easily. Using browser storage (localStorage as implemented in storage.service.ts) was a quick and easy way for me to keep track of stored items. It's doubtful the current implementation scales well when tracking a lot of unlocked items. Revisiting the storage solution is definitely on my to-do list. Adding an export and import feature for safekeeping/sharing should be a trivial addition.
I'll mark this issue as an enhancement for now.
PS. I haven't really shared this project anywhere yet because I felt it was very much still in development. If I may ask, how did you stumble across this repo? Were you looking specifically for something Sky:CotL?
Oh, I hope I didn't intrude but I shared it on the Official Sky Discord server because I assumed since it was open-source.
I was looking at the Sky Clock website and its contributors and I stumbled upon you and your repository.
Lemme know if you want me to delete the message in the discord server. Although the people who have seen it so far really likes it, it'd be good for you to discuss it on the server if you want(preferably on season-events-chat).
I've linked some of the responses it got from players
No problem at all! I'm actually really happy to see there's already some positive reactions to my little side project 😊
I didn't want to share it officially when there's still things to add and improve such as this request. I've shared the project with a few friends to collect some useful feedback such as the small season/IAP icons on the item page as well. I don't mind other people sharing it.
Right now I got some ideas how to handle this request.
Making this site serverless (everything is hosted as-is on GitHub Pages) was an important goal for me. No hassle of maintaining a server or worrying about any attached server costs if the project sees more usage.
localStorage (current solution) isn't very future-proof. The more data saved the slower it gets (although depending when I save the data this may not be noticeable). Combining this data storage with export/import would be enough but I am planning on changing the mechanism both to improve the project and so I can learn some different mechanisms myself.
Using a local file (with a file picker) as a primary storage would allow changes to immediately save to the selected file. That said, it would require users to open the file every time they visit the site. Not a great user experience so I'm not going that route.
I had a quick look at integrations with external services (Dropbox, Google Drive) but I'd have to store the OAuth credentials somewhere (back-end) so unless I choose to store those unsafely in browser storage that's not really an option.
I'm thinking of using IndexedDB which is basically running a database within the browser. It'll still be prone to clearing by the user (i.e. wiping browser history with data) but it keeps everything serverless. Allowing exporting to a file to create backups will make it possible to recover unlocks if you do manage to clear your browser data (or want to share your data, switch devices, whatever).
@imnaiyar After testing some other (local, serverless) options nothing really trumped use of localStorage. So I went ahead and added an import/export feature available in the Settings menu as per #2 . If you're not satisfied and have a good idea feel free to let me know.
@imnaiyar I'm not sure if you're still active here but I thought I'd let you know that I've implemented an experimental version of Dropbox cloud saving in #90 with a short description of how to use it in a related issue https://github.com/Silverfeelin/SkyGame-Planner/issues/87#issuecomment-2069861222 If you're interested in trying this out I'd love to hear back in the discussion of #90!
Hi, I was browsing through gitHub when i stumbled upon this and honestly it's so mind-blowing. You have made a fantastic app and I can't really help myself but praise it. Although I got one request. So far it seems to store data on cookies which can be easily lost. Do you plan to introduce another way on which data can be stored?