Commit Graph

1363 Commits (14cb6b58a24708c7e6f29cbb93765a74139d8e88)
 

Author SHA1 Message Date
lilia 14cb6b58a2 Create install flow
* Refactor options.js into a view
* Break up install flow into a series of screens
* Remove bootstrap
* Make installer window static size, mostly to facilitate positioning

// FREEBIE
10 years ago
lilia 675be2b569 Don't reconnect if close was called
Fixes a bug during re-registration where we continue to re-open
the socket using old credentials.

// FREEBIE
10 years ago
lilia f863616785 Remove api TODO comments
// FREEBIE
10 years ago
lilia 80d32103d1 Clear session store when re-registering
When we re-register, our deviceId might change, which makes our sessions
are no longer valid since the recipient will see us as a new device.

Fixes #388
10 years ago
lilia a52d35bb1b Refactor and fixup key requests
Fix a bad loop scope bug in getKeysForNumber by using forEach.
Refactor the initial process of establishing key material for devices
that do not have open sessions.

// FREEBIE
10 years ago
lilia 6717390e83 Catch cancelation of confirmation dialog
Avoid 'Uncaught (in promise)' error in the console.

// FREEBIE
10 years ago
lilia c64fe8410e Convo list shows 'Media message' when appropriate
// FREEBIE
10 years ago
lilia 503509fc8f Fix blank lastMessage for non-text messages
For non text messages (ex: media messages and group updates), the
lastMessage field was being populated with empty string, resulting in an
empty message preview in the conversation list. Instead, display 'Media
message' or 'Updated the group', etc...

// FREEBIE
10 years ago
lilia b18cfd75de Check for device keys in memory before requesting more
// FREEBIE
10 years ago
lilia 2b9d039837 Serialize requests for keys
Fixes #383

// FREEBIE
10 years ago
lilia 4e2723a751 Create notifications if window is not focused
Track focus using focus and blur events.

// FREEBIE
10 years ago
lilia 0f023ac4bf Focus the message field when conversation opens
Fixes #317

// FREEBIE
10 years ago
lilia 287aa49252 After choosing a file, focus the message field
Allow the user to edit the message and/or hit enter to send the image
without having to click.

// FREEBIE
10 years ago
lilia 6c98fc19b4 Remove send button
// FREEBIE
10 years ago
Jani Monoses cb3b9f0e79 Fix some error messages' wording.
// FREEBIE
10 years ago
lilia 78a2b74297 Restyle attachment previews
Closes #380

// FREEBIE
10 years ago
lilia fe2b152186 Change target for appending file previews
// FREEBIE
10 years ago
lilia 9011a85b56 Change selector for opening a file input
// FREEBIE
10 years ago
Jani Monoses b354851697 Update CONTRIBUTING.md
s/PUSH_URL/TEXTSECURE_URL/ to match rename in Signal codebase.

// FREEBIE
10 years ago
lilia a644b7a674 Update libaxolotl
// FREEBIE
10 years ago
lilia cbc82a95f7 Refactor pending/sent/delivered state markup & css
No need for separate elements since we only ever display one of these
states at a time.

// FREEBIE
10 years ago
lilia 2e575bfb49 Add missing images
// FREEBIE
10 years ago
lilia c77391b3f2 Sinewave animation for pending requests
Tryin it on for size.

// FREEBIE
10 years ago
lilia 1065502770 Change key conflict error message
Include the contact's number in the message for more helpful debug log
output.

// FREEBIE
10 years ago
lilia c9e01390a7 Use check/double check for sent/delivered
// FREEBIE
10 years ago
lilia f8fd613669 Update libaxolotl
// FREEBIE
10 years ago
lilia ac7c95fed0 Validate argument lengths in crypto.js
These functions accept an array buffer and extract an AES and MAC key
from it without verifying it has the appropriate length. Ciphertext
messages are similarly dissected. The slice function does not raise an
error on out of bounds accesses but instead returns an empty or
partially-filled array. Empty or short arrays will be passed through to
the window.crypto.subtle API, where they will raise an error. We should
not rely on the Web Crypto API to validate key lengths or for MAC checks
to fail. Instead, validate the lengths of given parameters before
extracting their components.

// FREEBIE
10 years ago
lilia cb93ad4cff Avoid opening message-detail twice
Previously, clicking the timestamp on an error bubble would open two
message detail views.

// FREEBIE
10 years ago
lilia ec6898f1ab Process incoming messages in order
This may increase processing latency a bit, particularly with large
attachments, but will ensure that messages are dispatched in the order
they are received.

It would be nice to enforce ordering on only the dispatch step, so that
we could, for example, decrypt the next websocket message while waiting
for an attachment to download, but that will require a more complicated
refactor. Will stick with the quick fix for now and revisit later.

Fixes #342

