Commit Graph

463 Commits (e91f6469209da899755c2103c90f791d8fdcce60)

Author SHA1 Message Date
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 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 c77391b3f2 Sinewave animation for pending requests
Tryin it on for size.

// 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 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 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 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 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
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
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 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 b1c933ccd4 Don't show myself in the message detail contacts list
// FREEBIE
10 years ago
lilia 87d4f0d5d8 Fix non-disappearing resend button
The resend button should disappear once you've clicked it. This was not
happening because the message detail view held a cached copy of the old
message errors. Fix by re-reading the errors when we re-render.

// 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 b42626923c Don't double-render key conflict errors
// FREEBIE
10 years ago
lilia 4cc7a30107 Remove error class when no more message errors
// 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 e1c9e28b4c Add comment
// FREEBIE
10 years ago
lilia a802322d44 Display a default message for incoming message errors
An exception to the previous commit, for incoming messages we should not
show a mysterious empty bubble. Instead there is some generic
non-technical error message.

// 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 0f8aff12c5 Refactor contact rendering in message detail view
DRY

// FREEBIE
10 years ago
lilia 9ff95c7e61 DRY up group update sending
// FREEBIE
10 years ago
lilia 4a482243d0 Simplify event arguments
// 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 93a5d01127 Delete old code
We don't have any more 'default' css classes. Default avatar data is
simply provided by a model for rendering in a view.

// FREEBIE
10 years ago
lilia fd29ac8d2c Promote groups to top of inbox when we update them
// FREEBIE
10 years ago
lilia 73983118dc Render emoji in conversation title // Fixes #359
// FREEBIE
10 years ago
lilia 36ec4300cf Fix broken group avatar preview
Fixes #355

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

// FREEBIE
10 years ago
lilia 9809894fd2 Automatically mark the open conversation read
If a conversation view is visible, it will automatically mark the
conversation read.

// FREEBIE
10 years ago
lilia fa0e2584f4 Fix new threads not appearing at top of inbox
When messages from someone not in your inbox arrived, that thread would
appear at the bottom of the inbox instead of the top.

// FREEBIE
10 years ago
lilia 15d84199c2 Include ourselves in member list for a new group
Otherwise, the next incoming group update will show "<your number>
joined the group".

// FREEBIE
10 years ago
lilia 4b0c70fb44 Resolve multiple conflicts independently
When resolving multiple conflicts in a conversation, failure to resolve
one should not block any others.

// FREEBIE
10 years ago
lilia a390e37abc Fixup change:active_at handling when setting null
When a conversation goes from active to not active, it should be removed
the view rather than promoted.

// FREEBIE
10 years ago
lilia b81d93177a Fix double selected states
Previously, when changing selection from an unread to a read
conversation, the unread conversation would not be deselected.

// FREEBIE
10 years ago
lilia d89e3ccdc4 Don't fetch messages from the background
Only fetch them from a frontend view. If the conversation is not open,
we don't need to load the messages, and if we do load them, they will
render before we've done the initial contact info loading (as
implemented in 74e96ce).

Fixes #344

// FREEBIE
10 years ago
lilia bd5f43bdb1 Avoid excessive re-rendering of the inbox list
This listener is doing way more work than necessary to update the dom by
removing all the list items and re-creating them. This also causes the
bug where selected state is cleared when new messages arrive, not to
mention binding new event listeners without unbinding the old ones.

Fix by simply promoting an element to the top of the list when it's
active_at value changes, rather than re-rendering the whole list. This
could backfire if the value gets changed to an earlier timestamp but for
now we assume that won't happen.

// 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 1a30d003f5 Fetch group contacts before fetching new messages
Messages must wait for sender info to arrive before rendering.

// 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 756875f235 Refactor inbox collection listeners
Create a new collection type for the inbox which listens to events on
the main conversation cache. Also don't reload conversation info from
the database as often or when unnecessary.

Fixes #345

// 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 e402338af7 Make it easier to reference templates
Whisper.Views can now use templateName to reference the id of the
desired template.
10 years ago
lilia 239b87a1fa Fix conversation resize bug
Fix behavior where resizing a message detail screen would result in a
mis-sized conversation view when exiting the message detail.
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 5d9965a60e Make all mustache templates available as partials
// FREEBIE
10 years ago
lilia 43aaf541c1 Compose flow style tweaks 10 years ago
lilia cc92cdfa29 After destroying messages, remove the conversation view 10 years ago
lilia 50939d1851 Restyle conversation menu button 10 years ago
lilia 9e79ecddf8 Fix scroll stickiness while hidden
Fix bug: Open thread A, open thread B, receive message in thread A, open
thread A. Scroll bar has reset to the top.
10 years ago
lilia 21aaf0fab5 Clean up notification and unread indicator behavior 10 years ago
lilia e0f84d9c8e Clear unread on focus iff convo is open 10 years ago
lilia baa55c9018 Refactor for less model duplication 10 years ago
lilia c4eac76032 Fix for new contact button bug 10 years ago
lilia a5a1dad03c Redelegate events for new contact view
And rename for consistency

