heyman / heynote

A dedicated scratchpad for developers
https://heynote.com
Other
4.01k stars 200 forks source link

Use local file in webapp #153

Open pomdtr opened 9 months ago

pomdtr commented 9 months ago

Have you searched existing Github issues to see if someone has already requested this feature? Yes

Is your feature request related to a problem? Please describe.

I want to use heynote from my browser, but I want the content to be synced with the app.

Describe the solution you'd like Website can access the filesystem using the File System API. The browser app could default to using localstorage, while optionally allowing to open a local file.

Additional context I would be willing to implement this myself, but I want your approval before dedicating time to it

heyman commented 9 months ago

Yes, this is a feature that I'd like the web app to have, and it'd be great if you want to work on it!

I've just briefly looked into the File System API, but if I understand it correctly, you should be able to grant the Heynote web app full access to a directory, and that that access will persist between sessions.

pomdtr commented 9 months ago

I'll be skiing next week, but I can start working on it after that. I don't have any experience working with this api, but I've been wanting to explore it for a while. Btw, what do you think of adding a pwa manifest to the app ? It would allow to install it to the home screen on mobile.

heyman commented 9 months ago

what do you think of adding a pwa manifest to the app ? It would allow to install it to the home screen on mobile.

Sounds like a good idea!

heyman commented 9 months ago

One thing to keep in mind is that even though we currently just use a single file for the buffer, we might want to add more files in the future (e.g. metadata related to the buffer, or more than one buffer). So, if possible, one should be able to select a whole directory, just like in the "Buffer File Path" setting in the stand-alone app.