Allow de/serialization of character profiles and sources from/to files #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to save character profiles and created sources (with their created spells) to JSON files, in addition to the current functionality of copying to the clipboard. This also adds the ability to import profiles and sources directly off JSON files saved on the user's device.
As part of this, the functionality for the character and source adapter popup menus is now handler via a handler interface that gets passed in, rather than via the adapter directly. We don't have events that we can emit here, but this interface is intended to mimic an event handler-style setup. This was necessary for setting up the file export handling, but also has the benefit of making the adapters significantly more reusable.