// FREEBIE
10 years ago
lilia 17051cef9d Only add loading class from inbox 10 years ago
lilia fbc73c0369 Add spinner for long-loading message lists 10 years ago
lilia 992dfa5b20 Bug fixes for group create flow
Fallout from layout change.

// FREEBIE
10 years ago
lilia d07357ce9a Retool various sub-screens to fit two-column layout 10 years ago
lilia bcec207674 Mark read when opening a conversation 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 00dfcbb462 Change websocket closed message 10 years ago
lilia 82431c3c12 Update compose typeahead after fetching
Fixes #322

// FREEBIE
10 years ago
lilia 001a91466b Add group member list // Closes #279 10 years ago
lilia ccfae3c78a Fix bug in identity key conflict edge case
When resolving conflicts, we should not only discard the old key, but
set the new trusted key to the one the user has verified. Previously, we
would end up trusting the first-seen new key, which may not be the one
the user verified.

 // FREEBIE
10 years ago
adambar d93bacb76e Fix for too eager scrolling to bottom when the scroll isn't actually stick to the bottom before resizing the window 10 years ago
adambar 1498d90b58 Maintain bottom-most scroll position when resizing conversation area, once again.
Related with #278. Redone to include keeping scroll at the bottom when resizing the window, as suggested in #305, and to better fit the current code structure.
10 years ago
lilia 0815a96c1d Display the new key for verification after a conflict 10 years ago
lilia f6b5eec84e Let key verification view use array buffers 10 years ago
lilia 853b578551 Change default value for active_at
We're overriding the default with null often enough that we should
just change the default.

Consequently, no more phantom blank conversations with oneself should
appear after receiving a group update. They were being added to the
inbox because they were incorrectly initialized with an active_at value.

Fixes #281
10 years ago
lilia 809c9bdb57 Save outgoing group updates 10 years ago
lilia 82de8148d2 Reload harder
Refreshing the background page does re-open the socket, but the inbox
and other windows don't reattach correctly. Reload the whole runtime to
force close all windows, reload the background, and re open the inbox.
10 years ago
lilia 56341769bd Mark group creation messages as sent 10 years ago
lilia 3e4c571749 Fix initial input focus in compose view
This selector was being run too early, before the target was rendered.
10 years ago
adambar 476eb54db1 Maintain bottom-most scroll position when resizing conversation area.
Closes #278
10 years ago
lilia 1a82a12a30 Use input instead of keyup/change events
In lieu of a click event, the change event was being fired when clicking
out of the search input. The input event seems to be what we actually want.

Fixes #273
10 years ago
lilia fa4022a4e3 Invert pending/sent model 10 years ago
lilia 6a98fc8278 Reload contacts when resetting a recipients input
Fixes #272

// 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 fcc873ffca Trim the message before sending - disable sending whitespace characters only 10 years ago
adambar c20c59add0 Include Ctrl+Enter as one the shortcuts that insert line break instead of submitting the message 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 5e6145aa46 Mark conversation read on window focus event
Fixes #282

// FREEBIE
10 years ago
lilia 5925c2fe84 Support for group sync
Protocol and handling is all analogous to contact sync: Multiple
GroupDetails structs are packed into a single attachment blob and parsed
on our end. We don't display the synced groups in the conversation list
until a new message is sent to one of them.

// FREEBIE
10 years ago
lilia ef8a977f38 Sort contacts by name ignoring case 10 years ago
lilia 7d568b5092 Fixup auto-expand
* Fix a css bug preventing bottom bar from sticking to the bottom.
* Resize discussion container as a function of the overall window
  height. The previous difference-based method gives the wrong result
  when the window height changes but the bottom-bar height stays the
  same.

// FREEBIE
10 years ago
adambar b80706089c Fix for potential memory leaks 10 years ago
adambar 9c563cf080 Fix for message box auto-sizing behavior on resize; menu z-index fix 10 years ago
adambar da1abd75bf Remove message textarea resize handle; fix resizing after submit 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 757bcd4e50 Reset recipient typeahead after selecting a recipient 10 years ago
lilia e9e875766f Group update recipient typeahead excludes exisiting members
Fixes #199

