mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:57:08 +00:00
The user preferences are saved in the browser's localStorage and read by setCredentials() whenever that function is called. From that point they are cached in the Vuex store. Provided that preferences are only modified through the store, via the saveUserPreference() call, the preferences should always be in sync between the store and the browser. The preferences object is a key/value store. Each key is expected to be in the form of a series of dot-separated prefixes, e.g., `UserX.RoleY.Graphs.GraphType1.setting0`. For user preferences, the first two prefix elements should be the username and role of the user that the setting applies to. These will be automatically added and stripped by saveUserPreference() and loadUserPreferences() respectively.