Commit graph

60 commits

Author SHA1 Message Date
lilia
6c53605dfd Flag voice note attachment protos as such
// FREEBIE
2017-05-12 09:55:15 -07:00
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.
2017-05-01 11:00:10 -07:00
lilia
7a8f2f0fec Allow sending arbitrary files 2017-05-01 09:58:03 -07:00
lilia
27a1c9f18a Populate attachment file size
// FREEBIE
2017-04-18 12:08:37 -07:00
lilia
fc514aa96f Add support for attachment file names
Send, receive, and save attachment filenames. Use them as suggested
names when saving files.

// FREEBIE
2017-04-18 11:48:56 -07:00
haffenloher
e8de2f0c52 Increase image constraints to 6 MB / 4096 px
Matches WhisperSystems/Signal-Android@d2be49af

Closes #1055

// FREEBIE
2017-02-08 17:05:33 -08:00
beejaygee
76c165a10a Add copy and paste for images
Switch comparison operator to ===

Move to stricter parsing of clipboard items
2017-02-07 19:26:09 +08:00
Bernhard Steindl
e2cb45c1da Push picture max edge to 2048 and max size to 4 MB
Closes #1032 and catches up with Android
2017-01-25 20:40:25 -08:00
lilia
4f46a164ba Add voice notes
// FREEBIE
2016-08-23 16:16:31 -07:00
lilia
3ac7552d2f Fix errant change event handler from firing
A change in the text field was firing the previewImages handler.

// FREEBIE
2016-04-18 19:15:36 -07:00
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
2016-04-15 14:40:40 -07:00
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
2016-04-09 14:17:47 -07:00
lilia
d8d34e7afc Icon upgrade
Also remove unused images.

// FREEBIE
2016-04-01 13:59:57 -07:00
lilia
173e037fa6 Fix minor style errors
And keep it that way, by making jscs config more opinionated.

// FREEBIE
2016-02-18 13:45:22 -08:00
lilia
47e33a14ac i18n UnsupportedFileTypeToast
// FREEBIE
2016-01-02 02:51:24 -08:00
lilia
42f15011fa i18n FileSizeToast
// FREEBIE
2016-01-02 02:51:24 -08:00
lilia
ed4015f919 Return early from previewImages for unsupported files
// FREEBIE
2015-12-20 22:16:54 -08:00
lilia
fa6d6974ed Discard unsupported files
Fixes #534

// FREEBIE
2015-12-20 22:14:39 -08:00
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
2015-12-09 18:58:52 -08:00
OdysseasKr
f2d2e08fa2 Fix code styling 2015-12-09 18:57:50 -08:00
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
2015-12-09 18:57:50 -08:00
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
2015-12-07 15:32:14 -08:00
lilia
78a2b74297 Restyle attachment previews
Closes #380

// FREEBIE
2015-10-29 18:19:51 -07:00
lilia
fe2b152186 Change target for appending file previews
// FREEBIE
2015-10-29 11:04:21 -07:00
lilia
9011a85b56 Change selector for opening a file input
// FREEBIE
2015-10-29 10:58:28 -07:00
Deirdre Connolly
861bc416e6 Update attachment size limits to match mobile clients
Per WhisperSystems/TextSecure@8a1428e, bump GIF limit to 5MB, and
audio/video limit to 100MB. Update toast to notify in correct
human-readable units. The only kB size limit is for images, and will
trigger only if after scaling up to 4 times, the rescaled image did not
come in under the size limit without unacceptable quality loss.

Closes #354
2015-10-20 12:29:52 -07:00
lilia
36ec4300cf Fix broken group avatar preview
Fixes #355

// FREEBIE
2015-09-16 12:29:16 -07:00
lilia
f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
2015-09-07 14:58:42 -07:00
lilia
5925c2fe84 Support for group sync
Protocol and handling is all analogous to contact sync: Multiple
GroupDetails structs are packed into a single attachment blob and parsed
on our end. We don't display the synced groups in the conversation list
until a new message is sent to one of them.

// FREEBIE
2015-06-25 13:24:32 -07:00
lilia
583fb98cce Support late-addition of default image to file input
Fixes #256

// FREEBIE
2015-06-05 11:23:03 -07:00
lilia
f4a206b266 Scale and crop avatars to 256 square thumbnails.
Fixes #213 // FREEBIE
2015-06-04 14:46:16 -07:00
lilia
590deef063 Decrease auto-scaling size
For better consistency with Android, autoscale images such that the
largest dimension is 1280. Related: #242
2015-05-27 16:53:04 -07:00
lilia
53a9ab4834 Fix bugs with handling large image attachments
* Avoid infinite loop scaling too-big images
* Don't crash if no file is selected
* Fix file size toast

Fixes #242

// FREEBIE
2015-05-25 10:43:35 -07:00
lilia
d8f17f9631 Fixes #240
Delete files attached via chrome.fileSystem

// FREEBIE
2015-05-24 16:03:13 -07:00
lilia
d0a529351c Fix sending messages with no attachments 2015-05-21 19:01:37 -07:00
lilia
5d3a2a4cc8 Fix file inputs
As a chrome app we are obligated to use the fileSystem api, and must do
so via the window in which we want to open the dialog.
2015-05-21 18:19:10 -07:00
lilia
5d4298697c Use view.$ shorthand for scoped jquery searches
Wish I'd noticed that one earlier. http://backbonejs.org/#View-dollar
2015-03-29 16:29:05 -07:00
lilia
4bd46f80e7 Allow empty group avatar file input 2015-03-23 19:24:26 -07:00
lilia
69d5a6a33c Improve group update ui/ux
Promote group update to its own screen. Add typeahead contact selector
from new conversation view. Restyle to match android (more or less).

Closes #186
2015-03-13 17:33:02 -07:00
lilia
f1309b71c1 Don't scale or compress gifs
If a gif is too large, it's too large.

Fixes #196
2015-03-11 20:20:54 -07:00
lilia
2ee34343a8 Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
lilia
7c9ad975bb Unravel image processing recursion and fix bugs
Although I find the previous implementation more elegant, it results in
a deeper nesting of Promises than necessary, which can make debugging
more complicated. The canvas scaling and compression apis are actually
synchronous, so the callback structure isn't really recessary here.
Converting to a loop also makes this process easier to understand at
a glance.

Fixed some bugs along the way:
* accidentally scaling small images up to 1920px
* jpeg compressing gifs and other formats even if unnecessary
2015-03-04 18:43:38 -08:00
lilia
0da04632f2 Scale large images even if they are small
Previously we would not scale large resolution images with small file
sizes, but in fact, both resolution and file size constraints should be
enforced.
2015-03-04 16:07:02 -08:00
lilia
8bc77fa02b Automatically compress and scale large images
Do nothing to other file types. Continue to block files that are too
large even after scaling and compression.
2015-03-04 13:59:30 -08:00
lilia
1311f7c9ae Fix attachment previews for audio/video files 2015-03-02 18:27:14 -08:00
lilia
6fe262ceed Lazy init file input's FileReader 2015-03-02 18:01:59 -08:00
lilia
db7dee9a8a Fixup file size warning
Add contentType-specific limits, switch to lazy-init iff we encounter an
oversized file, and restyle as a toast, factoring out a generic
ToastView along the way.
2015-03-02 17:50:03 -08:00
lilia
aa659877be Fix broken file input view 2015-03-02 15:35:04 -08:00
lilia
ec43a0b633 jshint all the things
Small style fixes here and there. Removed one unused file.
2015-02-19 00:22:23 -08:00
lilia
746e6530b9 WIP pill view for selected recipients 2015-02-12 13:21:16 -08:00