lovelace-website
lovelace-website copied to clipboard
My preferred language is not remembered
Each time I start a new problem, Python is selected instead.
Yes indeed this would be nice. Right now it's a static dropdown box so it doesn't remember what language was previously picked.
I'm not sure how to add support for it right now but we should look into it since it would also help with #132.
If you or anyone else knows how to remember things like this between page visits please do share! I'm assuming it requires something like cookies?
I think this is a good use-case for local storage. Using cookies could also work too, but local storage has the easier api, and keeps data "local", unlike cookies which will send the cookie to the server on each request (which isn't really a big concern for this data, but why send more data than you need to?).
Oh cool I didn't know about local storage.
I guess we can use it to save someone's preferred language, the order of the problems table, code editor settings (if we have them in the future), etc.