Commit Graph

912 Commits (41fe50553f7d64b1abe8b7ddc155053be53f256b)

Author SHA1 Message Date
lilia 008e978b8a
Make standalone registration more accessible
Add buttons for switching between the linking flow and the standalone
registration flow. The button and standalone registration are only
availble in a development environment.

// FREEBIE
8 years ago
lilia a2e0fa59c1
Collect references to Whisper.events
Fixup

// FREEBIE
8 years ago
lilia f7c7e2251d
Remove unused method
This is now handled in AppView

// FREEBIE
8 years ago
lilia 6b70aecf29
Fix opening a conversation from notification 8 years ago
lilia b6e5439860
Fix saving attachments
// FREEBIE
8 years ago
lilia de3816b094
Get standalone registration working in development
Whisper.events.trigger('openStandalone') to open the standalone
registration view.

// FREEBIE
8 years ago
lilia e4e41140c4
Refactor app view
Introduce a top level view for navigating between the inbox and the
installer, enabling an in-window relink flow. Navigation is driven
through the openInbox and openInstaller global events.

// FREEBIE
8 years ago
lilia 5650748961
Fix pre-populated device name 8 years ago
lilia 25b0fbd949
Fix exceptions on window close
The stopListening function was being passed the close event as an
argument, which caused it to throw.