// FREEBIE
10 years ago
lilia 694f801676 Stop hiding inbox instead of closing
This behavior was intended to help keep the websocket alive, but keeping
the inbox window around can cause some stale frontend state. Also we now
have a keepalive alarm to check for new messages once a minute.
10 years ago
lilia 72f16b94ff Polish group update ux
* Show the members list as static elements
* Style the search results as a drop down, mirroring android ux

Fixes #248 // FREEBIE
10 years ago
lilia 23db5802cf Support custom placeholder on recipients input 10 years ago
lilia ac401c78b3 Fix socket status indicator
It was not correctly reporting the status after a background page reload.
10 years ago
lilia 6e1a41e9cf Update inbox when group avatars change 10 years ago
lilia 583fb98cce Support late-addition of default image to file input
Fixes #256

// FREEBIE
10 years ago
lilia f4a206b266 Scale and crop avatars to 256 square thumbnails.
Fixes #213 // FREEBIE
10 years ago
lilia cdb7fcfbad Pass windows around to let file inputs work 10 years ago
lilia 3d1df790a5 Update the window title when a group title or contact name changes 10 years ago
lilia d26c13b155 Add openInbox link to conversation menu. Fixes #246 10 years ago
lilia 9d688cb761 List views persist sroll offset by percentage
Fixes #188
10 years ago
lilia 590deef063 Decrease auto-scaling size
For better consistency with Android, autoscale images such that the
largest dimension is 1280. Related: #242
10 years ago
lilia 3e73282a64 Fix key verification screen 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 8a17953468 Display sent_at timestamps instead of received_at 10 years ago
lilia 3e39271220 Render messages light blue until finished sending // Fixes #219 10 years ago
lilia 53a9ab4834 Fix bugs with handling large image attachments
* Avoid infinite loop scaling too-big images
* Don't crash if no file is selected
* Fix file size toast

Fixes #242

// FREEBIE
10 years ago
lilia d8f17f9631 Fixes #240
Delete files attached via chrome.fileSystem

// FREEBIE
10 years ago
lilia 7bf1d41184 Render conversation titles 10 years ago
lilia d0a529351c Fix sending messages with no attachments 10 years ago
lilia a5e80e8a5a Really close conversation windows
Only the inbox should hide when closed.
10 years ago
lilia 5d3a2a4cc8 Fix file inputs
As a chrome app we are obligated to use the fileSystem api, and must do
so via the window in which we want to open the dialog.
10 years ago
lilia 39d11d8eb3 Apply custom chrome to conversation windows 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 7afd0a02e8 Convert beforeunload listeners 10 years ago
lilia 76e170686a Make getBackground async 10 years ago
lilia f774047935 Make libtextsecure group storage asynchronous 10 years ago
lilia 20ebc3f890 Move identity key storage functions to axolotl store 10 years ago
lilia 71715c95bc Async remove identity 10 years ago
lilia de65f9e6bd Add missing resolve 10 years ago
lilia 5d4298697c Use view.$ shorthand for scoped jquery searches
Wish I'd noticed that one earlier. http://backbonejs.org/#View-dollar
10 years ago
Matt Corallo 454b4726bd Replace load/decode/index around our own number with helpers 10 years ago
lilia 923bb8bbc9 Fix crash in message detail view
Fix crash when there's no contact for a group member.
10 years ago
lilia e8cb4efaa4 Allow key conflict resolution for group updates
Creating a group with a member who's identity key has changed would
previously fail silently. Now, we catch and save the error, allowing the
same conflict resolution process as with regular messages.

Fixes #205
10 years ago
lilia 4bd46f80e7 Allow empty group avatar file input 10 years ago
lilia ce36c36bd0 Include outgoing control messages in message history
So you know it worked.
10 years ago
lilia 6c3ac2de02 Collapse two views into one
We used to have a subview that branched on content/control messages, but
no more.
10 years ago
lilia caddb8dc09 Smoother group create experience
Previously there was a long pause between confirming the group details
and opening the conversation. Fix by first saving/opening the
conversation, rather than waiting for the initial group update to finish
transmitting.
10 years ago
lilia 74e01c2a95 Re-render control messages if necessary 10 years ago
lilia 48b0e8832d Fix message detail contacts for incoming group message
Previously the From-field displayed all the group contacts.
10 years ago
lilia bd82591b6c Remove extraneous listener 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 c526dbda5f Set up production build task
`grunt copy`

Closes #191
10 years ago
lilia 43ec4099c9 Reset the name field on new group form 10 years ago
lilia 9930937707 Move handlePushMessageContent to message model
And retool message handling flow to helps us avoid instantiating
duplicate message and conversation models.
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