Commit graph

70 commits

Author SHA1 Message Date
lilia
f8db7c606a Include bootstrap via sass
One less file to load on the options/register page.
2015-05-07 16:22:57 -07:00
lilia
96eafc7750 Integrate libaxolotl async storage changes
* Session records are now opaque strings, so treat them that way:
  - no more cross checking identity key and session records
  - Move hasOpenSession to axolotl wrapper
  - Remote registration ids must be fetched async'ly via protocol wrapper
* Implement async AxolotlStore using textsecure.storage
* Add some db stores and move prekeys and signed keys to indexeddb
* Add storage tests
* Rename identityKey storage key from libaxolotl25519KeyidentityKey to
  simply identityKey, since it's no longer hardcoded in libaxolotl
* Rework registration and key-generation, keeping logic in libtextsecure
  and rendering in options.js.
* Remove key_worker since workers are handled at the libaxolotl level
  now
2015-05-05 17:44:55 -07:00
lilia
2cb0070343 s/TextSecure/Signal on options page 2015-05-05 17:44:30 -07:00
lilia
5888039123 Reorder database.js include
Prep to use indexedDB for axolotl storage.
2015-04-15 18:06:33 -07:00
lilia
c6b0b71383 Change progress dialog header 2015-04-05 16:50:35 -07:00
lilia
13ce354ab8 Registration UX improvements
Add some nice modal dialogs instead of confirmation alerts.
2015-03-26 15:20:17 -07:00
lilia
c526dbda5f Set up production build task
`grunt copy`

Closes #191
2015-03-19 18:34:56 -07:00
lilia
db3d97b576 Move icon.png to /images 2015-03-19 18:34:11 -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
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
1bb480f6ea DRY up a common view pattern
Define a Whisper.View base class that automatically parses and renders
templates and attributes defined by the subclass. This saves us a good
number of lines of code as well as some marginal memory overhead, since
we are no longer saving per-instance copies of template strings.
2015-03-05 15:36:35 -08:00
Matt Corallo
02d0c58e5e Mostly done device-bringup stuff 2015-02-11 14:03:54 -08:00
lilia
5d044bd00e Fire an event on phone number validation
Fix a bug introduced by recent phone number input work that prevented
the call and sms buttons from being clickable.
2015-01-17 22:51:32 -10:00
lilia
ed06161ee7 Quick fix for phone input style 2015-01-17 22:32:47 -10:00
Emily Chao
e74cba8a92 Restyled country dropdown
Added jquery plugin that allows for flags and country codes to be
displayed in a user-friendly way, on top of the existing phone view
2015-01-15 15:24:36 -10:00
Emily Chao
5d3020b9ed Refactor phone number input view
Moves validation logic to its own view to be shared on index and options
pages.
2015-01-15 11:51:32 -10:00
Matt Corallo
e7f3e52b6c Remove NaCL! 2015-01-14 11:39:36 -10:00
Matt Corallo
5785f4033c Compile curve25519/webcrypto into libtextsecure.js 2015-01-14 09:35:57 -10:00
Matt Corallo
8ad1a38b5b Move js files around for libtextsecure split 2015-01-14 09:35:57 -10:00
Matt Corallo
d9db0f53e7 s/\t/ /g in {background,options}.html 2015-01-06 14:51:59 -08:00
lilia
ff259a7dee Tolerate extra whitespace in the registration code field 2014-12-24 14:31:04 -08:00
lilia
4a401f07f3 Rewrite ReplayableErrors
ReplayableErrors make it easy for the frontend to handle identity key
errors by wrapping the necessary steps into one convenient little
replay() callback function.

The frontend remains agnostic to what those steps are. It just calls
replay() once the user has acknowledged the key change.

