mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
17 lines
456 B
JavaScript
17 lines
456 B
JavaScript
import { addObservablesTo, koArrayWithDestroy } from 'External/ko';
|
|
import Remote from 'Remote/User/Fetch';
|
|
|
|
export const SMimeUserStore = koArrayWithDestroy();
|
|
|
|
addObservablesTo(SMimeUserStore, {
|
|
loading: false
|
|
});
|
|
|
|
SMimeUserStore.loadCertificates = () => {
|
|
SMimeUserStore([]);
|
|
SMimeUserStore.loading(true);
|
|
Remote.request('SMimeGetCertificates', (iError, oData) => {
|
|
SMimeUserStore.loading(false);
|
|
iError || SMimeUserStore(oData.Result);
|
|
});
|
|
};
|