// FREEBIE
8 years ago
lilia 49cdc98386
Fix lightbox 8 years ago
lilia acd19fd759
Fix inbox styles 8 years ago
lilia 88893079d2
Fix restart 8 years ago
lilia 6686621b0b
Fix file dialog 8 years ago
lilia 859d49b3f4
Use relative paths
// FREEBIE
8 years ago
Scott Nonnenberg 00e1a6a36a Export: Improve usability - timing expectations, install button (#1474)
Because export might take a couple minutes, we now set expectations
that it might take 'several minutes' instead of just 'please wait.'

We also promote 'Install new Signal Desktop' from a text link in the
instructions to a button. This is important on the 'Completed' screen
because it is bigger and to the left of the 'Export Again' button, which
previously drew primary focus on that screen.

Lastly, we also remove the title-specific element of the support link,
so we're resilient to title changes in the future.

FREEBIE
8 years ago
Scott Nonnenberg e3bada1f4a
MessageView.updateColor: Call getAvatar on convo, not message
FREEBIE
8 years ago
Scott Nonnenberg 4009a0119e MessageView: Handle change of color to null, call getColor() (#1438)
When we relied on the actual value of the color property to be supplied
to the updateColor change event listener, sometimes it would be null.
Then the conversation bubbles would have no color at all, making the
text hard to read.

FREEBIE
8 years ago
Scott Nonnenberg d8ce198f55 Fetch conversations once, clean up ConversationController API (#1420)
* Fetch conversations once, clean up ConversationController API

Race conditions around re-fetching have caused some problems recently,
so this removes the need to re-fetch conversations. They are fetched
once or saved once, and that is it. All interaction goes through the
ConversationController, which is the central source of truth.

We have two rules for Conversations:

1. If a conversation is in the ConversationController it doesn't need
   to be fetched, but its initial fetch/save might be in progress. You
   can wait for that fetch/save with conversation.initialPromise.
2. If a conversation is not already in the ConversationController, it's
   not yet in the database. It needs to be added to the
   ConversationController and saved to the database.

FREEBIE

* Remove Conversation.fetch() call in Message.handleDataMessage()

FREEBIE

* ConversationController.API cleanup: Fix two missing spots

FREEBIE
8 years ago
Scott Nonnenberg 548586b934 Chrome export fixes: too-long names, redact group ids (#1402)
* On export, don't print out entire group id, just last three chars

FREEBIE

* Export: Limit conversation dirs to 30 characters of original name

FREEBIE

* Redact groups ids on import as well

FREEBIE

* InboxView: Protect against nonexistent loading screen

FREEBIE
8 years ago
Scott Nonnenberg 3d8aa3b8a2
Export: Handle synchronous 'shutdown-complete' event (already offline)
FREEBIE
8 years ago
Scott Nonnenberg c0cd733139 Full export, migration banner, and full migration workflow - behind flag (#1342)
* Add support for backup and restore

This first pass works for all stores except messages, pending some scaling
improvements.

// FREEBIE

* Import of messages and attachments

Properly sanitize filenames. Logging information that will help with
debugging but won't threaten privacy (no contact or group names),
where the on-disk directories have this information to make things
human-readable

FREEBIE

* First fully operational single-action export and import!

FREEBIE

* Add migration export flow

A banner alert leads to a blocking ui for the migration. We close the socket and
wait for incoming messages to drain before starting the export.

FREEBIE

* A number of updates for the export flow

1. We don't immediately pop the directory selection dialog box, instead
  showing an explicit 'choose directory' button after explaining what is
  about to happen
2. We show a 'submit debug log' button on most steps of the process
3. We handle export errors and encourage the user to double-check their
  filesystem then submit their log
4. We are resilient to restarts during the process
5. We handle the user cancelling out of the directory selection dialog
  differently from other errors.
6. The export process is now serialized: non-messages, then messages.
7. After successful export, show where the data is on disk

FREEBUE

* Put migration behind a flag

FREEBIE

* Shut down websocket before proceeding with export

FREEBIE

* Add MigrationView to test/index.html to fix test

FREEBIE

* Remove 'Submit Debug Log' button when the export process is complete

FREEBIE

* Create a 'Signal Export' directory below user-chosen dir

This cleans things up a bit so we don't litter the user's target
directory with lots of stuff.

FREEBIE

* Clarify MessageReceiver.drain() method comments

FREEBIE

* A couple updates for clarity - event names, else handling

Also the removal of wait(), which wasn't used anywhere.

FREEBIE

* A number of wording updates for the export flow

FREEBIE

* Export complete: put dir on its own line, make text selectable

FREEBIE
8 years ago
Scott Nonnenberg 675d41843e Re-enable message box if enter pressed with no text/files
Previously the message would stay disabled until the user clicked with
the mouse.

FREEBIE
8 years ago
Scott Nonnenberg 680f7d8b57 Additional logging for perf analysis and cross-device debuging
- How long it takes to get a message through the pre-send checks
- How long it takes to open a conversation for the first time
- The timestamp of any message we send to corellate with other logs
- Add conversation ID to 'decrypt old identity key errors' start/end

FREEBIE
8 years ago
Scott Nonnenberg 241e26dc17 Don't revoke convo avatar URL on unload - we will need it again
FREEBIE
8 years ago
Scott Nonnenberg 8700112f6d Decrypt any IncomingIdentityKeyError still sticking around
FREEBIE
8 years ago
Scott Nonnenberg 67cb9bdf54 Disable message box between send request and final send begin
Because we do a number of async checks before allowing the real send to
begin, on a slow matchine or when doing a lot of work (like receiving a
lot of messages) there can be a noticeable delay between hitting Enter
and the clearing of the text in the message box. In fact, newly-typed
text can be added to the previous message if the delay is long enough.

This prevents any interaction with the message box until the send has
either been prevented or has started.

FREEBIE
8 years ago
Scott Nonnenberg e57f155403 Handle rejections from protocol layer (due to missing records)
isVerified and isUntrusted both went to the protocol layer, but were not
prepared for rejected promises resulting from missing records. This
prevented send in large groups where there has never been a message
exchanged with one of the members.

FREEBIE
8 years ago
Scott Nonnenberg 6caf88c404 Key verification error popup: Remove cancel, empty resolve()
FREEBIE
8 years ago
Scott Nonnenberg 82b2a611e3 MessageView: Always remove errors on re-render to prevent doubles
FREEBIE
8 years ago
Scott Nonnenberg 78c02f1154 Restore 'cancel' button on delete message confirmation dialog
FREEBIE
8 years ago
Scott Nonnenberg ec70170829 ConversationView.unload: Add ability to provide reason for logging
FREEBIE
8 years ago
Scott Nonnenberg c0f8812f9b ConversationView: when windows are closed, call unload()
Anyway, unload() is a more comprehensive method for doing what the close
handler was trying to do before.

FREEBIE
8 years ago
Scott Nonnenberg 65283d2794 Unload conversations and old messages every half-hour
FREEBIE
8 years ago
Scott Nonnenberg 31d7e652fe Dismiss the app loading screen if we failed to connect to socket
FREEBIE
8 years ago
Scott Nonnenberg 305bd6b3b8 App loading screen: show messages processed so far
Also, show the same loading screen on index.js before we've bootstrapped
the app.

FREEBIE
8 years ago
Scott Nonnenberg 39795170c1 Handle the 'extension loaded, reopen window' scenario
Not sure exactly how to think about Chrome app lifetimes, so we're
being conservative. We only show the full-application loading screen
once, on first display of the inbox.

FREEBIE
8 years ago
Scott Nonnenberg 53f2bfbb57 Animated loading screens on startup and first conversation load
FREEBIE
8 years ago
Scott Nonnenberg 3e8b34f3d0 findOrCreateById instead of private-specific method
Anyway, findOrCreateById with no type didn't succeed, because the
conversation didn't validate.

FREEBIE
8 years ago
Scott Nonnenberg b985228160 Last seen indicator/scroll down button - defensive removal
FREEBIE
8 years ago
Scott Nonnenberg e6859a3684 Ensure that promises always resolve, or that rejections are okay 8 years ago
Scott Nonnenberg 5da324103a Throttle calls to getProfile when opening conversation
We don't want to throttle other calls to getProfile, so we localize this
to the fetch we do when we first open a conversation.

FREEBIE
8 years ago
Scott Nonnenberg aa80cdd74d ConfirmationDialogView: Make showCancel an explicit option
Also, don't call resolve/reject callbacks if they weren't provided.

FREEBIE
8 years ago
Scott Nonnenberg 14765599f3 Delete individual message
FREEBIE
8 years ago
Scott Nonnenberg 80a2a01e37 Remove jitter on verifying/unverifying safety number
On every click, even when sub-panes were open, we were calling
markRead(), which would save the conversation model with the new
unreadCount. The KeyVerificationPanelView was wired up to the change
event on conversation, so it would render with the results of that
update, then finally the user's intended update.

FREEBIE
8 years ago
Scott Nonnenberg 12b2674bde Show size of files even if size not precomputed for attachment
FREEBIE
8 years ago
Scott Nonnenberg 4124d5cb9b Show 'Message not sent' only if 'Some recipients failed' not showing
Also switch up the visual style for 'Some recipients failed' text to
match the more-visible 'Message not sent' text and the 'Resend' link.

FREEBIE
8 years ago
Scott Nonnenberg 25243ad9de Send warning: Show single problematic group member, not group name
FREEBIE
8 years ago
Scott Nonnenberg 697079cf9b Add else handlers with logging in toggleVerified catch handler
FREEBIE
8 years ago
Scott Nonnenberg 8112cd220a Show warning when we discover key change on verify
FREEBIE
8 years ago
Scott Nonnenberg 5bba6d3f17 setTrusted() -> setApproved() to dismiss the five-second warning
This change makes sense, since there was already a reference in the code
to the then-nonexistent setApproved()!

FREEBIE
8 years ago
Scott Nonnenberg 7ab20f09cc Fix focus issues with identity key send view
Tabbing right after entering the view would cause everythign to go crazy
as focus went back to the pane you were just on. This change both sets
the proper focus on load of that view (on the cancel button) and hides
other panes when they aren't active, only making them visible again when
they are once again the 'top' pane.

FREEBIE
8 years ago
Scott Nonnenberg ff4fde651c Make it clear in conversation just some recipients failed
FREEBIE
8 years ago
Scott Nonnenberg 12914307f1 Improve experience when discovering identity key error on send
New experience in the Message Detail view when outgoing identity key
errors happen, matching the Android View.

'View' button is only shown on outgoing key errors right now.

When a contact with an outgoing identity key error is clicked, they are
taken to a view like the popup that comes up on Android: an explanation
of what happened and three options: 'Show Safety Number', 'Send Anyway',
and 'Cancel'

Contacts are now sorted alphabetically, with the set of contacts with
errors coming before the rest.

FREEBIE
8 years ago
Scott Nonnenberg b6cca41a0c Update verification-related strings to better match mobile app
FREEBIE
8 years ago
Scott Nonnenberg 5b46ef3562 Show last seen indicator for keychange/verification notifications
FREEBIE
8 years ago
Scott Nonnenberg 1fedc75e5d Handle unverified length of zero
This can happen with unknown groups, where we don't know the list of
members but we're receiving messages. It's generally not a good
experience, but we shouldn't crash.

FREEBIE
8 years ago
Scott Nonnenberg 30bc3fca3a MessageView: Be resilient to multiple renders of a network error
FREEBIE
8 years ago
Scott Nonnenberg d1fa28b706 Object.assign -> _.extend(), for to make Chrome 45 and below work
FREEBIE
8 years ago
Scott Nonnenberg 1e8ae774a2 Differentiate between local and remote trust decisions
FREEBIE
8 years ago
Scott Nonnenberg 16433d661a Show call to action on group member list when verifying
FREEBIE
8 years ago
Scott Nonnenberg 31bf05e14a Add verified state summary to top of safety number screen
FREEBIE
8 years ago
Scott Nonnenberg 11372b4e00 Add icons for keychange and expiration timer in-conversation items
The shield matches the Android app's key change notification, and the
clock icon was easy to do and makes it easier to visually distinguish
those items in the conversation history.

FREEBIE
8 years ago
Scott Nonnenberg c714fb6dbf Shadow/icon/blue for banner, better verify advisories in dark theme
FREEBIE
8 years ago
Scott Nonnenberg 1d7cbc14fd Fix a couple bind()) issues when getting verified state
FREEBIE
8 years ago
Scott Nonnenberg b0dbecb4e2 Check trust store for identity key information on every new message
It's debounced so it doesn't go too crazy.

FREEBIE
8 years ago
Scott Nonnenberg 782c484680 Check trust store for latest identity key info before sending
We definitely want the latest information from our local database before
attempting to send.

FREEBIE
8 years ago
Scott Nonnenberg fc39241003 Ensure that we pull verified state only after getting profiles
FREEBIE
8 years ago
Scott Nonnenberg 36c28296e9 Remove extraneous logging
FREEBIE
8 years ago
Scott Nonnenberg 9b864c8675 Re-render verified change conversation items when convo changes
If the contact's name changes, for example.

FREEBIE
8 years ago
Scott Nonnenberg 1cf9289b1a Add items to conversation history when user verifies/unverifies
FREEBIE
8 years ago
Scott Nonnenberg a827334c3e Allow re-send of messages in msg detail view on OutgoingKeyError
We also show more errors than we used to in the MessageDetail screen
to help make it clear what is happening, and why the user would need to
re-send.

FREEBIE
8 years ago
Scott Nonnenberg 688cae6374 Remove empty string class passed to contact template
FREEBIE
8 years ago
Scott Nonnenberg 8264f3ba33 Make the term 'Verified' fully localizable
FREEBIE
8 years ago
Scott Nonnenberg e9968c3118 Remove comments after NewGroupUpdateView investigation
It doesn't run today - it depends on RecipientsInputView, which depends
on Backbone.TypeaheadCollection which doesn't currently exist in the
product.

FREEBIE
8 years ago
Scott Nonnenberg 8d29cb9830 Prevent access to Safety Number when talking to yourself
FREEBIE
8 years ago
Scott Nonnenberg c7e385eb38 Remove 'safety number approval' option from settings dialog
Also sync templates in test/index.html and background.html

FREEBIE
8 years ago
Scott Nonnenberg 9204188aa3 A bit of cleanup after some early code review
FREEBIE
8 years ago
Scott Nonnenberg 2955c36b3e Confirmation dialog: Make keyboard-accessible: escape to cancel
And proper tab order. Then some more work to re-focus on the message
composition field after the dialog shows up and steals focus.

FREEBIE
8 years ago
Scott Nonnenberg 243cbd8123 Confirmaton on send, banner when 'unverified'
Not yet using the new APIs, but ready to. Still to do:
- Send sync messages on trust decisions
- Respond to received trust decision sync messages
- Show trust decisions in the conversation history
- In that rare situation where a sent message ends up with a key error
  make it easy to retry the send.

FREEBIE
8 years ago
Scott Nonnenberg bedf10056b Support for group-member verifications via second-level panel
Also:
- All the necessary wire-up to update things in real time. If you have
a safety number page up via a group member view as well as via a 1:1
conversation with that contact, they'll both be updated as the
underlying model changes. Similarly, the overall group will update
in real-time as members change.
- A bit of special-casing for yourself in a group conversation - you're
shown as 'me' and are not clickable, where normally that would take you
to the Safety Number screen for that contact. You are also not included
in the trust calculations for a given group.

FREEBIE
8 years ago
Scott Nonnenberg ae3587f05e Move all instances of 'verify identity' to 'show identity'
As discussed in standup this morning - only the act of verifying or a
statement about current status should use that word 'verify.'

FREEBIE
8 years ago
Scott Nonnenberg ee0b0f5ffb Remove all concept of 'key conflict' from the app 8 years ago
lilia f095a1583e Fetch profiles whenever conversations are opened
For a group, fetch everyone's profile.

// FREEBIE
8 years ago
Scott Nonnenberg 3fbd1ab618 Use error.stack instead of error for console log
Chrome/V8 give you the error name, message and callstack at that
property, where toString() gives you [object NavigatorUserMediaError]

FREEBIE
8 years ago
Scott Nonnenberg 98f88607a0 Remove recorder UI when we fail to 'getUserMedia'
FREEBIE
8 years ago
Scott Nonnenberg 24174312b9 Fix: Show attachment views; they trigger update syncrhonously
FREEBIE
8 years ago
Scott Nonnenberg 2b5e56f6be Use setElement to ensure that re-parented views listen for events
FREEBIE
8 years ago
Scott Nonnenberg 40651f44ab
MessageView.appendAttachmentView: Remove from proper parent
FREEBIE
8 years ago
Scott Nonnenberg f602ac462f A little cleanup in ConversationView.resetLastSeenIndicator
FREEBIE
8 years ago
Ikarulus 1021f835fe changes due to feedback 8 years ago
Ikarulus 068cf5092c fix typo 8 years ago
Ikarulus ec3278ca3a add message length warning for android clients 8 years ago
Scott Nonnenberg f38d8eb4ae Fix: Ensure that attachments are always rendered
Because we only attach AttachmentViews to the DOM when they fire their
'update' event, we were subject to a race condition. If that event fired
after the final Message.render(), then it would be properly attached to
the final DOM node. If it fired early, it would end up missing from
the visible DOM entirely, attached to the old, discarded version of
the message.

This change updates our handling of a second call to loadAttachments().
Instead of bailing out if we've been called before, we attempt to
re-add our child AttachmentViews to the current DOM. But only if the
'update' event has been fired, and if their current parent node is not
what is in the DOM.

FREEBIE
8 years ago
Scott Nonnenberg da8d49b5ed ConversationView.markRead: Mark all messages read when at bottom
To handle the same 'not quite at the bottom' case that our 30px buffer
gives us for marking messages read, we use the same atBottom() method to
determine whether we should mark everything unread. Saves the effort and
potential missed messages (due to partial pixels, etc.).

FREEBIE
8 years ago
Scott Nonnenberg bb483474a3 Fix: Show hourglass on incoming disappearing messages once read
FREEBIE
8 years ago
Scott Nonnenberg 9a09e7a16b TimerView: Update only as often as 500ms
FREEBIE
8 years ago
Scott Nonnenberg 5351b60365 TimerView: Remove some unused bits of code
- initialize doesn't need to call update because
  MessageView.renderExpiring() calls it immediately
- we don't need the className because that's already present on
  the el it attaches to, part of the MessageView's template.

FREEBIE
8 years ago
Scott Nonnenberg fb7e7cf34c TimerView: don't continue to update after expiration
FREEBIE
8 years ago
Scott Nonnenberg 0c2c36c11a loadMoreMessages: Fix broken reference to this.view.outerHeight
:0/

FREEBIE
8 years ago
Ikarulus ab5489baa0 fixed #1163, dark theme flaw 8 years ago
Scott Nonnenberg ec22445f75 Bulletproofing of markRead and findNewestVisibleUnread
FREEBIE
8 years ago
Scott Nonnenberg 1775e97bcd Add comment and fine-tune last-seen indicator when not focused
FREEBIE
8 years ago
Scott Nonnenberg 672a517b73 Preserve lastSeenIndicator location when not focused
Also, a couple name changes of ConversationView methods to better
reflect what they do. update -> reset, since the method is destructive.

FREEBIE
8 years ago
Scott Nonnenberg 944ae296eb Prevent 'mark read on scroll' during fetches
FREEBIE
8 years ago
Scott Nonnenberg b60b20bde4 Mark messages read only when visible, on receipt, focus, scroll
- Only mark messages read when scrolling if in focus and visible
- Remove last seen indicator when scrolling to the bottom with scroll
  down button
- Update last seen indicator when we don't already have one and we're
  scrolled up.

FREEBIE
8 years ago
Scott Nonnenberg 9a0a87ab40 Last seen indicator: dismissed only on open and send
It can be moved if you're not scrolled to the bottom of of the window
or the window doesn't have focus when a new message comes in. Other than
that, it marches up the window until you close and reopen the
conversation, or send a message.

Note that we do NOT mark messages as read if they come in when you are
scrolled up. But we do mark the entire conversation as read if you
switch away from the app and back.

FREEBIE
8 years ago
Scott Nonnenberg eb1a4b3ac6 loadAttachments: Handle the zero -> some attachments case
FREEBIE
8 years ago
Scott Nonnenberg 0e1b534d3c Make MessageView.render() idempotent
Re-renders happen when we re-fetch messages from the database, and our
previous technique for loading attachments resulted in a new attachment
view added for every call to render()

This change ensures that a second call to render() does not add any more
attachment views.

FREEBIE
8 years ago
Scott Nonnenberg 25ebcc3131 Fix broken reference to i18n string 'mediaMessage'
FREEBIE
8 years ago
Scott Nonnenberg 0b6d5de753 Update the scroll position when 'fetch more messages' is complete
FREEBIE
8 years ago
Scott Nonnenberg 13a91eece8 MessageListView.measureScrollPosition: reuse variables 8 years ago
Scott Nonnenberg c5530b7235 Increase wiggle room to 30 px, which should ensure text cut off
FREEBIE
8 years ago
Scott Nonnenberg 84397a2ef4 20px at bottom of conversation considered 'at the bottom'
So users who are 'close enough' at the bottom of the conversation won't
get marooned in history.

FREEBIE
8 years ago
Scott Nonnenberg 09791ab7d9 Make last seen indicator more stable, with less forced removal
FREEBIE
8 years ago
Scott Nonnenberg c3dc9732ef Fix: Don't scroll to last seen indicator on focus
FREEBIE
8 years ago
Scott Nonnenberg 9de384f3b8 Reset last seen indicator timing on focus of window
FREEBIE
8 years ago
Scott Nonnenberg 01918049b4 Keep last seen indicator around for five seconds
Helps calm the user experience a little more, makes it easier to
understand what's happening when messages are coming in quickly.

FREEBIE
8 years ago
Scott Nonnenberg 4e9e811d12 Last seen indicator: Keep scroll position when window loses focus
FREEBIE
8 years ago
Scott Nonnenberg fdf04f6229 Ensure that we never show last seen indicator if count is zero
FREEBIE
8 years ago
Scott Nonnenberg e023c58883 Update last seen indicator even if window doesn't have focus
FREEBIE
8 years ago
lilia 72019eb79c Reuse a variable
FREEBIE
8 years ago
lilia 176339ffe6 Add log to see if we ever fetch while fetching
// FREEBIE
8 years ago
lilia 017bb56cca Fix some corner casese with last seen indicator
* Remove increment behavior
* Dismiss when new messages arrive but the window is focused
* Update the indicator when window becomes focused.

// FREEBIE
8 years ago
Scott Nonnenberg bb468e7b01 Wait for scroll before deciding whether to add scroll down button
FREEBIE
8 years ago
Scott Nonnenberg 8b4402e8a5 Only show scroll down button if we're not at bottom of convo
FREEBIE
8 years ago
Scott Nonnenberg 4c7bfbe9ff Scroll down button: when scrolled up, or new non-visible message
FREEBIE
8 years ago
Scott Nonnenberg 3cfac58d78 Eliminate all console errors during test run
FREEBIE
8 years ago
Scott Nonnenberg 3e01d78c89 MessageListView remove unused reset-scroll event
FREEBIE
8 years ago
Scott Nonnenberg 73f2a4a0fb Simplify MessageListView.resetScrollPosition: no translation math
FREEBIE
8 years ago
Scott Nonnenberg bfdb8254a4 Scroll on new message only if we were already at bottom
FREEBIE
8 years ago
Scott Nonnenberg fed26c36ca Add new Last Seen Indicator with unread count, scroll to it
This is to ensure that when there are a lot of unread messages, the user
is given the chance to see all of them by being scrolled to the oldest
new message.

When a new message comes in, the indicator will be incremented.

When the user sends a message or switches away from the conversation,
the last seen indicator will be removed.

FREEBIE
8 years ago
lilia 3f1d8ee2b8 Fix display name for ios voice messages
iOS populates a filename for voice messages which was overruling our check for
the voice message flag when choosing the display name.

// FREEBIE
8 years ago
lilia cfe0c77243 Conversation view blocks sending to left groups
Instead of attempting to send, which will throw an 'Unknown group' exception,
show a toast.

// FREEBIE
8 years ago
lilia 3ea5c0435b Update attachment style
Add names and sizes for all attachments except images, and (as with
arbitrary attachments), clicking on the text will open a save dialog.
In the absence of a filename, choose something that makes sense.

Display different icons for different media types, including distinct icons
for voice notes and audio files.

In iOS theme, audio, video, voice, and files are all encapsulated in bubbles.

Closes #804
Closes #842
Closes #836

// FREEBIE
8 years ago
lilia 6c53605dfd Flag voice note attachment protos as such
// FREEBIE
8 years ago
Scott Nonnenberg ee00ad0e15 File attachments: show file size, bold filename, make icon bigger
FREEBIE
8 years ago
lilia a5a9118c5c Fix empty bubble on accepting a new key
// FREEBIE
8 years ago
r-clancy 499ca5537a Increase max GIF size to match Signal-Android.
Signal-Android had the max GIF size changed to 25MB in
WhisperSystems/Android@ad0f283

This change brings parity to the two projects and fixed #1116.
8 years ago
lilia 7a8f2f0fec Allow sending arbitrary files 8 years ago
lilia 40af226a4a Move Whisper.events out of views and tests 8 years ago
lilia bab9580c3a Don't fallback to file view for images
Also lengthen the timeout a bit.

// FREEBIE
8 years ago
lilia c98ec91cab Fix tests again 8 years ago
lilia a2f0d6c739 Fix tests 8 years ago
lilia c9b4ae6e80 Save 'video/quicktime' files as .mov
Sometimes .mov files arrive with content type video/quicktime, but must
be saved to .mov in order for osx to recognize them as videos and open
the appropriate default program, display thumbnails, etc...

// FREEBIE
8 years ago
lilia a27ea20f3e Improve unsupported file type handling
Make arbitrary files look nicer and display the filename.

If an audio or video element fails to load for any reason, timeout after
a few seconds and render it as an arbitrary file. Also short circuit to
this treatment for common audio and video file types that we know are
going to fail, e.g., proprietary formats from apple.

// FREEBIE
8 years ago
lilia 27a1c9f18a Populate attachment file size
// FREEBIE
8 years ago
lilia fc514aa96f Add support for attachment file names
Send, receive, and save attachment filenames. Use them as suggested
names when saving files.

// FREEBIE
8 years ago
lilia 44a4ff3b52 Refactor install view
Let install view manage the connection to the provisioning socket as
well as cleaning up the window on completion, simplifying options.js.
Call `remove` so that the view stops listening when the window closes.
Move view script and template to background page.
Adds ability to hide nav if this isn't our first run.

// FREEBIE
8 years ago
lilia df65585e71 Network status listens to some global events
Listen for reconnectTimer to display reconnection info. Listen for
unauthorized to update network status immediately after a failed login,
rather than waiting for the normal 5s interval to time out.

// FREEBIE
8 years ago
lilia d3492960a6 Display info in network status when unlinked
When we can't connect due to being unlinked, network status indicator
will show an appropriate informational message and a button to open the
installer window to relink.

// FREEBIE
8 years ago
lilia 587e5265c5 Only re-render network status when it changes
// FREEBIE
8 years ago
Sam Vevang ed4991974b set up a new view for displaying the network status
// FREEBIE
8 years ago
alecglassford ef4b4da2a3 Make search clear button ("x") persist w/o hover
This makes the "x" in the search bar always visible when there is
text in the search box, even if the mouse is not hovering, hopefully
making for a clearer UI around search and resolving issue #741

The implementation adds the "x.svg" as a background image to the search
box when it is classed with .active, in addition to the
-webkit-search-cancel-button, which is still there for the actual
functionality but only appears on mouse hover (one tiny snag is that
coloring appears slightly different on hover, at least on my screen -
don't know if this is a problem).

I accounted for both ltr and rtl text-direction by using
getComputedStyle(...).direction to detect from the input's dir="auto"
- if there's a more elegant way to do this, please suggest. An ideal
solution would use the :dir pseudo-class but it's not implemented
in Chrome yet - https://developer.mozilla.org/en-US/docs/Web/CSS/:dir

For now, I added the direction-checking to inbox_view.js. I see that
input.search is also used in new_group_update_view.js and
recipient_input_view.js but neither of these views seem to be in use (?)
and they don't set the .active class anyway, so I ignored them.

Update: Amended version a few hours later - fixed and manually tested
color and spacing for iOS and Android Dark themes. Also made some new
SASS variables to make things DRYer and fixed my tab size.
8 years ago
lilia e4b9c51f88 Rework expiring messages management
// FREEBIE
8 years ago
lilia 0e31644c28 Remove spurious update to conversation on delivery receipts
Previously this would trigger the conversation to refresh it's last
message.

// FREEBIE
8 years ago
lilia ace59147ab Reduce unnecessary updates on conversations at startup 8 years ago
lilia 6509646bdb Set expireTimer to null to unset
// FREEBIE
8 years ago
lilia cd0fe7037b Add replayable error for signed key failure
Disable message sending if signed key updates fail too many times, but
allow the user to retry sending.

// FREEBIE
8 years ago
haffenloher e8de2f0c52 Increase image constraints to 6 MB / 4096 px
Matches WhisperSystems/Signal-Android@d2be49af

Closes #1055

// FREEBIE
8 years ago
beejaygee 76c165a10a Add copy and paste for images
Switch comparison operator to ===

Move to stricter parsing of clipboard items
8 years ago
Blake Griffith 1e498294e0 Add attachment_views_test.js tests 8 years ago
lilia aa55b6a538 Confirm device name with enter key
Use form and submit elements for their built in mouse and keyboard event
handlers.

// FREEBIE
8 years ago
karissa eb5c95e287 Add a few missing translatable strings to conversation search view 8 years ago
Asa Ayers bda0430805 Add an option to play audio notifications 8 years ago
Bernhard Steindl e2cb45c1da Push picture max edge to 2048 and max size to 4 MB
Closes #1032 and catches up with Android
8 years ago
lilia 9ef61d43f4 Update conversation lastMessage from database
Don't set lastMessage, let it update itself as needed, such as when
first rendering a conversation list item, and when its messages are
sent, received, or destroyed.
8 years ago
lilia a623f909f2 Move key change advisory content to the model
Return this content from a helper method so it can be used to populate
the last message on conversations.
8 years ago
lilia 260f50c104 Add id attr to key change advisory elements
The id attribute is needed to ensure that message elements are inserted
in the correct place in the DOM
8 years ago
lilia 41216f1378 Add timestamps to attachment filenames 8 years ago
lilia 05ed7c3822 Merge timer update functions 8 years ago
Ikarulus 53cd3af78b Added a dark theme
I added a dark theme in order to solve #328.
This may fix #328 at least partially.
8 years ago
lilia 0854b19371 Revert "Don't load group contacts unnecessarily"
This reverts commit 6699571910.

Not quite ready for primetime.
9 years ago
lilia 6699571910 Don't load group contacts unnecessarily
There are some cases when we want to initialize a group object without
loading its contacts, such as while processing delivery receipts. We
really only need to load the contacts for a group/convo when we are
rendering it, so let the front end handle those cases (which most of
them do already).
9 years ago
lilia 35270dbbb4 Use timeout-based animation for hourglasses
CSS animations are convenient but costly if you have hundreds of them.

Fixes #945
9 years ago
Benedikt Constantin Radtke 520be3d5db Fixed bubble timestamp update timer breakdown
TimestampView's getRelativeTimeSpanString called moment() twice while
calculating the timeout. If there was a minute/hour/day wrap between
these 2 calls, the calculated delay was 0 and thus no timer was
scheduled, since if (this.delay) evaluated to false.

Fixes: #857, #460

// FREEBIE
9 years ago
Benedikt Constantin Radtke add159dde9 Localized the message detail view's timestamps
Momentjs will now format the timestamps depending on the locale.

Fixes: #954

// FREEBIE
9 years ago
lilia e86142d07c Hide verification QR code
The scannable fingerprint format has changed, leaving our qr codes out
of date and thus unscannable.
9 years ago
lilia b5f5c4604c Fix missing hourglass on some expiring messages
Resolves a race condition between marking messages read and
loading/rendering those messages in the frontend.

Fixes #942
9 years ago
lilia 657fa2725f Adjust hourglass vertical alignment 9 years ago
lilia 15a9423a17 Change Identity to Safety Numbers in conversation menu
Fixes #935
9 years ago
2-4601 669338c717 i18n 'Theme'
// FREEBIE
9 years ago
paolo.ingls@gmail.com d4f7b9984b Fixed bug920
//FREEBIE
9 years ago
lilia 51e902c26f Remove dead code 9 years ago
lilia 674eeb8313 Remove refs to appWindow
We only need the regular window, not the AppWindow interface, which is
specific to chrome apps.
9 years ago
lilia 9da4cdefd7 Style fix 9 years ago
Paolo Inglese 7cd45714a5 Font size should be adjustable
//FREEBIE
9 years ago
lilia fcffcd35af DRY 9 years ago
2-4601 81e1b84129 Fix 2nd person conjugation in exp. timer messages
// FREEBIE
9 years ago
lilia 34888160bb Fix re-appearing disappearing message ui
Fix a bug where entering the message detail view and then going back
would cause the timer menu to appear.
9 years ago
lilia 94c1ac6f09 Fix message insertion for the first element inserted 9 years ago
lilia 4ee2652367 Fix wrong contact in some timer updates
Mistakenly showed 'You' for timer updates inferred from incoming
messages.
9 years ago
lilia 790407d42e Add qr codes 9 years ago
lilia f05d693994 Switch from fingerprints to safety numbers 9 years ago
lilia 7fe708d195 Insert keychange advisories
On click, these open a verification panel for the relevant contact,
within this conversation.

// FREEBIE
9 years ago
lilia 1fe90ecdcb Add frontend for safety numbers approval setting
Adds the checkbox under settings.

// FREEBIE
9 years ago
lilia 5899654ea5 Remove log message 9 years ago
lilia de744a6c55 Fix messages being inserted in the wrong place
Usually new elements are inserted in a predictable order relative to the
sort order of the models/collection, but it's not garaunteed. This fixes
up message element insertion to handle the general case where elements
can be added in any order and must be displayed in correct order as
determined by the collection's sort function. In the worst case, we'll
have to iterate over the entire list of elements to find the right spot,
but in practice most of the time we can short circuit based on the index
of the model or by looking for the predecessor or successor of the
element in question.
9 years ago
lilia 0bba096510 Use 'You' instead of your own phone number 9 years ago
lilia 56aee5e8ef Update conversation snippets automatically
Fixes stale snippets after the message has expired
9 years ago
lilia 2b2c6ab040 Frontend for timer updates and timer indicator 9 years ago