Commit Graph

273 Commits (e36aa524c9b473a8f2e7cbff229254f565e6eca9)

Author SHA1 Message Date
lilia 6fe9c3f964 Nest key verification inside conflict dialogs
// FREEBIE
9 years ago
lilia 3901bcb8df Style resend button as an inline link
For messages that failed to send due to network errors, this change
allows retrying them directly from the main conversation view rather
than only from the message detail view.

// FREEBIE
9 years ago
lilia 2e7c7ce0cc Move back button to the left
// FREEBIE
9 years ago
lilia d24eaa655a Tweak styles on key verification view
// FREEBIE
9 years ago
lilia d3b035121d Clean up bottom bar styles
// FREEBIE
9 years ago
lilia 234f937bc7 Conversation subscreens share a header
// FREEBIE
9 years ago
lilia 4358bdfac7 Use url xor color on avatar, never both
Combining them often leaves a crufty colored ring on the outer edge of
the avatar image.

// FREEBIE
9 years ago
lilia 8bb8ed8151 Change left pane header color
// FREEBIE
9 years ago
lilia 7310afd1b4 Replace message list loading spinner with bar
// FREEBIE
9 years ago
lilia 647c2761e0 Move restart button into global menu
// FREEBIE
9 years ago
lilia c16356084d Align header buttons and touch up styles
// FREEBIE
9 years ago
lilia 18a5ce8e54 Restyle conversation panel
// FREEBIE
9 years ago
lilia 043a3f9609 New layout
Move the global header inside the left pane only, expand conversation
panels to full bleed, restyle conversation list items and selected state.

// FREEBIE
9 years ago
lilia 1b72ef6170 Restore notifications heading
// FREEBIE
9 years ago
Blake Griffith 0ceb8e7038 i18n notification's settings dialog
FREEBIE
9 years ago
Blake Griffith 24e4d9c615 'off' -> 'disable notifications' in settings
FREEBIE
9 years ago
Sam Lanning 662020ce68 Add title text for emoji in messages.
Fixes #250

// FREEBIE
9 years ago
lilia a962d97bfb Fix debug log submission loading UX
This flow broke a bit with transition to modal debug log.

Restructure such that the loading class can be applied to an appropriate
element inside the modal. Ensure that the input elements are hidden when
submit is clicked, the result elements are shown when the log upload is
completed.

// FREEBIE
9 years ago
lilia 7f8c76faca Make debug log as big as possible
Tweak style to make the modal reasonably wide/tall, and use flexbox
to automatically expand the textarea.

// FREEBIE
9 years ago
lilia 34d50f94a9 Make window unscrollable // Fixes #692
// FREEBIE
9 years ago
lilia 636c0f2a60 Put debug log in a modal
Also dedupe close-button style

// FREEBIE
9 years ago
lilia 33fde3d4e7 Dedupe modal styles
// FREEBIE
9 years ago
lilia a3c6061480 Add Notification Settings
Fixes #471

// FREEBIE
9 years ago
lilia 4ab2e25df6 Refactor Contact and Conflict views
Untangle these two views into their component parts, consolidating all
the key conflict logic in the key conflict view. Contact view now simply
renders basic contact info and miscellaneous errors but not conflicts or
message errors.

// FREEBIE
9 years ago
lilia f221921127 Tweak conflict style
// FREEBIE
9 years ago
lilia 28c763992a Move error indicators on message bubbles
// FREEBIE
9 years ago
lilia 5340791868 Display key conflict dialog inline
One less modal.

// FREEBIE
9 years ago
lilia ad66da9fb5 Move identity conflicts to top of message detail
Also restyle them as with network errors

// FREEBIE
9 years ago
lilia b5058e3981 Make network errors & resend button more prominent
// FREEBIE
9 years ago
lilia 59ac5cb9b1 Remove unused view
// FREEBIE
9 years ago
lilia 87ddcef333 Make debug log persistent
Save log entries in indexedDB rather than just in memory. Reload them
whenever the background page is refreshed.

// FREEBIE
9 years ago
lilia b59539f23e Remove unused template
// FREEBIE
9 years ago
lilia 5e0709f044 Add tooltip to reload button
Closes #462

// FREEBIE
9 years ago
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
9 years ago
Sam Lanning c4a9ac94b4 Improve Confirmation Dialog
Some basic modifications to the Confirmation Dialog:
* Always attached to <body> regardless of view that called it.
* Always centered horizontally on screen.
* A black semi-transparent overlay is now displayed over everything, and under
  the dialog.
* Various other style changes.

fixes #389

// FREEBIE
9 years ago
lilia 05681ce35b Don't render placeholder markup unless necessary
Rather than always rendering divs for the key and placeholder, render
the placeholder only if the key is missing.

