Commit graph

2825 commits

Author SHA1 Message Date
lilia
28e5c04633
Set AUMID to appId
It is also important to set the Application User Model ID (AUMID) to the
appId of the application, in order for notifications on Windows 8/8.1 to
function and for Window 10 notifications to display the app icon within
the notifications by default. The AUIMD should be set within the Main
process and before any BrowserWindows have been opened, it is normally
the first piece of code executed.

https://github.com/electron-userland/electron-builder/wiki/NSIS#guid-vs-application-name

// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
dcc6f599a2
Auto-update hourly 2017-09-14 16:53:34 -07:00
lilia
6686621b0b
Fix file dialog 2017-09-14 16:53:34 -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
lilia
95e809636a
Quick fix for undefined references to chrome.* 2017-09-14 16:53:34 -07:00
lilia
83d827c127
Configure electron-builder
// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
995ccda9e4
Add electron and electron-builder dev dependencies
// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
e6e8f02fb7
Populate required fields in package.json
// FREEBIE
2017-09-14 16:53:34 -07:00
lilia
2cf7ea0a94
Hello Electron
In package.json, define our main entry point for electron, and add a
node script to start it up.

Add main.js from Electron/electron-quick-start with two modifications.
1. Load background.html instead of index.html
2. Disable node integration in the renderer

At this point we can load the background page in a window
with `npm start`, though it currently breaks on missing chrome app APIs.

