thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
460 stars 270 forks source link

Allow user to configure where to save data #184

Open tupaschoal opened 4 years ago

tupaschoal commented 4 years ago

Describe the issue Currently we save everything that TTL needs to in %appdata% on Windows or corresponding in other OSes. This might make it difficult for the user to back-up the data, if they want to.

We should allow users to set where the data is to be saved, so they can rely on some cloud backup. If the user is starting a TTL with data and choosing a new place, we should copy the data over. If it's a clean TTL, there is no need to.

NetizenAbel commented 4 years ago

This seems like it should be wrapped into #28 along with an export. I believe @marisusis had begun looking into the importing.

tupaschoal commented 4 years ago

Likely, though I don't see this one as just dumping data once, but as a way of configuring where the app will always try to read from.

NetizenAbel commented 4 years ago

What if we were to check where the app is running from, and use a sane default gathered from that context (is it in /Applications, or on a usb stick?), and have a configurable path in preferences? That would be easily done, I should think.

thamara commented 4 years ago

I'm not sure if I understood the "use a sane default gathered from that context". You mean default to the default path provided by the system (in electron-store that is app.getPath('userData')), and have it configurable from the preferences, right?

NetizenAbel commented 4 years ago

The meaning of a sane default would, in this case, be a default that matches what the system and user would expect to find it if it's not being directly told otherwise. That default would be from electron-store, and configurable from the same place one would import or export from.

thamara commented 4 years ago

I agree and will start working on this soon.