1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-10-08 06:15:48 +02:00
Lexiconga/src/js/account/dictionaryManagement.js

25 lines
616 B
JavaScript
Raw Normal View History

2019-05-21 18:57:29 -06:00
import { saveEditModal } from "../dictionaryManagement";
import { syncDetails } from "./sync";
import { addMessage } from "../utilities";
export function saveEditModalAndSync() {
saveEditModal();
return syncDetails().then(successful => {
if (successful) {
addMessage('Synced Successfully');
} else {
addMessage('Could Not Sync');
}
})
.catch(err => {
console.error(err);
addMessage('Could not connect');
});
}
export function saveAndCloseEditModalAndSync() {
saveEditModalAndSync().then(() => {
document.getElementById('editModal').style.display = 'none';
});
}