2020-11-02 09:50:27 +05:00
|
|
|
import EventManager from "./utils/event-manager";
|
|
|
|
|
|
|
|
|
|
export const EV = new EventManager();
|
2020-11-11 15:43:09 +05:00
|
|
|
|
|
|
|
|
export async function sendCheckUserStatusEvent(type) {
|
|
|
|
|
const results = await EV.publishWithResult("user:checkStatus", type);
|
|
|
|
|
if (typeof results === "boolean") return results;
|
|
|
|
|
return results.some((r) => r.type === type && r.result === true);
|
|
|
|
|
}
|
2020-12-05 13:19:41 +05:00
|
|
|
|
|
|
|
|
export const CHECK_IDS = {
|
|
|
|
|
noteColor: "note:color",
|
|
|
|
|
noteTag: "note:tag",
|
|
|
|
|
noteExport: "note:export",
|
|
|
|
|
vaultAdd: "vault:add",
|
|
|
|
|
notebookAdd: "notebook:add",
|
|
|
|
|
backupEncrypt: "backup:encrypt",
|
|
|
|
|
};
|
2020-12-05 15:28:54 +05:00
|
|
|
|
2020-12-08 12:23:35 +05:00
|
|
|
export const CURRENT_DATABASE_VERSION = 4.3;
|