Commit Graph

796 Commits (ffbcb4ecb5bd53dabe8ac15d23e72ae49b5654bb)

Author SHA1 Message Date
Scott Nonnenberg ffbcb4ecb5 Load debug log dialog immediately, then populate log data (#1540)
An immediate response to the user request to see the log, and then we
show the real data as soon as we've loaded it from disk.

Changes:
  - the IPC exchange to get the log data is now async
  - the API to fetch the log on the client side now returns a Promise
  - in the main process, the only disk access done synchronoously is
    reading the contents of the log directory. The JSON parsing of the
    resultant log data is now split up into three chunks.
  - We only send three keys from each log item to the renderer process:
    msg, time, level. Previously we sent the entire log entry with extra
    keys: hostname, pid, name.

FREEBIE
8 years ago
Scott Nonnenberg 3b4fd2d0e0 Eliminate $name$ in two places (#1520)
* Eliminate $name$ when changedRightAfterVerify string is shown

FREEBIE

* Eliminate $name$ when identityKeyErrorOnSend string is shown

FREEBIE
8 years ago
Scott Nonnenberg 314b29e426
Redact group ids in logging
FREEBIE
8 years ago
Scott Nonnenberg 6b11f67dc6
Move logging to disk via bunyan
- Logging is available in main process as well as renderer process, and
  entries all go to one set of rotating files. Log entries in the
  renderer process go to DevTools as well as the console. Entries from
  the main process only show up in the console.
- We save three days of logs, one day per file in %userData%/logs
- The 'debug' object store is deleted in a new database migration
- Timestamps and level included in the new log we generate for publish
  as well as the devtools
- The bunyan API is exposed via windows.log (providing the ability to
  log at different levels, and save objects instead of just text), so we
  can move our code to it over time.

FREEBIE
8 years ago
Lilia 42f2142e36 Fix RangeError on non-file drag/drop events (#1498)
ConversationView responds to drag/drop events by forwarding them to its file
input. The file input stops propagation and handles the event only if the data
transfer is type file. This means that any other data type (text, img, etc...)
causes an recursive loop of event propagation, eventually resulting in logging a
"RangeError: Maximum call stack size exceeded".

Fix by only forwarding files to the file input.

// FREEBIE
8 years ago
Scott Nonnenberg 48f625c392
Move app theming from index to app view (#1479)
Apply theming one level higher so it applies to the debug log.

// FREEBIE
8 years ago
Lilia f698d0bc51
Better install view error handling (#1472)
If linking fails because an http request didn't connect, show a message and
allow the user to start over.

// FREEBIE
8 years ago
Lilia ae190fed44
Profiles (#1453)
* Add AES-GCM encryption for profiles

With tests.

* Add profileKey to DataMessage protobuf

// FREEBIE

* Decrypt and save profile names

// FREEBIE

* Save incoming profile keys

* Move pad/unpad to crypto module

// FREEBIE

* Support fetching avatars from the cdn

// FREEBIE

* Translate failed authentication errors

When AES-GCM authentication fails, webcrypto returns a very generic error. The
same error is thrown for invalid length inputs, but our earlier checks in
decryptProfile should rule out those failure modes and leave us safe to assume
that we either had bad ciphertext or the wrong key.

// FREEBIE

* Handle profile avatars (wip) and log decrypt errors

// FREEBIE

* Display profile avatars

Synced contact avatars will still override profile avatars.

* Display profile names in convo list

Only if we don't have a synced contact name.

// FREEBIE

* Make cdn url an environment config

Use different ones for staging and production

// FREEBIE

* Display profile name in conversation header

* Display profile name in group messages

* Update conversation header if profile avatar changes

// FREEBIE

* Style profile names small with ~

* Save profileKeys from contact sync messages

// FREEBIE

* Save profile keys from provisioning messages

For standalone accounts, generate a random profile key.

// FREEBIE

* Special case for one-time sync of our profile key

Android will use a contact sync message to sync a profile key from Android
clients who have just upgraded and generated their profile key. Normally we
should receive this data in a provisioning message.

// FREEBIE

* Infer profile sharing from synced data messages

* Populate profile keys on outgoing messages

Requires that `profileSharing` be set on the conversation.

// FREEBIE

* Support for the profile key update flag

When receiving a message with this flag, don't init a message record, just
process the profile key and move on.

// FREEBIE

* Display profile names in group member list

* Refresh contact's profile on profile key changes

// FREEBIE

* Catch errors on profile save

// FREEBIE

* Save our own synced contact info

Don't return early if we get a contact sync for our own number

// FREEBIE
8 years ago
Scott Nonnenberg db869c6ce4
Scroll to bottom when adding a new message (#1450)
Added a comment to try to make this easier to understand as you read it.

FREEBIE
8 years ago
Michael Kirk f389380b26
scroll only when needed (#1441)
I believe this was just a simple typo

// FREEBIE
8 years ago
Scott Nonnenberg 7a2c8e815c
Import: Wait until db writes resolve before saying we're done (#1401)
FREEBIE
8 years ago
lilia ff1bad674e
Fix exception in install view
These lines throw TypeErrors for previously registered clients.

// FREEBIE
8 years ago
Scott Nonnenberg ac237b9e31
AppView: Store initialLoadComplete value for late openInbox
FREEBIE
8 years ago
Scott Nonnenberg 90cc0949b6
InstallView: Refactor step numbers into enum
FREEBIE
8 years ago
Scott Nonnenberg 7f8ade7747
Remove migration-related functionality, leaving export stuff
FREEBIE
8 years ago
Scott Nonnenberg 413fba80af
Separate dir selection from import, better import button text
This allows us to show the 'import in progress' screen only when the
user has successfully selected a directory.

FREEBIE
8 years ago
Scott Nonnenberg ff1cb3598d
Remove step 1 of previous setup flow, replaced by choice screen
FREEBIE
8 years ago
Scott Nonnenberg ba347744ff
Import: choice on first startup, workflow, ported to Node.js fs API
FREEBIE
8 years ago
Scott Nonnenberg f37af04818
AppView.createInbox() - set this.inboxView immediately to be ready
If the 'empty' event is fired between the updateInbox() call and the
new InboxView() call afterwards, then the loading screen will never go
away. We fix that by immediately creating the InboxView but only adding
it to the DOM when the backing data is ready.

FREEBIE
8 years ago
Scott Nonnenberg eaf31705cc
A number of fixes for loading screen, recent rebase
FREEBIE
8 years ago
lilia 854374dc7c
Remove the old debug log menu item 8 years ago
lilia 11633d7d87
Make debug log available from the installer
Move debug log from inbox view to app view so it can be opened regardless of
whether we are showing the inbox view or the installer.

// FREEBIE
8 years ago
lilia 02df917f3a
Fix $name$ in confirmation dialogs
Our i18n shim supports multiple substitutions if you give it an array of strings
to use as replacements.

// FREEBIE
8 years ago
Scott Nonnenberg 8f0b0b121a
Add missing comma in ConversationView event list
FREEBIE
8 years ago
lilia a2b2bd4bf3
Fix relative paths
// FREEBIE
8 years ago
lilia 26cece71c6
Prepopulate phone number on standalone page 8 years ago
lilia 7c6da5a157
Make 'Restart Signal' actually restart Signal
Previously it would just reload the page.

// FREEBIE
8 years ago
lilia 29b07950a3
Fix scroll reset after clicking on a notification 8 years ago
lilia 2528acc717
Remove platform-specific links from install flow
Mostly to satisfy the mac app store.

// FREEBIE
8 years ago
lilia 4d981c439a
Remove number validation from install view
Allows our special cased test numbers to link desktop clients.

// FREEBIE
8 years ago
lilia d2179b2c3f
Conversation view handles drag n drop events
By forwarding them to its file input.

// FREEBIE
8 years ago
Scott Nonnenberg 601081c1b8
More refactoring to reduce global event dependencies
All Whisper.events listeners are now defined and bound in background.js,
and we no longer need global methods for opening the inbox and
conversation views, as those are handled by AppView or internally by
InboxView.

// FREEBIE
8 years ago
lilia 8d32a3bebd
Remove dead code
This view doesn't contain any elements with class openInbox.

// FREEBIE
8 years ago
lilia 4b96722d52
Hide initially empty error in standalone view
// FREEBIE
8 years ago
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