summaryrefslogtreecommitdiff
path: root/ui/app/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-11-07 22:23:42 -0800
committerelijah <elijah@riseup.net>2016-11-07 22:23:42 -0800
commit5ba120030a7641a0404252fb7d8b05fced8ede30 (patch)
treefceda496b0b4d0fa0758bf41163d26d3e1f9a0bd /ui/app/lib
parent7169b2c38d517834e867be987cf62e7466b6f241 (diff)
ui: add initial addressbook panel
Diffstat (limited to 'ui/app/lib')
-rw-r--r--ui/app/lib/event_logger.js87
1 files changed, 48 insertions, 39 deletions
diff --git a/ui/app/lib/event_logger.js b/ui/app/lib/event_logger.js
index 368b5ce..fac1a51 100644
--- a/ui/app/lib/event_logger.js
+++ b/ui/app/lib/event_logger.js
@@ -1,54 +1,63 @@
import bitmask from 'lib/bitmask'
-const GENERAL_NOTICES = [
- "KEYMANAGER_KEY_FOUND", // (address)
- "KEYMANAGER_KEY_NOT_FOUND", // (address)
- "KEYMANAGER_LOOKING_FOR_KEY", // (address)
- "KEYMANAGER_DONE_UPLOADING_KEYS", // (address)
-
- "SMTP_START_ENCRYPT_AND_SIGN", // (from_addr)
- "SMTP_END_ENCRYPT_AND_SIGN", // (from_addr)
- "SMTP_START_SIGN", // (from_addr)
- "SMTP_END_SIGN", // (from_addr)
- "SMTP_SEND_MESSAGE_START", // (from_addr)
- "SMTP_SEND_MESSAGE_SUCCESS" // (from_addr)
-]
+const EVENTS = [
+ "CLIENT_SESSION_ID",
+ "CLIENT_UID",
+ "RAISE_WINDOW",
+ "UPDATER_DONE_UPDATING",
+ "UPDATER_NEW_UPDATES",
-const ACCOUNT_NOTICES = [
- "IMAP_CLIENT_LOGIN", // (username)
+ "KEYMANAGER_DONE_UPLOADING_KEYS", // (address)
+ "KEYMANAGER_FINISHED_KEY_GENERATION", // (address)
+ "KEYMANAGER_KEY_FOUND", // (address)
+ "KEYMANAGER_KEY_NOT_FOUND", // (address)
+ "KEYMANAGER_LOOKING_FOR_KEY", // (address)
+ "KEYMANAGER_STARTED_KEY_GENERATION", // (address)
- "MAIL_FETCHED_INCOMING", // (userid)
- "MAIL_MSG_DECRYPTED", // (userid)
- "MAIL_MSG_DELETED_INCOMING", // (userid)
- "MAIL_MSG_PROCESSING", // (userid)
- "MAIL_MSG_SAVED_LOCALLY", // (userid)
+ "SOLEDAD_CREATING_KEYS", // {uuid, userid}
+ "SOLEDAD_DONE_CREATING_KEYS", // {uuid, userid}
+ "SOLEDAD_DONE_DATA_SYNC", // {uuid, userid}
+ "SOLEDAD_DONE_DOWNLOADING_KEYS", // {uuid, userid}
+ "SOLEDAD_DONE_UPLOADING_KEYS", // {uuid, userid}
+ "SOLEDAD_DOWNLOADING_KEYS", // {uuid, userid}
+ "SOLEDAD_INVALID_AUTH_TOKEN", // {uuid, userid}
+ "SOLEDAD_SYNC_RECEIVE_STATUS", // {uuid, userid}
+ "SOLEDAD_SYNC_SEND_STATUS", // {uuid, userid}
+ "SOLEDAD_UPLOADING_KEYS", // {uuid, userid}
+ "SOLEDAD_NEW_DATA_TO_SYNC",
- "SMTP_RECIPIENT_ACCEPTED_ENCRYPTED", // (userid, dest)
- "SMTP_RECIPIENT_ACCEPTED_UNENCRYPTED", // (userid, dest)
- "SMTP_RECIPIENT_REJECTED", // (userid, dest)
- "SMTP_SEND_MESSAGE_ERROR" // (userid, dest)
-]
+ "MAIL_FETCHED_INCOMING", // (userid)
+ "MAIL_MSG_DECRYPTED", // (userid)
+ "MAIL_MSG_DELETED_INCOMING", // (userid)
+ "MAIL_MSG_PROCESSING", // (userid)
+ "MAIL_MSG_SAVED_LOCALLY", // (userid)
+ "MAIL_UNREAD_MESSAGES", // (userid, number)
-const STATUSES = [
- "KEYMANAGER_FINISHED_KEY_GENERATION", // (address)
- "KEYMANAGER_STARTED_KEY_GENERATION", // (address)
- "SMTP_SERVICE_STARTED",
- "MAIL_UNREAD_MESSAGES", // (userid, number)
- "IMAP_SERVICE_STARTED"
-]
+ "IMAP_SERVICE_STARTED",
+ "IMAP_SERVICE_FAILED_TO_START",
+ "IMAP_UNHANDLED_ERROR",
+ "IMAP_CLIENT_LOGIN", // (username)
-const STATUS_ERRORS = [
- "IMAP_SERVICE_FAILED_TO_START",
- "IMAP_UNHANDLED_ERROR",
- "SMTP_SERVICE_FAILED_TO_START",
- "SMTP_CONNECTION_LOST", // (userid, dest)
+ "SMTP_SERVICE_STARTED",
+ "SMTP_SERVICE_FAILED_TO_START",
+ "SMTP_START_ENCRYPT_AND_SIGN", // (from_addr)
+ "SMTP_END_ENCRYPT_AND_SIGN", // (from_addr)
+ "SMTP_START_SIGN", // (from_addr)
+ "SMTP_END_SIGN", // (from_addr)
+ "SMTP_SEND_MESSAGE_START", // (from_addr)
+ "SMTP_SEND_MESSAGE_SUCCESS", // (from_addr)
+ "SMTP_RECIPIENT_ACCEPTED_ENCRYPTED", // (userid, dest)
+ "SMTP_RECIPIENT_ACCEPTED_UNENCRYPTED", // (userid, dest)
+ "SMTP_CONNECTION_LOST", // (userid, dest)
+ "SMTP_RECIPIENT_REJECTED", // (userid, dest)
+ "SMTP_SEND_MESSAGE_ERROR" // (userid, dest)
]
+
export default class EventLogger {
constructor() {
this.logEvent = this.logEvent.bind(this)
- let events = [].concat(GENERAL_NOTICES, ACCOUNT_NOTICES, STATUSES, STATUS_ERRORS)
- for (let event of events) {
+ for (let event of EVENTS) {
console.log('register event ' + event)
bitmask.events.register(event, this.logEvent)
}