The protocol layer is responsible for registering the callbacks needed
by the IncomingIdentityKeyError and OutgoingIdentityKeyError.
2014-12-18 20:00:14 -08:00
lilia
7b23e24b71 Add stringview license info and script tags
Closes #94
2014-12-03 01:36:10 -08:00
lilia
ee0d7edc0b WebSocket-Resources / websocket refactor
This commit provides the javascript complement to
[WebSocket-Resources](https://github.com/WhisperSystems/WebSocket-Resources),
allowing us to use a bi-directional request-response framework over
websockets.

See websocket-resources.js and websocket-resources_test.js
for usage details.

Along the way I also factored the websocket keepalive and reconnect
logic into its own file/wrapper object.
2014-11-29 11:43:30 -08:00
lilia
ced295a630 Move message and conversation storage to IndexedDB
Getting up and running with IndexedDB was pretty easy, thanks to
backbone. The tricky part was making reads and writes asynchronous.
In that process I did some refactoring on Whisper.Threads, which
has been renamed Conversations for consistency with the view names.

This change also adds the unlimitedStorage permission.
2014-11-24 19:25:03 -08:00
lilia
4119c13ba2 Registration ux tweaks 2014-11-10 16:24:00 -08:00
lilia
3eb98ddc3b Fix options page stylesheet path 2014-11-10 12:24:11 -08:00
lilia
18378d8097 Fold nacl-common into components 2014-11-10 01:35:15 -08:00
lilia
e190582d9e Build CryptoJS components into webcrypto.js
We only depend on cryptojs for this webcrypto polyfill, so let Grunt
concatenate them into one file.

The reference in the getString helper isn't needed since we use the
built in string converters on CryptoJS's word arrays.
2014-11-09 21:52:33 -08:00
lilia
b4f4f87a7c Add emscripten-compiled curve25519 module
Build with `grunt compile && grunt concat:curve25519` after installing
emscripten.

Enable by either (a) not loading nativeclient.js or (b) setting
`textsecure.NATIVE_CLIENT = false` before loading nativeclient.js.
2014-11-08 10:56:30 -08:00
lilia
3d27c98845 Remove stray curve25519.js include 2014-11-08 10:46:04 -08:00
lilia
9f676af9bb Refactor crypto.js and native client interface
NB: this diff is best viewed with --ignore-whitespace

Distills crypto.js down to the hard cryptoey bones. It pulls from
webcrypto for aes and hmac, and from native client for curve25519 stuff
or potentially another object implementing the handful of needed
curve25519 functions.

Everything else formerly known as crypto, including session storage and
management, axolotl, etc.. is now protocol.js. The separation is not
quite perfect, but it's a big step.

nativeclient.js now enables talking to the native client module through
a high level interface as well as registering callbacks that will be
executed once the module is loaded. And it has tests!

Finally, this commit removes all references to the "testing_only"
object, preferring to run tests on textsecure.crypto instead.
2014-11-06 04:33:43 -08:00
lilia
f7d92ccb5b Bowerize backbone.localstorage 2014-11-03 17:27:44 -08:00
lilia
6e86a2b7cf Switch libphonenumber to bower 2014-10-31 20:59:30 -07:00
lilia
508c59e05c Rename bower_components
To components. Because tab-completion works better when there aren't two
things starting with bower, and shorter names are nicer to deal with in
general.
2014-10-30 16:53:08 -07:00
lilia
2ec6a66daf Move qrcode lib to bower 2014-10-30 14:14:20 -07:00
lilia
73f4f64351 Grunt preen and concat
Set up grunt with tasks for:
  * preen - deletes unused files from bower_components, configured in
      bower.json
  * concat - concatenates preened bower components, configured
      automagically from the preen config

It's worth noting that this setup assumes the order of files within a
package doesn't matter. This is usually true since we often include only
one file from the package.
2014-10-29 20:50:51 -07:00
lilia
c8ad65efe0 Switch to bower dependencies
Checks in only the files we actually need from bower_components.
2014-10-29 20:50:51 -07:00
lilia
1c76c0b546 Move storage objects to their own files
Greatly reduce the size of the ignominiously named helpers.js.
2014-10-28 22:47:48 -07:00
lilia
1023ea1732 Refactor textsecure.protos -> textsecure.protobuf
DRY up protobuf declarations and move to a slightly briefer naming
convention.

Also dropped some ArrayBuffer -> string conversions as
ProtoBuf.js handles ArrayBuffers just fine, and in fact, more
efficiently than strings.

Finally, dropped the btoa() wrappers, because that incurs an extra
string -> string conversion before the protobuf's internal string ->
array buffer conversion. In lieu of btoa, we can simply pass in the
optional string encoding argument to the protobuf's decode method,
which in these cases should be 'binary'.

Related: #17
2014-10-20 15:11:16 -07:00
lilia
2bd77693e1 Refactor options page and style using bootstrap 2014-10-14 13:59:43 -07:00
lilia
81e4af5827 Move phonenumbery utils to libphonenumber object
Slowly whittling away at helpers.js...
2014-10-13 22:49:39 -07:00
Matt Corallo
a6b0d1f84b Add entirely untested secondary device init 2014-07-26 01:32:05 -04:00
Matt Corallo
28d1f370cd mkdir nacl 2014-07-20 16:29:42 -04:00
Marco
13a9329bcf improved number validation (based on google's libphonenumber) 2014-06-29 16:39:05 -07:00
Matt Corallo
12e6b11962 Fix options 2014-06-03 16:13:59 -04:00
Matt Corallo
d0fd3e94d8 sendMessage refactor, initial group stuff (breaks message storage) 2014-06-03 15:28:30 -04:00
Marco
ce98f87d42 phased out some more inline styles 2014-06-02 00:15:38 +02:00
Marco
5cddcb59aa improved some css for options.html 2014-06-01 22:31:19 +02:00
Matt Corallo
cf35b7056f Retry API, standardize <script> list 2014-06-01 13:39:35 -04:00