mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
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:
@ -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 = {};
|
||||
|
||||
|
Reference in New Issue
Block a user