Skip to content

Draft: Allow user-definable settings import/export paths (#143)

csharpen requested to merge settings-file-dialogs into master

Allows for settings import and export to browse-able file locations, showing actual filesystem paths.

In a perfect world, this should have been much simpler than it is, given the inability to CSS style native browser file buttons/labels. This effectively hides the native elements and leverages clickable labels.

This also uses nwjs's native "nwsaveas" to allow the browser dialog to be populated with a default filename suggestion (gt_settings.json). See https://docs.nwjs.io/en/latest/References/Changes%20to%20DOM/

Unfortunately, in my testing, I believe nwjs has a bug - when the save dialog is re-visited, it shows the selected path as underscore delimited (instead of the appropriate slash). I don't believe this to be a showstopper, but it is irksome.

See screenshots: f5bab3a4 (comment 1101308311)

Merge request reports