// FREEBIE
9 years ago
jakob 6c7f2cf0fc Show help text for unknown contact identity
Adds a new message string "theirIdentityUnknown".

Fixes #576

// FREEBIE
9 years ago
2-4601 ea0e013e81 Add a trifle of i18n to KeyVerificationView
Two strings were left behind:
- "Their identity (they read)"
- "Your identity (you read)"

I saved them.

// FREEBIE
9 years ago
lilia 6e97f5ad00 Fix key conflict dialog i18n
Allow html in this i18n message. TODO: re-design this dialog.

Fixes #584

// FREEBIE
9 years ago
lilia ceaf94e05b Rename variable for consistency
// FREEBIE
9 years ago
lilia c6956f81d0 i18n DebugLogView
// FREEBIE
9 years ago
lilia 1d6e391dd6 Prefer single quotes
// FREEBIE
9 years ago
lilia 0e2d2d60c2 i18n KeyConflictDialogue
// FREEBIE
9 years ago
lilia 3172c49436 i18n ContactView
Part of the MessageDetailView

// FREEBIE
9 years ago
lilia d502f1bdee i18n KeyConflictView
Also refactor generic error view to make this simpler.

// FREEBIE
9 years ago
lilia 42f15011fa i18n FileSizeToast
// FREEBIE
9 years ago
lilia 836a7cb8c5 i18n InboxView
// FREEBIE
9 years ago
lilia 85eb5c4d59 i18n KeyVerificationView
// FREEBIE
9 years ago
lilia 95e47dace1 i18n GroupMemberListView
// FREEBIE
9 years ago
lilia 73ea415e95 i18n ConfirmationDialogView
// FREEBIE
9 years ago
lilia ea9fa00658 i18n MessageDetailView
// FREEBIE
9 years ago
lilia 02cc6623ea i18n ConversationView
// FREEBIE
9 years ago
David Baldwynn 8251db6ae6 Added error message for unsupported attachment type (issue #419) 9 years ago
lilia 04359c9184 Remove received_at from message detail on outgoing messages
Only show sent_at for outgoing messages, matching Android.

The received_at timestamp reflects the time a message was saved locally.
It is necessary on both incoming and outgoing messages for sorting
purposes, but can be confusing in the context of an outgoing message
detail view, since users don't think about themselves "receiving" their
own messages, and may even interpret this as the time that a message was
received by their conversation partner's device.

// FREEBIE
9 years ago
lilia 61a57a753b Provide user feedback when number is invalid
While typing a number, the new contact element is faded out. When the
number becomes valid it is opaque. If the element is clicked while
invalid, it displays 'Invalid number' and waits for the input to change
again. A new conversation is only opened if the number is valid.

// FREEBIE
9 years ago
mad-de 2cde35e212 Change input type of search field to "search"
This generates a simple clear element when typing. Cloeses https://github.com/WhisperSystems/Signal-Desktop/issues/420
9 years ago
lilia 68f2505996 Display phone number in conversation header
Fixes #436

// FREEBIE
9 years ago
lilia 8d214b73d9 Render conversation placeholder hint in place
// FREEBIE
9 years ago
lilia 891a5e54ad Add hint for users with no groups or contacts
If you have no contacts or groups, display a hint about phone numbers.

// FREEBIE
9 years ago
lilia 7bf94c33d5 Show all contacts when inbox is empty 9 years ago
lilia 152f59cc95 Restyle first run hint
// FREEBIE
9 years ago
lilia d4e0c11ebc Show a hint on startup if the inbox is empty
Fixes #403

// FREEBIE
9 years ago
lilia 798d1a4212 Remove missing js include
// FREEBIE
10 years ago
lilia 43ca92948b Change search box placeholder
Hopefully this makes it more obvious what to do immediately post-install.

// FREEBIE
10 years ago
lilia 16dc7abe69 Display unreadCount badges in conversation list
// FREEBIE
10 years ago
lilia f860278b89 Add avatars to conversation headers
So as not to look repetitive, hide the per-message avatars in one-on-one
conversations.

// FREEBIE
10 years ago
lilia 2ce890b845 Update message bubble timestamps as needed
Display format consistent with Android:

* relative time for everything from today
* Day of week + time for within the past 7 days
* Static Month Day time for everything older

Each timestamp will only update as often as needed to stay accurate,
which is once a minute, once an hour, once a week, or never.

// FREEBIE
10 years ago
lilia 6c98fc19b4 Remove send button
// 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
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 c77391b3f2 Sinewave animation for pending requests
Tryin it on for size.

// FREEBIE
10 years ago
lilia c9e01390a7 Use check/double check for sent/delivered
// FREEBIE
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
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 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
lilia 389b9a026d Initial restyle
Added background gradient and restyled conversation elements as floating
panels and cards.

// FREEBIE
10 years ago
lilia 2f8d973366 Restore native window chrome
// FREEBIE
10 years ago
lilia d864819364 Hide buttons for group creation, update, and leave
// FREEBIE
10 years ago
lilia f70c22f898 Add search field to inbox
Using the search field produces a filtered view of all contacts and
groups containing the input. To make this fast and scalable, add an
index on a 'tokens' array containing words from the conversation name
and different forms of phone number.

Closes #365

// FREEBIE
10 years ago
lilia a93b8cea72 Collapse multiple retry buttons
If you're going to retry one, you might as well retry everyone.

// FREEBIE
10 years ago
lilia a32f3ff1f6 More work on replayable errors
Expose a button that does that retries outgoing messages if possible.

// FREEBIE
10 years ago
lilia bbb5b24d6b Fix disappearing conversation bug
Opening two message-detail views in two separate conversations would
disappear one of the conversations. Fixed by better encapsulating the
sub-views of a conversation.

// FREEBIE
10 years ago
lilia 929c16090b Move error messages to message detail view
Change how message errors are rendered. Errors associated with a number
will be shown under that number in the detail view rather than piling up
in the message bubble.

// FREEBIE
10 years ago
lilia 960754ef04 Restyle compose button
Move it to a tool bar at the top of the conversation list. This is also
where a search bar will live someday.

Fixes #357

// FREEBIE
10 years ago
lilia 0017f196ef Move ConversationController to its own file
Encapsulate the global conversation cache collection against accidental
access, avoiding the data-clobbering bug fixed in previous commit.

Also move some one-off program initialization code from panel controller
to background.js

// FREEBIE
10 years ago
lilia 90e9216e19 Add UI for submitting debug logs
Fixes #343

// FREEBIE
10 years ago
lilia f74a7b9621 Add code for submitting debug logs
We keep the last 1000 log messages in memory and dump them to an
anonymous public gist if console.post is called.

// FREEBIE
10 years ago
lilia e80fa187ba Upsize svg identicons
The chrome.notifications api renders iconUrls at full bleed, as opposed
to the Web Notifications api, which adds padding. This was causing our
identicons to look a bit over stretched.

Fixed by rendering them a bit larger and with some padding.

// FREEBIE
10 years ago
lilia 0ebdf08ceb Render identicons in notifications
Render an svg, then canvas, then data url.

Fixes #325

// FREEBIE
10 years ago
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
10 years ago
lilia 1427369bd0 Fix suggestion list template
Convention collision.

// FREEBIE
10 years ago
lilia 24a18e91b3 Clean up shared compose/group update ui
Makes the groupupdate and recipient input fields stick to the top,
restyles the typeahead as a floating dropdown list of suggestions
rather than a full width component, fixes group avatar thumbnail
rendering.

// FREEBIE
10 years ago
lilia 7d9490e503 Add contact list view
Used by member list view. Refactored some templates for shared markup.
Fixes strange behavior where members in the list were hoverable and
selectable.

// FREEBIE
10 years ago
lilia cee2d4cc6b Tweak recipient input style
// FREEBIE
10 years ago
lilia 50939d1851 Restyle conversation menu button 10 years ago
lilia baa55c9018 Refactor for less model duplication 10 years ago
lilia d07357ce9a Retool various sub-screens to fit two-column layout 10 years ago
lilia c780713a26 Fix up socket status display 10 years ago
lilia 877b34579a Fix heade text style 10 years ago
lilia d6a4e6e496 Restore two column layout
Establishes basic functionality for viewing conversations in two column
mode, including message area and message list resizing, and maintaining
scroll position.

Various subviews need to be retooled but are more or less still
functional, i.e., new message, message detail, key verification, etc...
10 years ago
lilia 001a91466b Add group member list // Closes #279 10 years ago
lilia 8745424d3a Fix outgoing identity key conflict handling
// FREEBIE
10 years ago
lilia f5f4c128f9 Fix tests, let templating handle html escaping
Note: as a Chrome app, we're also protected from xss by the content
security policy.

// FREEBIE
10 years ago
adambar 86f7b7adf5 Allow line breaks in messages. Closes issue #291
Line breaks can now be insterted into message box using Shift+Enter or Alt+Enter. Messages with new lines are properly displayed in the conversation view (but only there, to keep inbox clean). The template was modified to allow HTML, but the message itself is sanitized before new line handling is run.
10 years ago
lilia 6aa36a98aa Place message body after attachments
Fixes #287
10 years ago
lilia feb5e5b068 Display gray # instead of colored + for no-name contacts
For consistency with android.
10 years ago
adambar 07ac0ae9cc 239 Auto-expand message area when typing 10 years ago
lilia e26b9bfbc7 Default avatar support
Fixes #264

Implement the equivalent of java's String.hashCode on the conversation model.
Change avatar template and attributes. Use css classes for colors.
10 years ago
lilia 23db5802cf Support custom placeholder on recipients input 10 years ago
lilia d26c13b155 Add openInbox link to conversation menu. Fixes #246 10 years ago
lilia e2eff893d4 Fix 'Delete messages'
Replaces window.confirm with generic promise-based confirmation dialog
functionality available to all views.

// FREEBIE
10 years ago
lilia 405e67c758 Merge inbox and panel controllers
These collections should always be operating with the same model
instances, so let the inbox reset it self from the same in-memory
cache of conversation models used by the conversation windows.
10 years ago
lilia 7bf1d41184 Render conversation titles 10 years ago
lilia 95f8e3921c Keep inbox window open, but allow it to be hidden
As a chrome packaged app, we have to keep at least one window open in
order to maintain our websocket connection in the background page.

This change replaces the system window frame with custom buttons in the
inbox header, such that the 'close' button merely hides the window
rather than unloading it.

Fixes #237
FREEBIE
10 years ago
lilia 3f37cd21a9 Remove remaining traces of localStorage
Add window.storage to the background page, which loads all data from the
'items' store in indexeddb, caching them in memory for synchronous
access, then override textsecure storage to use that in memory store.
10 years ago
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
10 years ago
lilia 5888039123 Reorder database.js include
Prep to use indexedDB for axolotl storage.
10 years ago
lilia a7079206f4 Nicer looking end-session and group control messages 10 years ago
lilia 20baa795ad Fixes #198 Squished avatars
Refactor all avatar views to use a shared partial, then change it to a
background image. Requires allowing unsafe-inline styles in the CSP.
10 years ago
lilia 5ffa265559 Revert "Popout inbox"
This reverts commit 31e7d285e3.

This seemed like a nice feature, but the popup bubble isn't very
conducive to nontrivial user inputs, e.g. file inputs.

Fixes #211
10 years ago
lilia 897d391817 Improve identity key conflict ux
Clicking on a key conflict message opens the message detail view,
which displays the contact(s) in this conversation. If the message
contains a key conflict with any of these contacts, a button is
displayed which attempts to resolve that conflict and any other
conflicts in the conversation that are related to that contact.
10 years ago
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.
10 years ago
lilia cecb438a52 Simplify avatar rendering 10 years ago
lilia fa3699cdd3 Trigger desktop notifications
Notifications show the conversation name, avatar, and new message text.
Clicking the notification opens the conversation.
10 years ago
lilia 08ccdf8d97 Move most scripts to the background page
Dramatically improve load times for frontend pages.

Closes #133
10 years ago
lilia 3279dddcc3 Consolidate window logic in panel controller
Previously the conversation window would query the background page
for a model id and then fetch the conversation. Instead, we can fetch
the conversation before opening the window, which simplifies the front
end scripts and avoids creating multiple copies of the same model.
10 years ago
lilia 44b1e5c88e Move inbox collection to the background page
No more waiting, no more messy fetch logic. Background page
bootstraps the inbox and keeps it up to date.
10 years ago
Riley Shaw 94ce4d4b91 Simplify panel state management and message passing 10 years ago
Riley Shaw 783a3f7c15 Prevent duplicate conversations and refocus on click (still buggy) 10 years ago
Matt Corallo e7f3e52b6c Remove NaCL! 10 years ago
Matt Corallo 5785f4033c Compile curve25519/webcrypto into libtextsecure.js 10 years ago
Matt Corallo 8ad1a38b5b Move js files around for libtextsecure split 10 years ago
Matt Corallo d9db0f53e7 s/\t/ /g in {background,options}.html 10 years ago
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.
10 years ago
lilia 7b23e24b71 Add stringview license info and script tags
Closes #94
10 years ago
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.
11 years ago
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.
11 years ago
lilia 18378d8097 Fold nacl-common into components 11 years ago
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.
11 years ago
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.
11 years ago
lilia 3d27c98845 Remove stray curve25519.js include 11 years ago
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.
11 years ago
lilia f7d92ccb5b Bowerize backbone.localstorage 11 years ago
lilia 6e86a2b7cf Switch libphonenumber to bower 11 years ago
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.
11 years ago
lilia c8ad65efe0 Switch to bower dependencies
Checks in only the files we actually need from bower_components.
11 years ago
lilia 1c76c0b546 Move storage objects to their own files
Greatly reduce the size of the ignominiously named helpers.js.
11 years ago