Commit Graph

176 Commits (068cf5092ce3ef40f3d2c0cbea64445ba5d6774e)

Author SHA1 Message Date
lilia 645e05c2b9 Add support for new fingerprint format
This will be ready to roll whenever Android/iOS is.

// FREEBIE
9 years ago
lilia 4f46a164ba Add voice notes
// FREEBIE
9 years ago
2-4601 d861797d66 i18n 'Permanently delete this conversation?'
// FREEBIE
9 years ago
lilia 1d60dc38fb Rename axolotl storage
// FREEBIE
9 years ago
lilia 1fe5d63015 Update protocol libs
Rename storage functions

// FREEBIE
9 years ago
lilia 21bfb61b7a Maintain scroll position when textarea resizes
Fixes #770

// FREEBIE
9 years ago
lilia 2506b2115d Log when fetching messages
// FREEBIE
9 years ago
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
9 years ago
lilia 5a9358efc9 Reorder object members
Group click events together, put custom events at the bottom.

// FREEBIE
9 years ago
lilia 6fe9c3f964 Nest key verification inside conflict dialogs
// FREEBIE
9 years ago
lilia 08da29969c Fix menu behavior
Opening the global menu should close the conversation menu and vice
versa.

// 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 b094607e0d Highlight bottom bar when focused
// FREEBIE
9 years ago
lilia 7310afd1b4 Replace message list loading spinner with bar
// FREEBIE
9 years ago
lilia 18a5ce8e54 Restyle conversation panel
// FREEBIE
9 years ago
lilia 173e037fa6 Fix minor style errors
And keep it that way, by making jscs config more opinionated.

// FREEBIE
9 years ago
Sam Lanning 0569d4c889 Replace conversation panel js resizing with flex styling.
// FREEBIE
9 years ago
lilia cdd139b44c Refresh group contacts when rendering member list
Fix #581

// FREEBIE
9 years ago
lilia 02cc6623ea i18n ConversationView
// FREEBIE
9 years ago
lilia 68f2505996 Display phone number in conversation header
Fixes #436

// FREEBIE
10 years ago
OdysseasKr 83298b8979 Mark conversation as read if open and window focused
Messages that are received in the active conversation while the window
is focused, are automatically marked as read.

The conversation appears as unread for a split second as the incoming message
arrives but it gets marked as read as soon as the message is displayed.
10 years ago
ody 156c7c3b3d Add unread count in window title
The window title now shows the global number of unread messages as
"Signal (1)". This way the user can see the number of unread messages
in the task bar and when alt-tabbing.

Resolves: #384
10 years ago
lilia 765668b3d3 Clear message collections when the window is closed
We don't need to keep them in memory if we're done viewing them,
plus it avoids having to re-render a large collection when we re-open a
conversation. Now that we only load a sensible number of messages at a
time, caching them between usages is less valuable. Removing them from
the collection should free them for garbage collection.

// FREEBIE
10 years ago
lilia 2ee8cae8d4 Move some initial setup to the 'opened' event
Avoid inbox views digging too deep into conversation views.

// FREEBIE
10 years ago
lilia 2861fa26a7 Implement infinite scrolling message lists
Only load the most recent messages when initially rendering a
conversation. Scrolling to the top of a message list loads older
messages.

This required some slight refactoring of how we insert message elements
into the dom. If the message is added to the end of the collection,
append it at the end. Otherwise, assume it is an older message and
prepend it.

When adding elements to the top, reset the scrollPosition to its
previous distance from scrollHeight. This keeps the current set of
elements fixed in the viewport.

// FREEBIE
10 years ago
lilia 4418be19d4 Update conversation header avatar if it changes
// 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 a569e34b33 Refactor new message notification and frontend updates
Create a cleaner seperation between generating notifications
and updating frontend conversation views. The former is now
handled by `conversation.notify` while the latter is achieved
by triggering an event on the conversation model, which will
only be acted on if there are any views listening for it.

Additionally, instead of re-fetching the entire message history,
which is overkill, just add or update the new/modified message.
This will help speed up the newmessage event handler and also
help avoid unnecessary re-rendering when resolving key conflicts.

// FREEBIE
10 years ago
lilia ddd2e67eb5 Fix re-rendering when resolving conflicts with media
* Don't open message detail views from message detail views
* When message errors change, re-render the error state, but
  not the message markup and contents.
