✨ Export/Import settings to and from a json
file support for the UI
#629
+579
−228
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.
What does this PR do?
This PR provides the functionality to import and export user preferences from the search engine.
Why is this change important?
This change is essential as it provides the functionality for the users to easily export saved user preferences from the UI to their machines for backup. So that when the user change browsers or machines, then the user can easily import their backuped preferences for the UI. Additionally this change can also allow the user to write a
json
file with custom values which can be used to import their preferred custom preferences for the UI.Screenshots
How to test this PR locally?
It can be tested by installing and running
Websurfx
as mentioned in thedocs
and on thereadme
and by launching the browser and thoroughly testing. By saving some preferences on the UI via the settings page and exporting it as ajson
file and then clearing cookies for the search engine UI and then re-importing thejson
file. Additionally further checks can be carried by editing the backup file and providing inavlid values and testing whether thejson
values get santized as intended.Author's checklist
json
data.v1.21.0
.Related issues
Closes #427