// FREEBIE
10 years ago
lilia 9b12d8a978 Reconnect provisioning socket
If the provisioning socket closes, reconnect and generate a new qr code.
Fixes #371

// FREEBIE
10 years ago
lilia 47befdbf61 Messages bubbles with errors are clickable
For messages with errors, clicking anywhere inside the bubble takes you
to the message detail view.

// FREEBIE
10 years ago
lilia c79a917bbe Remove unused localStorage adapter
And remove various stray references to localStorage

// FREEBIE
10 years ago
lilia ff3b23e452 Make sure group updates get emojified
Render group update content prior to processing emoji, so that emoji in
group titles get processed correctly.

Fixes #368

// FREEBIE
10 years ago
lilia 01e85b68ef Handle exceptions when fetching keys for devices
It's rare that we get in a state where we have a device record without a
session, but we should handle errors gracefully in that case. Catch them
and register them, except for identity key errors which are registered
in handleResult.

// FREEBIE

fixup error handling // FREEBIE
10 years ago
lilia 12276e691b Refactor contents of sendMessageProto
This function dynamically declares a bunch of functions which bind to
its input arguments. Instead, use a new prototypal class to define
these functions within the context of a particular message.

// FREEBIE
10 years ago
lilia a2c7ac0df9 Serialize message sending per-recipient
Add a pendingMessages object to MessageSender. This object holds
one promise per recipient number. We init this promise with
Promise.resolve(), and chain on promises for message sending, replacing
the previous promise with the newly chained promise each time. If the
current promise resolves and finds that it is still the last promise
in the chain, it removes itself.
10 years ago
lilia 4970cbeaed Fix overlapping name and timestamp
In the conversation list, fix long conversation names overlapping with
the right-floated timestamps.

// FREEBIE
10 years ago
lilia 65231f4864 Shorten the search box
This keeps it the same width as the conversation list items.
Also make those overflow-y: scroll so that they are consistent
width, whether or not they are currently overflowing.

// FREEBIE
10 years ago
lilia 9be5efc571 Simplify keepalive resets
Websocket resources should have their keepalive timers reset whenever a
message comes in. This is a nicety that slightly reduces the amount of
traffic we send when actively messaging.

Previously this was handled by MessageReceiver, but it's a bit cleaner
to just have the WebsocketResource add an extra 'message' event handler.

// FREEBIE
10 years ago
lilia 5a8787f91a More small tweaks
Lighten last-message color for both read/unread states.
Keep bold font weight on last-message for unread state.
Bring timestamp inward a bit

// FREEBIE
10 years ago
Odysseas cafbc0f5df Tweak conversation list style
Styled the conversation list items so that:
 - Timestamp is on the same line as the name
 - The message text on an unread conversation is ligher than the rest of
   the text

Resolves: #379
10 years ago
lilia e68b84ad9a Fix saving TypeErrors
// FREEBIE
10 years ago
lilia e842ade196 Slow your roll, socket status updates
Avoid a 1 sec flash of "Disconnected" if connection is dropped only
momentarily.

// FREEBIE
10 years ago
lilia 4b47833928 Make new-contact use cursor: pointer
// FREEBIE
10 years ago
lilia 2e32c7bbc3 Small refactor of attachment views
Bind the sub-view to some data when we initialize it, rather than
passing it in on render. That means the image view click handler will
only ever open the blob we bound it to, even if its src attr changes for
some reason, which should never happen, but if it does, it's nice to
guard against opening arbitrary urls found in the dom.

// FREEBIE
10 years ago
lilia 4a9fcc38df Use cursor: pointer on image attachments
Because clicking on an image now opens it in a new browser window.

// FREEBIE
10 years ago
Odysseas 49585c8c57 Add feature to open image attachments
Images that are attached to messages, either sent or received
can be opened in a new tab by clicking on them.

The previous approach that used Anchors to open the image
attachmets failed in various systems because:
 - Chrome on Windows recognised "blob" as protocol and tried
   to find an app for it
 - Chromium on Ubuntu didn't open a new window to load the URL

The new approach adds a "click" listener to the IMG element and
opens the link using window.open (which seems to be working globaly).

Resolves: #252
10 years ago
lilia a32780d174 Mark delivered messages as sent
In rare cases, a race between delivery receipts and outgoing message
requests can cause the sent flag to be reversed. Fix by marking messages
sent at the same time they are marked delivered.

// FREEBIE
10 years ago
lilia b65adc14dc Restyle debug log
Fixup for new layout and add a close button.

// FREEBIE
10 years ago
Deirdre Connolly 861bc416e6 Update attachment size limits to match mobile clients
Per WhisperSystems/TextSecure@8a1428e, bump GIF limit to 5MB, and
audio/video limit to 100MB. Update toast to notify in correct
human-readable units. The only kB size limit is for images, and will
trigger only if after scaling up to 4 times, the rescaled image did not
come in under the size limit without unacceptable quality loss.

Closes #354
10 years ago