Commit graph

981 commits

Author SHA1 Message Date
lilia
31e7d285e3 Popout inbox
Rather than opening the inbox in its own window, let it appear as a
browser action popup by default, but allow promotion to its own window
if requested.
2015-03-18 16:29:01 -07:00
lilia
cecb438a52 Simplify avatar rendering 2015-03-18 16:29:01 -07:00
lilia
fa3699cdd3 Trigger desktop notifications
Notifications show the conversation name, avatar, and new message text.
Clicking the notification opens the conversation.
2015-03-18 16:29:01 -07:00
Matt Corallo
f8e69fa8e7 Remove now-unused X11 license file 2015-03-17 14:43:23 -07:00
Matt Corallo
d3c158f4cf Move libaxolotl out-of-tree 2015-03-17 14:43:23 -07:00
Matt Corallo
e2e06b2d3c Remove axolotl.storage usage from libtextsecure 2015-03-17 13:59:25 -07:00
lilia
b790f82849 Remove libaxolotl dependency on textsecure/errors.js
Let libaxolotl throw a generic error instead of a replayable error, and
add an helper function in libtextsecure's axolotl_wrapper to catch and
convert from the generic error to the replayable one. This allows the
ReplayableError to remain a libtextsecure-level concept only.

Somewhat unrelatedly, but nearby, fix some whitespace and add missing
semicolon.
2015-03-17 13:59:24 -07:00
lilia
676ad04958 Add device storage method to wipe an identity 2015-03-17 13:59:24 -07:00
lilia
45a053b3a8 Break long links in message bubbles / Fixes #204 2015-03-16 18:08:45 -07:00
lilia
f86d6d51e3 Only init emoji map once.
`emoji.init_colons` creates and populates `emoji.map.colons`, a global
map from common names to emoji code points. It's safe to call
repeatedly, but unecessary.
2015-03-16 17:44:49 -07:00
lilia
5df56663ef Let jscs ignore libtextsecure.js
Fix warnings about mixed tabs and spaces. They are in compiled code.
2015-03-16 16:28:53 -07:00
lilia
9e04910124 Recompile curve25519 with emcc 1.29.0
Now with actual malloc/free implementations. Had to drop back to -O1
optimization because the ed25519 signature test broke with -O2. :(

Closes #153

The toolchain install and build process, for reference:
```
wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
tar xvfz emsdk-portable.tar.gz
cd emsdk-portable
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ../TextSecure-Browser
grunt build
```
2015-03-16 16:07:47 -07:00
lilia
08ccdf8d97 Move most scripts to the background page
Dramatically improve load times for frontend pages.

Closes #133
2015-03-16 11:57:41 -07:00
lilia
5405b062d2 Update CONTRIBUTING.md 2015-03-15 12:20:13 -07:00
lilia
651b6341fa Unbind frontend listeners when window closes 2015-03-14 20:46:00 -07:00
lilia
69d5a6a33c Improve group update ui/ux
Promote group update to its own screen. Add typeahead contact selector
from new conversation view. Restyle to match android (more or less).

Closes #186
2015-03-13 17:33:02 -07:00
lilia
7e3961891b Tweak menu styles 2015-03-13 17:29:28 -07:00
lilia
d20e23402d Refactor RecipientsInputView from NewConversationView
For reuse on group update screen.
2015-03-13 17:29:28 -07:00
Florian Groh
617b7686f7 Register Input Handling
I had some trouble with the registration..
Quickly checked TextSecure Server API and found the problems:
number has to be valid PSTN. (Including regionCode, precisely what validateNumber() returns)
verificationCode has to be all numbers, no dashes or spaces

Closes #193
2015-03-13 10:33:07 -07:00
lilia
0ac323961b Close the inbox if the background page is refreshed 2015-03-12 11:23:41 -07:00
lilia
36319d6458 Fix crash when sending :invalid_emoji: 2015-03-12 11:03:11 -07:00
lilia
04796e56d1 Fix tests 2015-03-11 20:41:15 -07:00
lilia
f1309b71c1 Don't scale or compress gifs
If a gif is too large, it's too large.

Fixes #196
2015-03-11 20:20:54 -07:00
lilia
8e54aa1401 Plumb contact avatars into conversations 2015-03-11 17:49:01 -07:00
lilia
019a9d1fbc Unread counts
Update unreadCounts per-conversation on incoming messages. Render unread
conversations with font-weigh: bold in the inbox view.

To ensure that the inbox and conversation views remain in sync, the
background page now ensures that the same models objects are used for
both views.
2015-03-11 15:13:36 -07:00
lilia
b9969b14b6 Always reconnect the socket except when there is an error
Turns out we can get ABNORMAL_CODE (1006) for disconnects where (for
instance) we pause the background page too long. However, in these cases
there is no preceeding ErrorEvent. In contrast, when we have bad
authentication credentials, there is an ErrorEvent. Thus, this change
ensures that we only reconnect if there was no Error.
2015-03-11 14:12:25 -07:00
lilia
5becd80fe9 Show an error if a conversation window fails to init
I saw this happen once. Seems to be a race condition.
2015-03-11 14:12:25 -07:00
lilia
0cbad730ce Don't send keepalive if socket has closed
Also shorten the timeout to see if it improves websocket connection
reliability.
2015-03-11 14:12:25 -07:00
lilia
2b073f3365 Reset keepalive timer if we're about to send
No sense in sending more keepalives than necessary.
2015-03-11 11:12:14 -07:00
lilia
ed707db4ba Support :emoji_name: syntax for emoji text input 2015-03-10 18:54:07 -07:00
lilia
01092075ac Add js-emoji as a component 2015-03-10 18:15:31 -07:00
lilia
254131488e Render emoji in conversation and inbox views. 2015-03-10 18:15:31 -07:00
lilia
99d599e008 Add twemoji as a component 2015-03-10 18:15:30 -07:00
lilia
7e5e558ad5 Bump keepalive to 60s 2015-03-10 18:14:12 -07:00
James Firth
cd91a47a3a Updated Registration Instructions
Documents the changes made in commit
8ee282b1aa
2015-03-09 16:24:06 -07:00
lilia
c73f4d71a7 DRY up scrollable pattern
Switch to using gutter class instead of id since there is potentially
more than one usage on the page.
2015-03-09 16:05:06 -07:00
lilia
a72ea7966d Clean up inbox/compose view rendering and swapping
Templatize the inbox view and use the same pattern for in-window view
switching as is now used with the conversation/message detail views.
This means doing more with markup and less jquery manipulation of
individual subelements of the inbox view.
2015-03-09 16:05:06 -07:00
lilia
fd6e2954f7 Curtail over-zealous websocket reconnects
Closes #173

Previously, in the event of a failed websocket auth, we would attempt to
reconnect once a second ad infinitum. This changeset ensures that we
only reconnect automatically if the socket closed 'normally' as
indicated by the code on the socket's CloseEvent. Otherwise, show a
'Websocket closed' error on the inbox view.

Ideally we would show a more contextual error (ie, 'Unauthorized'), but
unfortunately the actual server response code is not available to our
code. It can be observed in the console output from the background page,
but programmatically, we only receive the WebSocket CloseEvent codes
listed here:
https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes

The websocket error message is displayed by a normally-hidden but ever
present socket status element. Clicking this element will immediately
refresh the background page, which will try again to open the websocket
connection.
2015-03-09 16:04:26 -07:00
lilia
1321a90667 Rename Whisper.View#attributes
Avoid colliding with Backbone.View attributes, which is a list of attrs
to set on the html element for a view.
2015-03-06 17:05:36 -08:00
lilia
dc1b09f59d Auto-link urls in message bodies
And watch out for xss.

Closes #187
2015-03-06 17:01:04 -08:00
lilia
8ee282b1aa Restyle registration page
When first intalling, users will no longer be presented with the option
to register as a standalone client.

For developer convenience, the standalone form can still be found at
chrome-extension://.../register.html

Closes #159
2015-03-06 15:27:49 -08:00
lilia
a9cf4bd93e Update test config to run against latest Chrome
Break up some long lines while I'm here.
2015-03-05 18:29:00 -08:00
lilia
01d5881a71 Remove unneeded if-gaurd 2015-03-05 17:48:07 -08:00
lilia
7a03c26849 Adjust message bubble tail position
It should align with the center of the avatar.
2015-03-05 17:47:32 -08:00
lilia
fc6c8c0f3e Fix tests 2015-03-05 16:51:53 -08:00
lilia
b65190e101 Break a long line 2015-03-05 16:30:59 -08:00
lilia
e2bd55c171 Tweak delivery receipt and timestamp display
Checkmark is no longer underlined when hovering over the timestamp.
2015-03-05 16:29:12 -08:00
lilia
99787753a8 Stop re-rendering attachments on delivery receipt
Only re-render a message if the body changed. Re-render only the
delivery receipt checkmark if the delivered property changes.

Fix a bug where attachments flash in and out of existance when a
delivery receipt arrives.
2015-03-05 16:14:51 -08:00
lilia
dfe7813e7f Fix multiple from address in message detail 2015-03-05 15:54:23 -08:00
lilia
441167ab35 Tighten up send btn icon size 2015-03-05 15:49:00 -08:00