Commit Graph

829 Commits (cb464c630111c0bf40927af02a96f96f82d474d5)

Author SHA1 Message Date
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
lilia 4cd2c03687 Add clock svg style 9 years ago
lilia e809a0cf8b Breakout timer rendering into its own view
Make width and height constant.
9 years ago
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.
9 years ago
lilia 5f92ccd524 Render animated hourglass when messages are expiring 9 years ago
lilia 1383dc141f Ensure that expired messages are removed from the frontend 9 years ago
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.
9 years ago
lilia 5b5a430114 Support i18n with multiple links
We can now pass a variable number of hrefs into i18n_with_links rather
than just one.
9 years ago
lilia 9b645f90c8 Remove Android requirement from install flow
// FREEBIE
9 years ago
lilia b0c59233f3 Add test fixtures
Test page loads fixtures and renders the inbox view. This may be useful
for smoke testing style changes or generating screenshots with
pseudo-realistic data.

Includes a couple small changes to get rendering working outside the
app.
9 years ago
lilia c16e80c5e4 Let key verification view lazy-load keys
// FREEBIE
9 years ago
lilia edd6f58539 Update display when contact colors change
// FREEBIE
9 years ago
lilia 487f75dd27 Fix lint
// FREEBIE
9 years ago
lilia f610233ef6 Add support for syncing blocked numbers
// FREEBIE
9 years ago
lilia 141cdef2a4 Generalize toast view template
// FREEBIE
9 years ago
lilia ff490994ab Render emoji in group name in group updates
// FREEBIE
9 years ago
lilia baff77c509 Revert "Remove Android requirement from install flow"
This reverts commit 4b9f7d518e.
Put this back when iOS desktop support is ready for general release.
9 years ago
lilia 9deaa95e8c Strip unicode null from deviceNames
Not sure how or why but sometimes deviceNames arrive on the server
containing a null char.

// FREEBIE
9 years ago
lilia f042378a37 Upgrade emoji support and switch to apple emoji
Use emojijs for replacing unicode with image tags for display. We were
already using it to replace colons with unicode. Additionally it has
a companion data repo that is kept up to date with images from all
the common image sets.

// FREEBIE
9 years ago
lilia 4b9f7d518e Remove Android requirement from install flow
// FREEBIE
9 years ago
lilia b5191e78c3 More themeing
Restyle message input and welcome screen
Cleanup search, headers

// FREEBIE
9 years ago
lilia 5333f89d9d Fix svg icon colors
// FREEBIE
9 years ago
lilia 6c05a71424 Tune up ios bubble style
// FREEBIE
9 years ago
lilia 8fbb0d05f5 Add settings ui for theme
// FREEBIE
9 years ago
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
9 years ago
lilia 3531667207 Fix closing recorder when clicking away
// FREEBIE
9 years ago
lilia 87f4029210 Fix lint
// FREEBIE
9 years ago
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
9 years ago
lilia b330b80484 Change font size on ctrl+scroll
Fixes #864

// FREEBIE
9 years ago
lilia 9fa7e7f462 Remove unused view
// FREEBIE
9 years ago
lilia 645e05c2b9 Add support for new fingerprint format
This will be ready to roll whenever Android/iOS is.

// FREEBIE
9 years ago
lilia 4f46a164ba Add voice notes
// FREEBIE
9 years ago
lilia 9ab64ec44d Allow localization of month-day format string
The short month-day format ex: 'Aug 8', is not built-in to momentjs, so
we need to localize it.

// FREEBIE
9 years ago
lilia 67c7a06c28 Use momentjs for timestamp localization
Let momentjs handle proper pluralization of relative times. This comes
at the sacrifice of displaying 'minutes' in the conversation list
timestamp rather than 'min'. Note that we don't use moment's fromNow
instance method so as to preserve the rounding logic that matches the
Android client.

// FREEBIE
9 years ago
lilia 4d9b6917d7 Fix timestamp tests
These were failing because chrome's i18n functions aren't available in
test.

// FREEBIE
9 years ago
lilia 688b297050 Move window.chrome reference to chromium.js
// FREEBIE
9 years ago
lilia fed8f62617 Remove untranslatable strings from locale file
// FREEBIE
9 years ago
lilia 6a3a724dc4 Add momentjs locales
// FREEBIE
9 years ago
Benedikt Radtke e836bfd3f7 Added basic localization for timestamps
This commit implements basic localization for the timestamps in conversations and the conversation list.

