Commit Graph

91 Commits (5d044bd00e52a0b762eb63847c9619f3dedae6eb)

Author SHA1 Message Date
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.
10 years ago
lilia f6376c0fa2 Rename event
'open' seems a better name for an event that triggers the open function.
10 years ago
lilia f73596c240 Add a view for attachment previews 10 years ago
Emily Chao bb2b53035e Restyled message attachments
Added a size limit, added functionality to delete the attachments before sending in a more user-friendly way
10 years ago
lilia 9baafddb14 Add license to file input view 10 years ago
lilia d470b0eb53 Less jquery, more templating in conversation view
`if (foo) then jquery-dom-insert...` is a poor pattern to follow.
Instead, let mustache do the work.
10 years ago
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
10 years ago
Emily Chao 5d3020b9ed Refactor phone number input view
Moves validation logic to its own view to be shared on index and options
pages.
10 years ago
lilia 44007ca58f Add rudimentary ui for sending a group update 10 years ago
lilia d119bdff01 restore default avatars 10 years ago
lilia 3d6c251fd1 Group avatars 10 years ago
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
10 years ago
lilia 0ea176dfa0 Don't require a conversation name
Just display a sensible default in the frontend if it's unset.
For private conversations this should be the phone number, for
groups, the list of numbers.
10 years ago
Dave Sescleifer 441962abc6 Fixed date format 10 years ago
lilia ccc98d2f3d Fixup delivery receipts
Uses app-level timestamps for outgoing messages.
Adds timestamp property to the outgoing jsonData.
Triggers a runtime event to notify frontend on delivery receipts.
Renders delivered messages with a 'delivered' class.
10 years ago
lilia 3795ea5070 Fix message view using the wrong attribute 10 years ago
lilia cfd4ccc803 Move index querying logic to /models 10 years ago
lilia 006653ed8e DB/Index Redux
This change removes the timestamp field from messages and conversations
in favor of multiple semantically named timestamp fields: sent_at,
received_at on messages; active_at on conversations. This requires/lets
us rethink and improve our indexing scheme thusly:

The inbox index on conversations will order entries by the
conversation.active_at property, which should only appear on
conversations destined for the inbox.

The receipt index will use the message.sent_at property, for effecient
lookup of outgoing messages by timestamp, for use in processing delivery
receipts.

The group index on conversation.members is multi-entry, meaning that
looking up any phone number in this index will efficiently yield all
groups the number belongs to.

The conversation index lets us scan messages in a single conversation,
in the order they were received (or the reverse order). It is a compound
index on [conversationId, received_at].
10 years ago
lilia 5762e59c41 DRY up registration event callbacks
This was just a special case of the extension.on/trigger interface.
10 years ago
lilia e68720f07f Frontend support for ReplayableErrors
Eventually we'll store errors on the message model, and this change will
let us render and process them.
10 years ago
lilia 8c93101989 Don't store conversationType on messages
This was used to conditionally render messages in the group style, but
it's actually unnecessary. We can render the same markup in both cases
and change the appearance with css.
10 years ago
lilia 8257fa7478 Add support for deleting a conversation
Note that the conversation record is not actually destroyed,
merely marked inactive, preserving the contact name, photo,
etc...
11 years ago
lilia ccbe837ca2 Rebind events when opening a previously opened conversation 11 years ago
lilia 99a2685f93 Store attachments as binary blobs
Move base64 encoding of attachments to an AttachmentView. This makes
image rendering an asynchronous task so we fire an update event to
indicate to the parent MessageListView that its content has changed
height and it is time to scroll down.
11 years ago
lilia bf22da209f Fix tests 11 years ago
lilia d1c5b6da7a Get rid of Layout global
Instead, trigger and listen for events on the conversation collection
object.
11 years ago
lilia a835887459 Fix scroll when re-opening a conversation 11 years ago
lilia fd3a72d435 Destroy all globals
Well, not *all* globals..
11 years ago
lilia c0681beca7 Consolidate message callbacks
Register the runtime callback at the top level view rather than having
each conversation view register independently.
Also refactors Layout into InboxView.
11 years ago
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.
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 b9859ad9d4 Add some license headers 11 years ago
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
11 years ago
lilia 0956d328da Fixes #71 Autoscroll
Conversation view autoscroll triggers on dom change, not storage change,
ensuring that we don't scroll before the new element is inserted.
11 years ago
lilia aa937ae1d1 Add attachment inputs to new conversation form
Fixes reference error to 'map' on undefined attachments list.
11 years ago
lilia 987744cd79 Default avatars
Someday you'll be able to edit your avatar. Until then, put a bird on
it.
11 years ago
lilia 229007040c Basic frontend support for image attachments 11 years ago
lilia d362d0d978 Autoscroll conversation views
Scroll to the bottom (most recent) message in the conversation when it
is opened, when we send a message, and when we receive a message.
11 years ago
lilia d67b723f4f Highlight the selected thread 11 years ago
lilia 19dac1f3df Decorate incoming group messages
with numbers and image placeholders, so you know who's saying what.
11 years ago
lilia 78166365c7 Fix new message number validation 11 years ago
lilia 6e2a85ccf1 wip new message phone number validation 11 years ago
lilia 4f21bbd21f Use textsecure.messaging to create groups
Not textsecure.storage. Sigh. Also accomodate the fact that
the group id is not returned directly, but rather at the end
of a promise chain.
11 years ago
lilia 43f4f6cf99 Open a group's view after it's created 11 years ago
lilia 01f9fc1f17 More frontend groups fixes 11 years ago
lilia dc41ebf701 Small frontend fixes for the new group view 11 years ago
lilia 81e4af5827 Move phonenumbery utils to libphonenumber object
Slowly whittling away at helpers.js...
11 years ago
lilia 0f4b53c176 Update records list in BBLocalStorage on fetch
Previously, would only update the known messages.
11 years ago
lilia 2288f8adc1 Fix new group ui not showing 11 years ago
lilia ef066ea9d2 Make conversations open when they are created 11 years ago