Skip to content

Settings backup/restore + small fixes

HJ requested to merge settings-import-export into develop

Another stepping stone for settings sync, should enable easier debug for us and manual sync solution for the impatient. Also should make wiping localstorage less of a problem since it also backs up user highlights which don't have proper UI for them.

Major:

  • Changed ImportExport component into a service since it's mostly logic/direct DOM-manip, not much of markup going on, makes it more reusable and avoid mess with slots
  • Implemented settings save/restore function
    • New dropdown button in modal footer: save, save with theme, restore
    • Settings saved with array version - current version [1, 0] - works similarly to semver but in array, for future-proofing it will refuse to load settings with major version != 1 (i.e. [2, 0]) but will work different minor version, i.e. [1, 1].
    • Separate control for theme saving since theme data is quite heavy.
      • For future we might add dialog box asking if user wants to import theme as well if it's present
    • Restoring goes over supported properties and updates them using setOption with data found in file. Minor stuff:
  • one more fix for "p's broken theme" fucking up theme editor and making it mostly unusable
  • changed "Peek"/"Close" buttons to use icons instead, feels a bit more natural and less confusing given that there are now button in footer too.
  • panel footers no longer use panel header colors, it just looked silly and didn't really work with some themes (redmond), cleaned up their styles a bit
Edited by HJ

Merge request reports

Loading