// FREEBIE
9 years ago
lilia 3a50a892dc Don't sort if already sorted
// FREEBIE
9 years ago
lilia 748215e285 Fix style
// FREEBIE
9 years ago
Benedikt Constantin Radtke 2870c1fff2 Fixed fastforwarding closing videos' fullscreen mode
This commit stops the MessageView from adding the attachment more than once. Previously an attachment was appended to the MessageView every time an update
event was emitted, which happens when forwarding.

// FREEBIE
9 years ago
lilia 8a153e942e Fix lightbox
// FREEBIE
9 years ago
lilia 5bff1d2cab Scope media pausing to the open conversation
// FREEBIE
9 years ago
Benedikt Radtke d5b003a15e Fixed media pausing behaviour when clicking the conversation list
This commit changes the inbox to stop video and audio elements when selecting a new conversation, and to not stop such elements when the same
conversation was selected (fixes #391).

// FREEBIE
9 years ago
lilia f670061669 Pressing escape closes the lightbox
// FREEBIE
9 years ago
lilia a069939f65 Refactor attachment saving for DRYness
// FREEBIE
9 years ago
Benedikt Radtke a1345c52b4 Added Save-As dialog for unsupported filetypes
Despite the "click to save"-description of unsupported file types, clicking them did not save them.
This commit implements a Save-As dialog instead of opening the file in chrome.

// FREEBIE
9 years ago
lilia 9091233950 Open images in a lightbox
Adds file-write permission for saving to disk from lightbox.

Fixes #810

// FREEBIE
9 years ago
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
9 years ago
lilia 3cd80d3f1e Remove tool tip from unregistered user errors
// FREEBIE
9 years ago
lilia 58c3fe047e Make error messages clickable
// FREEBIE
9 years ago
lilia b2f07984df i18n unregistered user errors
// FREEBIE
9 years ago
lilia b6f785737c Restyle error icons, move them outside the bubble 9 years ago
lilia 292260d973 Remove timestamp logging
// FREEBIE
9 years ago
2-4601 d861797d66 i18n 'Permanently delete this conversation?'
// FREEBIE
9 years ago
lilia 1d60dc38fb Rename axolotl storage
// FREEBIE
9 years ago
lilia 1fe5d63015 Update protocol libs
Rename storage functions

// FREEBIE
9 years ago
lilia d5dfffd9da Darken the scrollbar on hover
// FREEBIE
9 years ago
lilia 7b29a567b5 More consistent timestamps
* Apply the same rounding to in message bubbles and conversation list.
  Also make them consistent with Android's relative times. Fixes #682
* Show full timestamps when hovering on relative time
* Compute timestamp update delays more precisely:
  Set timestamps to self-update as soon as they are able to change
  rather than a fixed time since the last update.
* Refactor for customizable/localizable relative times
* Update timestamp tests
* Log timestamp update intervals to help debug #460
9 years ago
lilia 21bfb61b7a Maintain scroll position when textarea resizes
Fixes #770

// FREEBIE
9 years ago
lilia 3ac7552d2f Fix errant change event handler from firing
A change in the text field was firing the previewImages handler.

// FREEBIE
9 years ago
lilia 47320fbbc5 Fix file input bug introduced in 28c602a
Fix bug where clicking the attachment button to select a file would
immediately send any text already entered into the message input.

// FREEBIE
9 years ago
lilia bb2868f1ec Debounce updates to notifications and other events
Wait for one second of silence before displaying new notifications,
updating the unread count and conversation list previews.

Fixes #470
9 years ago
lilia 1f4587795e Add link to github on debug log
// FREEBIE
9 years ago
lilia f3de290f7c Make debug log link focusable/selectable
Add button to open in a new tab. Stye as input group.

// FREEBIE
9 years ago
2-4601 e874b61839 Fix typo of quality argument in image compression
The quality value should be a float in the range 0.0 to 1.0.
Other values (e.g. 50) are discarded silently and a default is used.

Fixes #713

// FREEBIE
9 years ago
lilia 2506b2115d Log when fetching messages
// FREEBIE
9 years ago
lilia 9aa429e18a Add frontend support for expiring releases
When a release expires, it gets a persistent banner notification to
upgrade, and an ephemeral toast warning when trying to send a message.

// FREEBIE
9 years ago
lilia d8d34e7afc Icon upgrade
Also remove unused images.

// FREEBIE
9 years ago
lilia 1aa975e199 Differentiate active vs selected conversation states
// FREEBIE
9 years ago
lilia 8c03d3e088 Fix sorting of the last element
// FREEBIE
9 years ago
lilia 07a0463b65 Fix conversation list self-resorting
When deleting all messages in a conversation, the entry in the left pane
should be inserted into the alphabetical portion of the list. To keep it
in this collection, do not nullify active_at.

To ensure the list view is keeping itself correctly sorted, make sure
that resorting behavior is triggered any time a relevant attribute is
changed.

This fixes deleted conversations jumping to the top of the list, and
conversation order scrambling when getting a group or contact sync
message from our master device.

Fixes #734

// FREEBIE
9 years ago
lilia 76652c2622 Update style and copy on key changes
// FREEBIE
9 years ago
lilia 512c5bf739 Incoming bubbles have sender's color background
// FREEBIE
9 years ago
lilia 5a9358efc9 Reorder object members
Group click events together, put custom events at the bottom.

// FREEBIE
9 years ago
lilia 198cc70cef Remove unusued event handlers
The conversation view now handles displaying and listening to the back
button.

// FREEBIE
9 years ago
lilia 6fe9c3f964 Nest key verification inside conflict dialogs
// FREEBIE
9 years ago
lilia 3901bcb8df Style resend button as an inline link
For messages that failed to send due to network errors, this change
allows retrying them directly from the main conversation view rather
than only from the message detail view.

// FREEBIE
9 years ago
lilia 08da29969c Fix menu behavior
Opening the global menu should close the conversation menu and vice
versa.

// FREEBIE
9 years ago
lilia d24eaa655a Tweak styles on key verification view
// FREEBIE
9 years ago
lilia b57f26bac4 Ignore clicks on the placeholder and its contents
// FREEBIE
9 years ago
lilia d3b035121d Clean up bottom bar styles
// FREEBIE
9 years ago
lilia 234f937bc7 Conversation subscreens share a header
// FREEBIE
9 years ago
lilia d391f07c1e Change right header color
// FREEBIE
9 years ago
lilia a925657c45 Fix global menu close handler
Previously, clicking on a conversation menu would not close the global
menu.

// FREEBIE
9 years ago
lilia b094607e0d Highlight bottom bar when focused
// FREEBIE
9 years ago
lilia 8bb8ed8151 Change left pane header color
// FREEBIE
9 years ago
lilia 7310afd1b4 Replace message list loading spinner with bar
// FREEBIE
9 years ago
lilia 647c2761e0 Move restart button into global menu
// FREEBIE
9 years ago
lilia 18a5ce8e54 Restyle conversation panel
// FREEBIE
9 years ago
lilia 760bfffb50 Show all contacts all the time
Contacts without conversation identity appear in alphabetical order at
the end of the inbox.

// FREEBIE
9 years ago
lilia b4960b29d8 Remove newContact attribute
This was used as a flag by a UI that no longer exists. Now it
erroneously gets saved when creating a conversation from a bare phone
number.

// FREEBIE
9 years ago
lilia 7fb4d3d8aa Load all inbox convos before rendering
This is a better alternative to the fix in 0434c4b, which causes
problems when creating a new conversation from entering a phone number.

// FREEBIE
9 years ago
lilia 0434c4bc53 Fixes #663 Conversation list loads in reverse order
The onChangeActiveAt listener promotes newly activated conversations to
the top of the inbox. By firing on an 'add' event, if the conversation
list happened to load after the inbox frontend was initialized, each new
entry would be incorrectly moved to the top, effectively reversing the
list.

// FREEBIE
9 years ago
lilia 1b72ef6170 Restore notifications heading
// FREEBIE
9 years ago
Blake Griffith 0ceb8e7038 i18n notification's settings dialog
FREEBIE
9 years ago
Blake Griffith 24e4d9c615 'off' -> 'disable notifications' in settings
FREEBIE
9 years ago
lilia 7578991f4e Remove emoji logging
// FREEBIE
9 years ago
Sam Lanning 662020ce68 Add title text for emoji in messages.
Fixes #250

// FREEBIE
9 years ago
lilia e91f646920 Fix initial post-sync timestamps
Fixes #669

// FREEBIE
9 years ago
lilia cc0b8e835a Don't show left groups in list of all contacts
// FREEBIE
9 years ago
lilia ef9559d844 Add tests for filtering left groups from search
// FREEBIE
9 years ago
lilia 7e8ce5eb54 Omit left groups from search
Unless they contain messages.

// FREEBIE
9 years ago
lilia f940676357 Ignore attempts to post empty debug logs
Fixes #697

// FREEBIE
9 years ago
lilia a962d97bfb Fix debug log submission loading UX
This flow broke a bit with transition to modal debug log.

Restructure such that the loading class can be applied to an appropriate
element inside the modal. Ensure that the input elements are hidden when
submit is clicked, the result elements are shown when the log upload is
completed.

// FREEBIE
9 years ago
lilia 7f8c76faca Make debug log as big as possible
Tweak style to make the modal reasonably wide/tall, and use flexbox
to automatically expand the textarea.

// FREEBIE
9 years ago
lilia 636c0f2a60 Put debug log in a modal
Also dedupe close-button style

// FREEBIE
9 years ago
lilia 33fde3d4e7 Dedupe modal styles
// FREEBIE
9 years ago
lilia 74aeddcbda Add missing view file
// FREEBIE
9 years ago
lilia 173e037fa6 Fix minor style errors
And keep it that way, by making jscs config more opinionated.

// FREEBIE
9 years ago
lilia a3c6061480 Add Notification Settings
Fixes #471

// FREEBIE
9 years ago
lilia 4ab2e25df6 Refactor Contact and Conflict views
Untangle these two views into their component parts, consolidating all
the key conflict logic in the key conflict view. Contact view now simply
renders basic contact info and miscellaneous errors but not conflicts or
message errors.

// FREEBIE
9 years ago
lilia 1bd0855d93 Remove duplicate display of network errors
Network errors render as a resend dialogue at the top of the message
detail and need not be re-reported in the contact list or errors
section.

// FREEBIE
9 years ago
lilia f221921127 Tweak conflict style
// FREEBIE
9 years ago
lilia 28c763992a Move error indicators on message bubbles
// FREEBIE
9 years ago
lilia 5340791868 Display key conflict dialog inline
One less modal.

// FREEBIE
9 years ago
lilia ad66da9fb5 Move identity conflicts to top of message detail
Also restyle them as with network errors

// FREEBIE
9 years ago
lilia f5436a5123 Clicking on message status icon opens detail view
Additionally, hovering over it will apply cursor: pointer. Previously
only the timestamp exhibited this behavior.

// FREEBIE
9 years ago
lilia 4198987723 Display a message when provisioning socket fails
Fixes #464

// FREEBIE
9 years ago
lilia 7e82d1295c Handle attachment upload errors
Adds a new kind of replayable error that handles retry of pre-encryption
failures, e.g., attachment upload.

Fixes #485

// FREEBIE
9 years ago
lilia 080c233a93 Add timestamp update interval test
Break out delay computation into its own function and add tests,
including a regression test for #646.

// FREEBIE
9 years ago
codedust 9b390baea0 Fix a bug that causes 100% CPU load in timestamp_view.js
When `millis_since` becomes larger than one week, `delay` becomes
negative and is set to Zero. This causes an infinite loop and therefore
100% CPU usage (single thread).

// FREEBIE
9 years ago
lilia b0def76801 Remove unused code
Well that never worked.

Closes #458

// FREEBIE
9 years ago
Lorenz Hübschle-Schneider e876d8f6ed Display relative timestamps in conversation list
This mimicks Signal-Android's relative timestamps.
Previously, only the date was displayed.

Fixes #284
9 years ago
Sam Lanning 0569d4c889 Replace conversation panel js resizing with flex styling.
// FREEBIE
9 years ago
Sam Lanning c4a9ac94b4 Improve Confirmation Dialog
Some basic modifications to the Confirmation Dialog:
* Always attached to <body> regardless of view that called it.
* Always centered horizontally on screen.
* A black semi-transparent overlay is now displayed over everything, and under
  the dialog.
* Various other style changes.

fixes #389

// FREEBIE
9 years ago
lilia 43071d94d6 Log invalid number inputs
// FREEBIE
9 years ago
lilia 05681ce35b Don't render placeholder markup unless necessary
Rather than always rendering divs for the key and placeholder, render
the placeholder only if the key is missing.

// FREEBIE
9 years ago
jakob 6c7f2cf0fc Show help text for unknown contact identity
Adds a new message string "theirIdentityUnknown".

Fixes #576

// FREEBIE
9 years ago
2-4601 ea0e013e81 Add a trifle of i18n to KeyVerificationView
Two strings were left behind:
- "Their identity (they read)"
- "Your identity (you read)"

I saved them.

// FREEBIE
9 years ago
Sam Lanning ac25b62fdc Improve implementation of i18n for Install Flow following comments on #611
* Move install flow i18n logic to install_view.js (from options.js)
* Switch to using placeholders (instead of jQuery) for i18n messages with html.
* Switch to using moustache template instead of jQuery for i18n substitution.

// FREEBIE
9 years ago
Sam Lanning 0825d3e22f Implement i18n for Install Flow
Fixes #600

// FREEBIE
9 years ago
lilia cdd139b44c Refresh group contacts when rendering member list
Fix #581

// FREEBIE
9 years ago
Felix Epp a65166ae3b Fix #583 from/to label translatable
I just added i18n calls and the corresponding keys for en + de.
9 years ago
lilia ceaf94e05b Rename variable for consistency
// FREEBIE
9 years ago
lilia c6956f81d0 i18n DebugLogView
// FREEBIE
9 years ago
lilia 1d6e391dd6 Prefer single quotes
// FREEBIE
9 years ago
lilia 0e2d2d60c2 i18n KeyConflictDialogue
// FREEBIE
9 years ago
lilia 3172c49436 i18n ContactView
Part of the MessageDetailView

// FREEBIE
9 years ago
lilia d502f1bdee i18n KeyConflictView
Also refactor generic error view to make this simpler.

// FREEBIE
9 years ago
lilia ccdbfc3e12 i18n AttachmentView
// FREEBIE
9 years ago
lilia 47e33a14ac i18n UnsupportedFileTypeToast
// FREEBIE
9 years ago
lilia 42f15011fa i18n FileSizeToast
// FREEBIE
9 years ago
lilia 4066223d72 i18n SocketView
// FREEBIE
9 years ago
lilia 836a7cb8c5 i18n InboxView
// FREEBIE
9 years ago
lilia 85eb5c4d59 i18n KeyVerificationView
// FREEBIE
9 years ago
lilia 95e47dace1 i18n GroupMemberListView
// FREEBIE
9 years ago
lilia 73ea415e95 i18n ConfirmationDialogView
// FREEBIE
9 years ago
lilia ea9fa00658 i18n MessageDetailView
// FREEBIE
9 years ago
lilia 0a43e9e8b2 i18n EndSessionView
// FREEBIE
9 years ago
lilia 02cc6623ea i18n ConversationView
// FREEBIE
9 years ago
lilia d03d6fb7a5 Fix autolinking for urls with non-English characters
Fixes #559

https://url.spec.whatwg.org/#url-code-points

// FREEBIE
9 years ago
lilia 881aa1685d Fix up unsupported attachment rendering
Rather than simply displaying an inactionable error, render a link that
allows the user to save the unsupported attachment.

// FREEBIE
9 years ago
David Baldwynn 8251db6ae6 Added error message for unsupported attachment type (issue #419) 9 years ago
lilia 04359c9184 Remove received_at from message detail on outgoing messages
Only show sent_at for outgoing messages, matching Android.

The received_at timestamp reflects the time a message was saved locally.
It is necessary on both incoming and outgoing messages for sorting
purposes, but can be confusing in the context of an outgoing message
detail view, since users don't think about themselves "receiving" their
own messages, and may even interpret this as the time that a message was
received by their conversation partner's device.

// FREEBIE
9 years ago
lilia ed4015f919 Return early from previewImages for unsupported files
// FREEBIE
9 years ago
lilia fa6d6974ed Discard unsupported files
Fixes #534

// FREEBIE
9 years ago
lilia a137415b7a Fix standalone registration
// FREEBIE
9 years ago
lilia 77caa63321 Normalize views' template fetching pattern
Typically, a view can specify its templateName and then use the default
render method on Whisper.View, except in some special cases like message
view or message detail where other operations are performed during
render.

// FREEBIE
9 years ago
lilia 61a57a753b Provide user feedback when number is invalid
While typing a number, the new contact element is faded out. When the
number becomes valid it is opaque. If the element is clicked while
invalid, it displays 'Invalid number' and waits for the input to change
again. A new conversation is only opened if the number is valid.

// FREEBIE
9 years ago
lilia a258f1a66b Refactor number parsing and validation
Refactor libphonenumber.validateNumber into libphonenumber.parseNumber,
which encapsulates the try-catch pattern used in number parsing and
returns an object of info about the input number rather tha throwing
since we expect to get some invalid number inputs the user is typing.

In the conversation model,
  * Separate phone number validation from search token updating.
  * Perform token update before save if the number was valid.
  * Stop storing unneeded number variants as conversation properties.

// FREEBIE
9 years ago
lilia 7dd0fb70b5 Remove unused code
Here lies the remains of the old compose flow, which must eventually be
restored for group creation flow, but will likely be rewritten entirely.

// FREEBIE
9 years ago
lilia 3d98b54027 Create contact from number with common punctuation
The 'Create new contact' option should now appear for numbers including
parens and other common punctuation.

// FREEBIE
9 years ago
lilia ae52c047bf Clean up open-event logic with new convos and search results
Search view triggers an open event when a valid phone number is entered
and the 'Create new contact' card is clicked.

Inbox view should listen and respond to this event. It should also
disregard select events on the new contact element since those are fired
before phone number validation.

Finally, the search view can stop listening to select events because the
inbox view is already doing so.

// FREEBIE
9 years ago
lilia 0b7742ecd7 Create contact by number with no country code or +
Search box finds or creates a conversation given a phone number in
local (to the user's region) or international format.

Previously you had to enter e164 format to set up the conversation
correctly.

If the number is not valid, do not open the conversation.

TODO: user feedback on invalid numbers.

// FREEBIE
9 years ago
OdysseasKr f2d2e08fa2 Fix code styling 9 years ago
OdysseasKr 652d0963fc Add drag and drop support for text
By adding the drag and drop support for media files, the default
event handlers were overwritten. Thus drag and drop did not support
text. Now, the drag and drop listeners revert to the default behaviour
when the user does not drag a file.

Resolves: #478
9 years ago
OdysseasKr cbbb8dfa24 Add drag and drop for attachments
Files can be dragged and dropped on the bottom in order to be added as
attachments.

Resolves: #260
9 years ago
lilia c1aada4f0f Don't request background page from background page
This file is loaded by the background page, which means it is already
bound to the background page's global context. This was not true at some
time in the distant past but is true now.

// FREEBIE
9 years ago
lilia 85285a1094 Inline a one-line function only used in one place
// FREEBIE
9 years ago
lilia 68f2505996 Display phone number in conversation header
Fixes #436

// FREEBIE
9 years ago
lilia db773dd8a7 Fix selected state transition on firstRun
// FREEBIE
10 years ago
lilia 8d214b73d9 Render conversation placeholder hint in place
// FREEBIE
10 years ago
lilia 891a5e54ad Add hint for users with no groups or contacts
If you have no contacts or groups, display a hint about phone numbers.

// FREEBIE
10 years ago
lilia 7bf94c33d5 Show all contacts when inbox is empty 10 years ago
lilia 152f59cc95 Restyle first run hint
// FREEBIE
10 years ago
lilia d4e0c11ebc Show a hint on startup if the inbox is empty
Fixes #403

// FREEBIE
10 years ago
lilia 50602fb8e5 Remove unnecessary jquery insertion
This element is rendered in place already.

// FREEBIE
10 years ago
lilia 2457d51fd4 Ignore search queries that are all whitespace
// FREEBIE
10 years ago
lilia 73ab95b8a3 Serialize search queries
Fixes #395

// FREEBIE
10 years ago
OdysseasKr 83298b8979 Mark conversation as read if open and window focused
Messages that are received in the active conversation while the window
is focused, are automatically marked as read.

The conversation appears as unread for a split second as the incoming message
arrives but it gets marked as read as soon as the message is displayed.
10 years ago
ody 156c7c3b3d Add unread count in window title
The window title now shows the global number of unread messages as
"Signal (1)". This way the user can see the number of unread messages
in the task bar and when alt-tabbing.

Resolves: #384
10 years ago
lilia 765668b3d3 Clear message collections when the window is closed
We don't need to keep them in memory if we're done viewing them,
plus it avoids having to re-render a large collection when we re-open a
conversation. Now that we only load a sensible number of messages at a
time, caching them between usages is less valuable. Removing them from
the collection should free them for garbage collection.

// FREEBIE
10 years ago