mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Move to plugin #385
This commit is contained in:
parent
86ac71ea2e
commit
9789a2509f
13 changed files with 197 additions and 67 deletions
|
|
@ -92,6 +92,8 @@ export class AppUser extends AbstractApp {
|
|||
|
||||
addShortcut('escape,enter', '', dropdownsDetectVisibility);
|
||||
addEventListener('click', dropdownsDetectVisibility);
|
||||
|
||||
this.folderList = FolderUserStore.folderList;
|
||||
}
|
||||
|
||||
refresh() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { koComputable } from 'External/ko';
|
|||
import { SettingsGet } from 'Common/Globals';
|
||||
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
||||
import { ContactUserStore } from 'Stores/User/Contact';
|
||||
import { FolderUserStore } from 'Stores/User/Folder';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
export class UserSettingsContacts /*extends AbstractViewSettings*/ {
|
||||
|
|
@ -49,33 +48,5 @@ export class UserSettingsContacts /*extends AbstractViewSettings*/ {
|
|||
Password: ContactUserStore.syncPass()
|
||||
})
|
||||
);
|
||||
|
||||
this.kolabContactFolder = ko.observable(SettingsGet('KolabContactFolder'));
|
||||
this.kolabContactFolder.subscribe(value =>
|
||||
Remote.saveSettings(null, { KolabContactFolder: value })
|
||||
);
|
||||
this.showKolab = FolderUserStore.allowKolab();
|
||||
this.folderSelectList = koComputable(() => {
|
||||
const
|
||||
aResult = [{
|
||||
id: '',
|
||||
name: '',
|
||||
}],
|
||||
foldersWalk = folders => {
|
||||
folders.forEach(oItem => {
|
||||
if ('contact' === oItem.kolabType()) {
|
||||
aResult.push({
|
||||
id: oItem.fullName,
|
||||
name: oItem.fullName
|
||||
});
|
||||
}
|
||||
if (oItem.subFolders.length) {
|
||||
foldersWalk(oItem.subFolders());
|
||||
}
|
||||
});
|
||||
};
|
||||
foldersWalk(FolderUserStore.folderList());
|
||||
return aResult;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue