Commit graph

339 commits

Author SHA1 Message Date
Scott Nonnenberg
eaf31705cc
A number of fixes for loading screen, recent rebase
FREEBIE
2017-09-14 16:53:52 -07:00
lilia
854374dc7c
Remove the old debug log menu item 2017-09-14 16:53:52 -07:00
Scott Nonnenberg
63e41612b7
Remove spellchecking on the debug log field - causes big slowdown
FREEBIE
2017-09-14 16:53:52 -07:00
lilia
bd7f4febaa
Remove dead code
These are all unused, obsolete, or no-op functions at this point.

// FREEBIE
2017-09-14 16:53:45 -07:00
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
2017-09-14 16:53:41 -07:00
lilia
de3816b094
Get standalone registration working in development
Whisper.events.trigger('openStandalone') to open the standalone
registration view.

// FREEBIE
2017-09-14 16:53:39 -07:00
lilia
bdeee1d2b1
Add CSP 2017-09-14 16:53:38 -07:00
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
2017-09-14 16:53:37 -07:00
lilia
83a020cc5e
Move focus listeners to their own file
// FREEBIE
2017-09-14 16:53:37 -07:00
lilia
63657db3be
Quick fix for i18n
Just use the english locale for now. Load locale data from the
filesystem in the main process and pass it to the renderer preload
script via ipc. Note that we need the locale data to be available by the
time view scripts are loaded.

// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
285b5ce062
Get install flow working in main window
// FREEBIE
2017-09-14 16:53:35 -07:00
lilia
5a6e65d11b
Merge index.html into background.html
Nothing stops us from rendering the inbox in the background page, since
it is no longer a background page at all. TODO: intercept window close
events to hide this window instead of closing it unless the app is quit
explicitly.

// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
859d49b3f4
Use relative paths
// FREEBIE
2017-09-14 16:53:34 -07:00
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
2017-09-13 13:33:40 -07:00
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
2017-08-28 13:06:10 -07:00
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
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
53f2bfbb57 Animated loading screens on startup and first conversation load
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
cc2c3edaa6 Override Backbone's trigger with one that catches exceptions
Model operations are vulnerable to exceptions thrown by event handlers.
Because this can interrupt really important data operations, it's better
to let the operation continue and log the error. In all likelihood it's
a view-related problem, and that shouldn't cause any data operation to
fail.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
14765599f3 Delete individual message
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
8112cd220a Show warning when we discover key change on verify
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
ff4fde651c Make it clear in conversation just some recipients failed
FREEBIE
2017-08-04 12:03:25 -07:00
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
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
b6cca41a0c Update verification-related strings to better match mobile app
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
16433d661a Show call to action on group member list when verifying
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
31bf05e14a Add verified state summary to top of safety number screen
FREEBIE
2017-08-04 12:03:25 -07:00
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
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
c714fb6dbf Shadow/icon/blue for banner, better verify advisories in dark theme
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
1cf9289b1a Add items to conversation history when user verifies/unverifies
FREEBIE
2017-08-04 12:03:25 -07:00
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
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
47c5142a83 Replace unicode check with new svg icon
A good bit of CSS was required to keep the text color changing along
with the text it is nestled within.

Also: took this opportunity to increase the contrast of the number and
verified section right under the contact name in the group members view.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
688cae6374 Remove empty string class passed to contact template
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
8264f3ba33 Make the term 'Verified' fully localizable
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
db2620af0a Safety Number screen: make verify button like other buttons
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
8d29cb9830 Prevent access to Safety Number when talking to yourself
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
c7e385eb38 Remove 'safety number approval' option from settings dialog
Also sync templates in test/index.html and background.html

FREEBIE
2017-08-04 12:03:25 -07:00
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
2017-08-04 12:03:25 -07:00
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
2017-08-04 12:03:25 -07:00
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
2017-08-04 12:03:25 -07:00
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
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
ee0b0f5ffb Remove all concept of 'key conflict' from the app 2017-08-04 12:03:25 -07:00
Heather Booker
5a3610c8e0 Specify font-family for identicon in notification
Fixes #904, where letters in notification bubbles were being
displayed in serif font on Antergos (Arch) OS.

// FREEBIE
2017-07-12 15:35:53 -07:00
Ikarulus
ec3278ca3a add message length warning for android clients 2017-06-07 15:53:14 -07:00
Scott Nonnenberg
0d722a3186 Last seen indicator visual refresh
- Last seen indicator now spans the full conversation, with subtle
shadow highlights above and below
- Scrollbars now overlap the content of the conversation, allowing last
seen indicator to touch the right edge of the window.
- The iOS and Android conversation background is now #eee instead of
white, which meant that the outgoing messages (Android) and incoming
messages (iOS) had to be updated for contrast. They now have white
backgrounds.
- Similarly, the scroll down button needed more contrast, and its
background is now white in light themes.

