Client settings per collective and user

Client settings can be stored at the user and and the collective. The
settings used in the application are merged from these two settings,
where any user setting takes precedence. The form can now manage both
variants.

Refs: #838
This commit is contained in:
eikek
2022-01-29 10:11:25 +01:00
parent ee927096a4
commit c29ce73dd0
19 changed files with 812 additions and 438 deletions

View File

@ -55,25 +55,6 @@ elmApp.ports.removeAccount.subscribe(function() {
closeWS();
});
elmApp.ports.requestUiSettings.subscribe(function(args) {
console.log("Requesting ui settings");
var account = args;
var collective = account ? account.collective : null;
var user = account ? account.user : null;
if (collective && user) {
var key = collective + "/" + user + "/uiSettings";
var settings = localStorage.getItem(key);
try {
var data = settings ? JSON.parse(settings) : null;
if (data) {
console.log("Sending browser ui settings");
elmApp.ports.receiveUiSettings.send(data);
}
} catch (error) {
console.log(error);
}
}
});
var docspell_clipboards = {};