Commit graph

66 commits

Author SHA1 Message Date
Scott Nonnenberg 86c866738f Introduce unread message to fixtures, further interactivity fixes
FREEBIE
2017-05-23 11:08:23 -07:00
Scott Nonnenberg 33cdc6ae71 test/index.html: Comments to help in turning off code coverage
FREEBIE
2017-05-23 11:08:23 -07:00
Scott Nonnenberg 0a5960e091 Restore interactivity to InboxViews hosted on test page
FREEBIE
2017-05-23 11:08:23 -07:00
Scott Nonnenberg 423a0fef67 Jumbomoji support matching Android support
FREEBIE
2017-05-10 15:51:39 -07:00
lilia aed5735620 Improve keychange notice reliability/perf
Bind a single listener to keychange events from the storage interface,
which then looks up relevant conversations and adds notices to them,
with tests.

Previously we would need to instantiate a conversation model in order to
start listening to its key change events. In practice this usually
happens at startup but we shouldn't rely on it, and it incurs higher
overhead since it creates a different listener for each conversation.

// FREEBIE
2017-05-09 15:41:41 -07:00
Scott Nonnenberg 731fcb8ecb Add test verifying that AttachmentView shows file size
FREEBIE
2017-05-09 15:14:20 -07:00
lilia 6c7e1aa283 Update tests 2017-04-18 16:27:50 -07:00
lilia d0448ec778 Fix tests
// FREEBIE
2017-04-13 13:15:42 -07:00
Sam Vevang ed4991974b set up a new view for displaying the network status
// FREEBIE
2017-04-08 00:10:56 -07:00
Blake Griffith 1e498294e0 Add attachment_views_test.js tests 2017-02-06 21:23:35 -08:00
Ikarulus 53cd3af78b Added a dark theme
I added a dark theme in order to solve #328.
This may fix #328 at least partially.
2016-12-02 00:41:42 +01:00
lilia 224afdd063 Fix tests 2016-10-07 19:39:50 +09:00
2-4601 669338c717 i18n 'Theme'
// FREEBIE
2016-10-07 19:27:05 +09:00
lilia b0c59233f3 Add test fixtures
Test page loads fixtures and renders the inbox view. This may be useful
for smoke testing style changes or generating screenshots with
pseudo-realistic data.

Includes a couple small changes to get rendering working outside the
app.
2016-09-23 19:51:42 -07:00
lilia 7e0df07e88 Fix tests
// FREEBIE
2016-09-01 13:47:50 -07:00
lilia b1d370755a Rename AxolotlStore
// FREEBIE
2016-04-21 18:36:17 -07:00
lilia 9aa429e18a Add frontend support for expiring releases
When a release expires, it gets a persistent banner notification to
upgrade, and an ephemeral toast warning when trying to send a message.

// FREEBIE
2016-04-03 21:11:50 -07:00
lilia 37fb2580bc Fix tests
// FREEBIE
2016-03-09 16:17:17 -08:00
Lorenz Hübschle-Schneider e876d8f6ed Display relative timestamps in conversation list
This mimicks Signal-Android's relative timestamps.
Previously, only the date was displayed.

Fixes #284
2016-01-26 10:54:40 -08:00
lilia a258f1a66b Refactor number parsing and validation
Refactor libphonenumber.validateNumber into libphonenumber.parseNumber,
which encapsulates the try-catch pattern used in number parsing and
returns an object of info about the input number rather tha throwing
since we expect to get some invalid number inputs the user is typing.

In the conversation model,
  * Separate phone number validation from search token updating.
  * Perform token update before save if the number was valid.
  * Stop storing unneeded number variants as conversation properties.

// FREEBIE
2015-12-09 18:58:51 -08:00
lilia 3d98b54027 Create contact from number with common punctuation
The 'Create new contact' option should now appear for numbers including
parens and other common punctuation.

// FREEBIE
2015-12-09 18:58:51 -08:00
lilia 038e263023 Fix the build
1. Update chrome version because v40 fails to clear the session store
2. Add message view to test page and fix bad reference to chrome
3. Update the message view template in tests with new timestmap markup

// FREEBIE
2015-11-08 10:35:24 -08:00
lilia 87ce3241c8 Remove script-tag for nonexistant test
// FREEBIE
2015-09-17 15:25:13 -07:00
lilia 78d7296f84 Fix tests
// FREEBIE
2015-09-17 11:40:42 -07:00
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
2015-09-07 14:58:42 -07:00
lilia 029c9754f0 Fix tests 2015-05-15 11:39:23 -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 5a46300581 Reorder database.js include in test 2015-04-15 18:11:06 -07: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 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
lilia 4cefd17ac6 Remove unused view 2015-03-03 10:55:04 -08:00
lilia e96aa2f06e Remove obsolete script tags
For the recently deleted notifications.js
2015-02-23 11:57:57 -08:00
lilia 711e211e20 Remove bootstrap tagsinput 2015-02-12 13:21:16 -08:00
lilia 55802f2087 Remove obsolete note on test page
Actually this page totally works from file:// now.
2015-02-11 17:37:59 -08: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 899d756469 Split tests between libtextsecure and main 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
lilia 3d6c251fd1 Group avatars 2015-01-11 01:27:22 -10:00
lilia d52db8fe6f Render group updates
Not pretty, but it works. Also allows for later localization.
Copy/behavior is borrowed from the Android client.

Closes #104
Fixes #65
2015-01-10 08:08:20 -10:00
Matt Corallo 2c781e5b62 s/\t/ /g in test/index.html 2015-01-06 14:46:33 -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 470346c9c4 Save incoming messages and pass to frontend asynchronously
After a message is saved asynchronsly, fire an event and pass the
message attributes to frontend listeners via the chrome-runtime API.

This behavior is similar to the 'storage' event fired by localStorage.
2014-11-24 19:25:03 -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 94634fc77a Remove nativeclient from test page
Native client won't work on Sauce. Removing for now. TODO: find a
way to gracefully disable native client in the Sauce environment.
2014-11-24 19:04:19 -08:00
lilia 28290477f4 Nicer timestamps with momentjs
This dependency may be a little heavy for our current use case, but we can
roll with it for now and find something slimmer if it turns out yagni.

Closes #77
Closes #40
2014-11-12 11:45:58 -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