FREEBIE
2017-06-01 15:19:25 -07:00
Scott Nonnenberg
4c7bfbe9ff Scroll down button: when scrolled up, or new non-visible message
FREEBIE
2017-05-23 11:08:23 -07:00
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
2017-05-23 11:08:23 -07:00
lilia
d9851f51fc Enable voice notes again
For reals this time.

// FREEBIE
2017-05-22 10:09:54 -07:00
lilia
2a8ee26372 Disable voice notes again
This feature is still blocked on a corresponding iOS release.

// FREEBIE
2017-05-17 13:27:31 -07:00
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
2017-05-12 15:27:45 -07:00
lilia
56d1ce75ac Enable voice notes
And fix recorder background color in dark theme

// FREEBIE
2017-05-12 09:55:15 -07:00
lilia
aed5735620 Improve keychange notice reliability/perf
Bind a single listener to keychange events from the storage interface,
which then looks up relevant conversations and adds notices to them,
with tests.

Previously we would need to instantiate a conversation model in order to
start listening to its key change events. In practice this usually
happens at startup but we shouldn't rely on it, and it incurs higher
overhead since it creates a different listener for each conversation.

// FREEBIE
2017-05-09 15:41:41 -07:00
Scott Nonnenberg
ee00ad0e15 File attachments: show file size, bold filename, make icon bigger
FREEBIE
2017-05-09 15:14:20 -07:00
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
2017-04-18 16:27:50 -07:00
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
2017-04-13 13:15:42 -07:00
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
2017-04-12 20:43:16 -07:00
lilia
5d1e770307 Tweak network status styles
Remove inline styles
Use flexbox in the left pane

// FREEBIE
2017-04-12 13:02:31 -07:00
Sam Vevang
ed4991974b set up a new view for displaying the network status
// FREEBIE
2017-04-08 00:10:56 -07:00
lilia
25ee61d3cb Fix timers after suspend/resume/pause
We use timers to decide when to query and delete expired messages or
when to perform signed key rotations.

Internally, timers are counters that get updated when the CPU ticks, so
if the CPU sleeps, the timer will stop counting, and start again after
it wakes up, ignoring the intervening passage of wall clock time.

To fix this, without having to query the database or other potentially
high overhead operations too often, use an interval to frequently check
the wall clock time. If time jumps forward, trigger a global event so
other listeners can update their possibly-inaccurate timers.

https://stackoverflow.com/questions/6346849/what-happens-to-settimeout-when-the-computer-goes-to-sleep
https://stackoverflow.com/questions/4079115/can-any-desktop-browsers-detect-when-the-computer-resumes-from-sleep

// FREEBIE
2017-03-01 14:36:40 -08:00
lilia
536dd7b951 Add signed key rotation scheduler
Rotate signed prekey every 48hrs, waiting for online access if
necessary. After a rotation attempt is made, schedule the next run for
48hrs in the future.

We use a timeout to "wake up" and handle the rotation. This timeout gets
set on startup and whenever the next rotation time is changed. For
paranoia's sake, always clear the current timeout before setting the
next one.

Since new registrations necessarily upload new signed keys, we reset the
scheduled time to T+48hrs on `registration_done` events.

// FREEBIE
2017-02-16 18:06:20 -08:00
Asa Ayers
bda0430805 Add an option to play audio notifications 2017-02-02 09:00:14 -06:00
Ikarulus
53cd3af78b Added a dark theme
I added a dark theme in order to solve #328.
This may fix #328 at least partially.
2016-12-02 00:41:42 +01:00
lilia
e86142d07c Hide verification QR code
The scannable fingerprint format has changed, leaving our qr codes out
of date and thus unscannable.
2016-10-22 02:24:54 +09:00
lilia
b4007e58f2 Remove dead code 2016-10-22 02:24:17 +09:00
lilia
19b83931ed Enable disappearing messages 2016-10-11 22:52:40 +09:00
2-4601
669338c717 i18n 'Theme'
// FREEBIE
2016-10-07 19:27:05 +09:00
lilia
790407d42e Add qr codes 2016-10-05 19:11:39 +09:00
lilia
f05d693994 Switch from fingerprints to safety numbers 2016-10-05 19:11:39 +09:00
lilia
7fe708d195 Insert keychange advisories
On click, these open a verification panel for the relevant contact,
within this conversation.

// FREEBIE
2016-10-05 19:11:39 +09:00
lilia
1fe90ecdcb Add frontend for safety numbers approval setting
Adds the checkbox under settings.