// FREEBIE
2017-09-14 16:53:28 -07:00
Scott Nonnenberg
6b7edc2df3
v0.43.4
Force full contact/group import on next launch if not first run (#1476)

Performance: Log entry max to 2k, less logging in hot codepaths (#1459)

Don't show notification for verified state change with yourself (#1454)

Export: Improve usability - timing expectations, install button (#1474)

Add Transifex config to git to unblock Electron localization (#1477)

Large localization update

FREEBIE
2017-09-14 16:41:17 -07:00
Scott Nonnenberg
c71b7d7f27
Update localized strings
FREEBIE
2017-09-14 16:34:13 -07:00
Scott Nonnenberg
ff6dc786f9 Force full contact/group import on next launch if not first run (#1476)
* Force full contact/group import on next launch (if not first run)

FREEBIE

* Don't update contact sync key in storage on every reconnect

FREEBIE
2017-09-14 12:08:10 -07:00
Lilia
2166e0924a Add transifex config to git (#1477)
So we can pull different translation resources from different branches.

// FREEBIE
2017-09-14 09:45: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
1e694fe8d7 Log entry max to 2k, remove logging in hot codepaths (#1459)
On a recent trip through a CPU profile taken while Signal Desktop
churned through a large backlog of messages, it was clear that
console.log was a major source of time spent, primarily the sort
operation required after every new entry is added to the Backbone
collection. So, three different techniques to combat this:

1) Reduce the maximum number of entries in the collection from 5k to 2k
2) No more logging of add/update/remove queue in MessageReceiver
3) No more log entries in Message.handleDataMessage main codepath

FREEBIE
2017-09-12 09:34:49 -07:00
Scott Nonnenberg
69af8d2651 Don't show notification for verified state change with yourself (#1454)
* Don't show notifications for verified state change with yourself

It's confusing to users, and it really doesn't mean anything anyway.

FREEBIE

* Add log statement that we've suppressed a verified notification

FREEBIE
2017-09-08 11:14:01 -07:00
Scott Nonnenberg
3a733ea10a
v0.43.3
Fix bug causing contact and group names/colors to be lost (#1437)

Fix broken Swedish translation preventing new installs
(8caecd50cd)

Fix clear message bubbles when adding contact with previous messages
in iOS (#1438)

Fix message bubble widths on horizontal resizes (#1447)

Remove horizontal scrolling in convo/message lists (#1448)

Update translations for hr, pt_BR and sv
(8dca9c9b8f)

Export (still behind a flag):
  - Limit attachment filename length for Windows path limits (#1439)
  - Reintroduce conversation last-contact date in directory name (#1439)

Add tests for export utility functions (#1439)

FREEBIE
2017-09-07 10:41:09 -07:00
Scott Nonnenberg
e3bada1f4a
MessageView.updateColor: Call getAvatar on convo, not message
FREEBIE
2017-09-07 10:38:00 -07:00
Lilia
71036e31ab Fix horizontal scrolling in convo/message lists (#1448)
This removes some errant horizontal scrollability from the conversation list and
the message list.

// FREEBIE
2017-09-07 09:57:47 -07:00
Lilia
5d8e8459b3 Fix bouncy bubble widths (#1447)
Max-width on a message bubble should be about 30em for the good readability.
However, when the window isn't wide enough, bubbles must be further limited.

The transition should happen around the point that these two rules intersect,
but it was kicking in a little late, which caused the bubbles to jump from wider
to shorter as you widened the window past a certain point. This change adjusts
the threshold for smoother and more consistent bubble resizing.

The variable name $big-avatar-min-width is an artifact of a past design and was
previously used in multiple places, but it no longer makes sense in this context
so it has been discarded.

// FREEBIE
2017-09-07 09:57:33 -07:00
Scott Nonnenberg
cc6dcf67b7 Export: Limit attachment filename length, + convo date, + tests (#1439)
* Export: limit attachment names to 30 chars, tests for helper fns

Also, reintroduce last contact date in conversation dir name

FREEBIE

* MessageView tests: Fix failures during blanket coverage run

FREEBIE
2017-09-06 18:20:42 -07:00
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
2017-09-06 18:19:11 -07:00
Scott Nonnenberg
4cba16cb61 Fetch all conversations on startup of app, not on inbox load (#1437)
* Fetch all conversations on startup of app, not on inbox load

A recent change to fetch conversations less didn't take into account all
that can happen in the app without the inbox loaded. That only happens
when the window is shown, and messages can come in with the app in the
background. In that case, the conversation wouldn't have been loaded
from the database, but would be saved to the database anyway, losing
data.

This change fetches all conversations as soon as the the data store is
ready for a fetch. It also introduces failsafe throws to ensure that
synchronous ConversationController accesses don't happen until the
initial fetch is complete. A new getUnsafe() method was required to
account for some of the model setup that happens during that initial
conversation fetch.

Fixes #1428

FREEBIE

* Fix tests: ConversationController.load() required before get()

FREEBIE
2017-09-06 18:18:46 -07:00
lilia
8caecd50cd Update swedish translations
// FREEBIE
2017-09-04 12:39:32 +02:00
lilia
8dca9c9b8f Update translations
Fixes #1427

// FREEBIE
2017-09-04 12:24:28 +02:00
Scott Nonnenberg
2adc53a588
v0.43.2
Fix problems with updating contact information (#1419)

Performance/reliability: Fetch conversations from DB only once (#1420)

Export bug-fixes (still behind a flag)
  - Properly generate directory names for nameless groups (#1421)
  - Remove " as one of the allowed characters in filenames

FREEBIE
2017-09-01 10:41:39 -07:00
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
2017-09-01 09:10:41 -07:00
Lilia
51cd28bb4a Fix race handling contact sync with verified info (#1419)
When processing a contact sync with embedded identity key verification info, we
were running overlapping async fetch/save operations on the same conversation
model, causing a race that tends to clobber updates to the contact info.

In this change we extend the application-level contact info handler to block on
a subsequent call to the verification handler, which effectively serializes the
fetch/save calls, and relieves the need for the message receiver to trigger a
seperate event concerning the verification info on contact sync messages.

Fixes #1408

// FREEBIE
2017-09-01 07:42:41 -07:00
Scott Nonnenberg
07abe2639f Export: Properly generate directory names for nameless groups (#1421)
FREEBIE
2017-09-01 07:33:30 -07:00
Scott Nonnenberg
94b63c39fd
Export: Remove " as one of the allowed characters in filenames
Turns out that it's not allowed on windows.

FREEBIE
2017-08-31 23:25:49 -07:00
Scott Nonnenberg
a01588f55e
v0.43.1
Properly handle update of blocked numbers sync'd from mobile
device (#1411)

Fix some bugs with migration to Electron (still behind a flag)
  - Dark Theme: Increase banner text contrast for legibility (#1415)
  - Better disambiguate conversation directory names (#1409)
  - Handle long group or contact names (#1402)
  - Redact group ids in export logging (#1402)

Better logging
  - Don't log expiration if queued task threw an error (#1412)
  - Additional error handling/logging during contact sync (#1395)

Remove unknown group messages from cache - no need to retry! (#1414)

Update a large number of strings via transifex (#1403)

FREEBIE
2017-08-30 14:51:42 -07:00
Scott Nonnenberg
36e8b82b5f Remove unknown group messages from cache - no need to retry! (#1414)
FREEBIE
2017-08-30 14:40:08 -07:00
Scott Nonnenberg
52a595b372 Export/Dark Theme: Increase banner text contrast for legibility (#1415)
FREEBIE
2017-08-30 14:39:45 -07:00
Scott Nonnenberg
46b64e306f createTaskWithTimeout: Don't log expiration if task threw (#1412)
FREEBIE
2017-08-30 13:33:55 -07:00
Scott Nonnenberg
3f7fbd93d5 Export: Better disambiguate conversation directory names (#1409)
FREEBIE
2017-08-30 13:23:07 -07:00
Scott Nonnenberg
4011e26b50 Fix handling of sync message with blocked numbers (#1411)
FREEBIE
2017-08-30 11:55:17 -07:00
Scott Nonnenberg
b14667ae40 Additional error handling/logging during contact sync (#1395)
FREEBIE
2017-08-30 09:35:04 -07:00
Scott Nonnenberg
e16d80d9a2 Update a large number of strings via transifex (#1403)
FREEBIE
2017-08-30 09:31:03 -07:00
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
2017-08-30 09:30:21 -07:00
Scott Nonnenberg
6190ad794a
v0.43.0
Note: This version requires a new 'directory' permission

Feature: Migration to Electron (currently behind a flag)
  - Warning banner that this version is deprecated
  - Export of all database contents to disk
  - This exported data can be used to initialize the Electron version
    of the app
  - Note: after export, this Chrome instance will not be useable since
    the Electron export-initialized instance will be an exact copy.
    _There can only be one_ client with the same identity!
  - See original pull request for flags to enable or reset:
    https://github.com/WhisperSystems/Signal-Desktop/pull/1342

We now log 'clearAttention' less, since we call it every two seconds

String updates for es, fi, it, ja, pt_PT, ru and sv

FREEBIE
2017-08-28 14:22:26 -07:00
Scott Nonnenberg
763970b0c5
String updates for es, fi, it, ja, pt_PT, ru and sv
FREEBIE
2017-08-28 14:21:40 -07:00
Scott Nonnenberg
3d8aa3b8a2
Export: Handle synchronous 'shutdown-complete' event (already offline)
FREEBIE
2017-08-28 14:01:51 -07:00
Scott Nonnenberg
d31d1712b1
Bullet-proofing export scenarios: null attachments, no msgreceiver
FREEBIE
2017-08-28 13:20:53 -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
76a69f7511
Move clear/drawAttention logging up a level to reduce verbosity
FREEBIE
2017-08-28 12:59:08 -07:00
Scott Nonnenberg
f26b9f359c
v0.42.7
- Don't try messages again on subsequent startup if error has been
  shown to the user
- Performance improvement when processing incoming messages
- Workaround for Chrome App icon flashing behavior
- Additional logging when we get delivery receipt for unknown message
- Addition logging to help track down problems with contact sync

FREEBIE
2017-08-25 15:25:21 -07:00
Scott Nonnenberg
bbb12979b3
Fix a few errant jshint problems
FREEBIE
2017-08-25 14:28:05 -07:00
Scott Nonnenberg
9fb079253c Remove errors from the cache when they are shown to the user (#1392)
There's really no reason to retry encryption errors again if they've
already been made user-visible in a conversation.

Also, refactor e->error in background.js onError(), since both e and ev
in this method made it too easy to make a mistake.
2017-08-25 14:24:16 -07:00
Scott Nonnenberg
84fd605ad3 MessageReceiver cache: Don't convert to string for save
Because IndexedDB supports ArrayBuffer natively.

FREEBIE
2017-08-25 13:53:47 -07:00