* Fix renderErrors bug not removing the error class correctly.

// FREEBIE
10 years ago
lilia 6717390e83 Catch cancelation of confirmation dialog
Avoid 'Uncaught (in promise)' error in the console.

// FREEBIE
10 years ago
lilia 0f023ac4bf Focus the message field when conversation opens
Fixes #317

// FREEBIE
10 years ago
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 389b9a026d Initial restyle
Added background gradient and restyled conversation elements as floating
panels and cards.

// 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 73983118dc Render emoji in conversation title // Fixes #359
// 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 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 f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// 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 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 cc92cdfa29 After destroying messages, remove the conversation view 10 years ago
lilia 50939d1851 Restyle conversation menu button 10 years ago
lilia e0f84d9c8e Clear unread on focus iff convo is open 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
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
adambar 476eb54db1 Maintain bottom-most scroll position when resizing conversation area.
Closes #278
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 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 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 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 7bf1d41184 Render conversation titles 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 20ebc3f890 Move identity key storage functions to axolotl store 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 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 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.
10 years ago
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
10 years ago
lilia 36319d6458 Fix crash when sending :invalid_emoji: 10 years ago
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.
10 years ago
lilia ed707db4ba Support :emoji_name: syntax for emoji text input 10 years ago
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.
10 years ago
lilia b65190e101 Break a long line 10 years ago
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.
10 years ago
lilia 9d94bce92a After clearing messages, leave conversation open
Fixes #178
10 years ago
lilia dcc1588219 Add key verification screen
Accessible from the menu on private conversations.
10 years ago
lilia fd30dc6f1a Add message detail view 10 years ago
lilia 55c46d1bb6 Close conversation menu when clicking outside it 10 years ago
lilia e853c21c98 Remove unused code
There is no .settings-btn or .go-back in this view.
10 years ago
lilia ec43a0b633 jshint all the things
Small style fixes here and there. Removed one unused file.
10 years ago
lilia 3292177a96 Remove resize logic in favor of pure css 10 years ago
lilia 07e44ccf21 Revisit resize and scroll logic once more
Wait a little longer on initial scroll down. Previous timeout sometimes
triggered before all text is finished rendering.

Remove redundant resize calls.
10 years ago
lilia 488f25635d Wire up end session and leave group
Closes #136
Closes #137
10 years ago
lilia 9fe99adf0c Get scrolling right on conversation load 10 years ago
lilia 0463e385e8 Remove uneeded render
This is an artifact of a time when conversation elements would pop in
and out of the dom at a moment's notice, and thus needed to rebind their
event listeners regularly.
10 years ago
lilia 5e064db28f Render the message list view. 10 years ago
lilia 5ad5464dd1 Fetch messages in the background 10 years ago
lilia a5bc261365 Clear selected files after each sent message 10 years ago
lilia aca3db97da New messages auto-update the inbox & conversation
When a new message arrives, if its conversation is not already opened,
the background page opens it. If it is alrady open the window is
focused. Finally, the 'message' event is triggered, resulting in
   1. the inbox refetches conversations
   2. all conversations fetch new messages

TODO: only send this event to the target window
10 years ago
lilia db5e7fd6b6 Fix list view scrolling
Resize handlers are ugly. But not as ugly as scroll handlers. :p
Normalized some whitespace along the way.
10 years ago
lilia b13e36a11c Style conversation menu 10 years ago
lilia 17deb69a91 Make conversation panel work with a new contact
Prevent view from fetching messages without an id, as this causes a
crash.
10 years ago
lilia 8498d7ad1f Fixup conversation page styles and functionality
Render the entire conversation from a template, because some parts of it
must be rendered conditionally if it is a group vs private conversation.

Also apply some style fixes and restore lost functionality:
  * Make conversation title bar fixed.
  * Widens message bubbles.
  * Unhide message list.
  * Restore attachment rendering.
  * Restore message sending and attachment file selection.
  * Style attachments file input as a paperclip.
  * Style send button like on Android and make it a submit input.
10 years ago
Riley Shaw 94ce4d4b91 Simplify panel state management and message passing 10 years ago
Riley Shaw 9071d98395 Update styles to material design to match Android client (first pass) 10 years ago