// FREEBIE
2016-10-05 19:10:20 +09:00
lilia
600ac94257 Disable disappearing messages
Pending support on ios
2016-09-29 16:17:01 -07:00
lilia
2b2c6ab040 Frontend for timer updates and timer indicator 2016-09-29 16:17:01 -07:00
lilia
4cd2c03687 Add clock svg style 2016-09-28 17:20:03 -07:00
lilia
e809a0cf8b Breakout timer rendering into its own view
Make width and height constant.
2016-09-28 17:20:03 -07:00
lilia
bd713352e3 Hourglass can start at any percentage
This breaks the css-purity of our mixin but is necessary in order to
apply the initial offset of the hourglass animation dynamically, since
jquery can't manipulate arbitrary css on psuedo elements.
2016-09-28 17:20:02 -07:00
lilia
5f92ccd524 Render animated hourglass when messages are expiring 2016-09-28 17:20:02 -07:00
lilia
96fd017890 Support for incoming expiring messages
When initialized, or when expiration-related attributes change, expiring
messages will set timers to self-destruct. On self-destruct they trigger
'expired' events so that frontend listeners can clean up any collections
and views referencing them.

At startup, load all messages pending expiration so they can start their
timers even if they haven't been loaded in the frontend yet.

Todo: Remove expired conversation snippets from the left pane.
2016-09-28 17:20:02 -07:00
lilia
7b3b01bdf6 Refactor registration event
Make AccountManager into an event target for better separation between
app and service-library handling of registration events.
2016-09-20 13:42:33 -07:00
lilia
1afe50b1db Make contact sync button quieter
// FREEBIE
2016-09-08 12:05:48 -07:00
lilia
316110703c Remove title attr from socket status
// FREEBIE
2016-09-08 12:05:48 -07:00
lilia
f610233ef6 Add support for syncing blocked numbers
// FREEBIE
2016-09-07 13:04:45 -07:00
lilia
141cdef2a4 Generalize toast view template
// FREEBIE
2016-09-07 13:04:45 -07:00
lilia
b5191e78c3 More themeing
Restyle message input and welcome screen
Cleanup search, headers

// FREEBIE
2016-08-30 18:31:03 -07:00
lilia
6c05a71424 Tune up ios bubble style
// FREEBIE
2016-08-30 18:31:02 -07:00
lilia
8fbb0d05f5 Add settings ui for theme
// FREEBIE
2016-08-30 18:31:02 -07:00
lilia
7b9894d688 Refactor css to support theming
Move away from inline style attributes for setting contact colors.
Apply colors by name via css classes instead. Also lays groundwork
for syncing contact colors.

// FREEBIE
2016-08-30 18:31:02 -07:00
lilia
3aa72d2244 Address large font size edge cases
Fix some visual bugs occuring at large font size:
  * Contact names break onto the next line after their avatars in
    message detail screen
  * Settings menu font-size failed to scale
  * Handle Content overflow in modals.

// FREEBIE
2016-08-24 16:47:39 -07:00
lilia
645e05c2b9 Add support for new fingerprint format
This will be ready to roll whenever Android/iOS is.

// FREEBIE
2016-08-24 01:50:46 -07:00
lilia
178917da94 Disable voice notes
// FREEBIE
2016-08-23 16:18:01 -07:00
lilia
4f46a164ba Add voice notes
// FREEBIE
2016-08-23 16:16:31 -07:00
lilia
2c2f9c1ddc Fix dir=auto for convos with blank timestamps
Convos with no last_message_timestamp were being rendered/parsed as
having `data-timestamp="dir='auto'"`.

// FREEBIE
2016-07-14 17:26:16 -07:00
bitim
a1eccc2c49 Better RTL languages support:
- Fixed text alignment in RTL messages.
- Added support for search box.
- Added support for conversation name.
- Added support for contact name.
- Added support for last message timestamp and last message preview.

//FREEBIE
2016-07-14 11:13:00 -07:00
lilia
61e7b685e6 Make welcome screen prettier
// FREEBIE
2016-07-14 11:09:08 -07:00
bitim
919f3f6496 Add RTL languages support for messages
// FREEBIE
2016-06-29 17:56:26 -07:00
lilia
9091233950 Open images in a lightbox
Adds file-write permission for saving to disk from lightbox.

Fixes #810

// FREEBIE
2016-06-20 11:55:23 -07:00
lilia
8e1d884a10 Add button for re-importing contacts from phone
Add a section under settings for performing a contact sync from your
mobile device. This just re-runs the same import operation that occurs
at install/link time.

// FREEBIE
2016-06-16 16:43:07 -07:00
lilia
b6f785737c Restyle error icons, move them outside the bubble 2016-05-25 20:32:00 -07:00
lilia
b1d370755a Rename AxolotlStore
// FREEBIE
2016-04-21 18:36:17 -07:00
lilia
826d4c4301 Add magnifying glass to search field // Fixes #737
// FREEBIE
2016-04-14 11:57:56 -07:00
lilia
0cd7f84a05 Refactor read state tracking
Adds support for handling early arriving read receipts.

// FREEBIE
2016-04-14 11:57:52 -07:00
lilia
d1e9534542 Refactor delivery receipt tracking
Move code for matching receipts to messages (and vice versa) to its own
file.

// FREEBIE
2016-04-13 13:57:56 -07:00
lilia
1f4587795e Add link to github on debug log
// FREEBIE
2016-04-09 20:55:21 -07:00