Daniel Gasienica
f19e6ea93d
Wrap JSX siblings in container
2018-05-08 16:52:01 -04:00
Daniel Gasienica
a8cd0b782e
Rename DocumentListItem::isLast
to shouldShowSeparator
2018-05-08 16:52:01 -04:00
Daniel Gasienica
05f67dc04a
Hide separator for last document list entry
2018-05-08 16:41:07 -04:00
Daniel Gasienica
fd883b2896
Fix LightboxGallery
style guide entry
2018-05-08 16:41:07 -04:00
Daniel Gasienica
bfe7eb7d5e
Consolidate styles
2018-05-08 16:41:07 -04:00
Daniel Gasienica
90329a2764
Display icon for unsupported file formats
...
Still allows users to download media.
2018-05-08 16:41:07 -04:00
Daniel Gasienica
623bdd9284
Port colorSVG
from Sass to TypeScript (React)
2018-05-08 16:41:07 -04:00
Daniel Gasienica
16bc1d34c6
Message schema 6: Change classification of media and documents
...
For an easier implementation, we change our original definition of
`initializeAttachmentMetadata`. This means we have to re-run it marked as
version 6 and mark schema version 5 as deprecated as its definition has changed.
2018-05-08 16:41:07 -04:00
Daniel Gasienica
f4a5bc9907
Add new MIME types
2018-05-08 16:41:06 -04:00
Daniel Gasienica
63bd9dcc61
Add tests for Attachment.isVisualMedia
2018-05-08 16:41:06 -04:00
Daniel Gasienica
53918d68de
Add Attachment.isFile
definition
2018-05-08 16:41:06 -04:00
Daniel Gasienica
20246c4d07
Classify all images and videos as visual media
...
Even if we can’t play it back. Handle that in the lightbox.
Also: Exclude voice messages.
2018-05-08 16:41:06 -04:00
Scott Nonnenberg
0282635142
Remove Object.assign still hanging around in typescript
2018-05-08 09:57:51 -07:00
Scott Nonnenberg
1918a88722
Drop ifTruthy suffix
2018-05-08 09:54:28 -07:00
Scott Nonnenberg
1fd487be3f
Refactor to remove duplicated code, lint/prettier fixes
2018-05-07 19:30:50 -07:00
Scott Nonnenberg
f628df1035
Eliminate arrows in the standalone Lightbox component examples
2018-05-07 19:30:50 -07:00
Scott Nonnenberg
8beeef4d10
Show contact name when you reply to message with a contact
2018-05-07 19:30:50 -07:00
Scott Nonnenberg
9d1847a7e5
Pull all setup in preload.js into signal.js. goal: webpackable
2018-05-07 19:30:49 -07:00
Scott Nonnenberg
30cb673405
Fix style guide for LightboxGallery component
2018-05-07 19:11:37 -07:00
Scott Nonnenberg
37821e5a1b
Wire up all contact behaviors, refactor Contact type/selector
2018-05-07 19:11:35 -07:00
Scott Nonnenberg
41be7f126b
Visuals for embedded contacts as well as contact detail screen
2018-05-07 19:09:55 -07:00
Daniel Gasienica
daa4a3d63f
Compile all protocol buffers
2018-05-07 21:53:40 -04:00
Daniel Gasienica
15759f0db5
Normalize package naming
2018-05-07 21:53:40 -04:00
Daniel Gasienica
f88ebdf8b7
Compile protocol buffers as part of yarn grunt dev
2018-05-07 21:53:40 -04:00
Daniel Gasienica
38f3ad6518
Use SignalService
vs textsecure
for protobuf
2018-05-07 21:53:39 -04:00
Daniel Gasienica
6589247750
Expose SignalService
to style guide
2018-05-07 21:53:39 -04:00
Daniel Gasienica
86346ee239
Expose Signal.Types.Attachment
to style guide
2018-05-07 21:53:39 -04:00
Daniel Gasienica
5789b3eb75
Add Attachment.isVoiceMessage
2018-05-07 21:53:39 -04:00
Daniel Gasienica
fa4c3fda2b
Extract common MIME types
2018-05-07 21:53:39 -04:00
Daniel Gasienica
8a4f062120
Add MIME.APPLICATION_OCTET_STREAM
2018-05-07 21:53:39 -04:00
Daniel Gasienica
5d230d3778
Add Settings.isNotificationGroupingSupported
...
See: https://github.com/electron/electron/issues/11189
2018-05-04 15:37:46 -04:00
Daniel Gasienica
ecf23b6b2e
Disable audio notifications on Windows 7 and lower
2018-05-02 20:01:57 -04:00
Daniel Gasienica
a102016ed8
Port Settings
and OS
to TypeScript
2018-05-02 20:01:57 -04:00
Daniel Gasienica
c591c3ca55
Use native notifications on all platforms
2018-05-02 19:58:33 -04:00
Daniel Gasienica
4e6a03a91c
Log whether OS supports native notifications
2018-05-02 19:18:34 -04:00
Daniel Gasienica
d5b391757d
Add Notifications.getStatus
2018-05-02 19:18:33 -04:00
Scott Nonnenberg
322d307655
Turn on prettier support for markdown files, update all files
2018-05-01 16:06:57 -07:00
Daniel Gasienica
87d374ea78
Remove @prettier
pragmas
2018-04-30 16:53:34 -04:00
Daniel Gasienica
1dd87ad197
Format all source code using Prettier
2018-04-30 16:53:34 -04:00
Scott Nonnenberg
82e2fe93a5
Show 'You' in Android theme quotes instead of contact name ( #2312 )
...
Show 'You' in Android theme quotes instead of contact name
2018-04-30 13:49:19 -07:00
Scott Nonnenberg
c5935eef5d
Show 'You' in Android theme quotes instead of contact name
2018-04-30 12:33:16 -07:00
Daniel Gasienica
fccbf70d57
Pre-process media for LightboxGallery
2018-04-30 11:59:26 -04:00
Daniel Gasienica
110b58230b
Only revoke object URLs we created
2018-04-30 11:01:57 -04:00
Daniel Gasienica
c6599d2e14
Add another permutation of EmptyState
2018-04-30 11:01:00 -04:00
Daniel Gasienica
9ca6fd6498
Center lightbox navigation controls
2018-04-27 16:31:43 -04:00
Daniel Gasienica
fa45656e8e
Wire up media gallery empty state
2018-04-27 16:31:43 -04:00
Daniel Gasienica
4d01264c09
Fix layout of media gallery
2018-04-27 16:31:43 -04:00
Daniel Gasienica
78f15b654d
Add EmptyState
component
2018-04-27 16:31:43 -04:00
Daniel Gasienica
ea49f7a3b6
Implement keyboard navigation for Lightbox
2018-04-27 16:31:43 -04:00
Daniel Gasienica
e1b620602d
Display attachments from disk
2018-04-27 16:31:43 -04:00
Daniel Gasienica
407c77395b
Add explicit boolean
2018-04-27 16:31:43 -04:00
Daniel Gasienica
9451dc5e41
Define AttachmentSchemaVersion3
2018-04-27 16:31:43 -04:00
Daniel Gasienica
21db2e7182
Use saveURLAsFile
2018-04-27 16:31:43 -04:00
Daniel Gasienica
307ab0d3a5
Extract saveURLAsFile
2018-04-27 16:31:43 -04:00
Daniel Gasienica
4c0c55082f
Move navigation controls to the bottom
2018-04-27 16:31:43 -04:00
Daniel Gasienica
fb8d4e2421
Implement basic lightbox with gallery support
2018-04-27 16:31:42 -04:00
Daniel Gasienica
43e19f3b06
Prevent default event on icon button clicks
2018-04-27 16:31:42 -04:00
Daniel Gasienica
b3d0438537
Show hand cursor on media grid items
2018-04-27 16:31:42 -04:00
Daniel Gasienica
45d6c7a5a8
Implement video support in lightbox
2018-04-27 16:31:42 -04:00
Daniel Gasienica
ac04f0648a
Load more documents than media
2018-04-27 16:31:42 -04:00
Daniel Gasienica
6ee56b8445
Remove newlines
2018-04-27 16:31:42 -04:00
Daniel Gasienica
b74b761255
Implement click to save for document list
2018-04-27 16:31:42 -04:00
Daniel Gasienica
8ca5a391af
arrayBufferToObjectURL: Ensure data
is ArrayBuffer
2018-04-27 16:31:42 -04:00
Daniel Gasienica
b27fdd1559
Use pointer
cursor for DocumentListItem
2018-04-27 16:31:42 -04:00
Daniel Gasienica
4a5e61eaf4
Implement Attachment.save
2018-04-27 16:31:42 -04:00
Daniel Gasienica
f8119be97b
Include videos in media gallery
2018-04-27 16:31:42 -04:00
Daniel Gasienica
37d73accde
Show ‘Documents’ tab
2018-04-27 16:31:42 -04:00
Daniel Gasienica
96c44094e3
Implement Conversation.fetchFileAttachments
2018-04-27 16:31:42 -04:00
Scott Nonnenberg
ccf14710a3
styleguide: Make filesize and Signal.Util.GoogleChrome available
2018-04-27 08:51:46 -07:00
Daniel Gasienica
f36f206a01
Use IndexablePresence
for hasFileAttachments
and hasVisualMediaAttachments
...
Reduces index size, makes it easier to debug using IndexedDB inspector, and
hopefully improves lookup performance.
2018-04-25 15:25:12 -04:00
Daniel Gasienica
b65370c8d7
Prefer GoogleChrome.is*
over MIME.is*
2018-04-25 15:25:12 -04:00
Daniel Gasienica
64c3d604aa
Fix type errors
2018-04-25 15:24:52 -04:00
Daniel Gasienica
cd6912f0dd
🎨 Autoformat code
2018-04-25 15:24:52 -04:00
Daniel Gasienica
823a58f98a
Prevent NPE
2018-04-25 15:24:52 -04:00
Daniel Gasienica
96be0df8c7
Show lightbox controls based on presence of handlers
2018-04-25 15:24:52 -04:00
Daniel Gasienica
59650035ec
Use 🇺🇸 spelling
2018-04-25 15:24:52 -04:00
Daniel Gasienica
feff820cd4
Prefer custom styles over strong
2018-04-25 15:24:52 -04:00
Daniel Gasienica
fca8de16c8
Add required Message.id: string
2018-04-25 15:24:52 -04:00
Daniel Gasienica
dd7e51e697
🎨 Fix formatting
2018-04-25 15:24:52 -04:00
Daniel Gasienica
74582de2d1
Clarify naming
2018-04-25 15:24:52 -04:00
Daniel Gasienica
6330a8d9f3
Simplify expression
2018-04-25 15:24:52 -04:00
Daniel Gasienica
f99e6306c3
Simplify withSection
2018-04-25 15:24:52 -04:00
Daniel Gasienica
d98d08a7e0
Remove obsolete TODO
2018-04-25 15:24:52 -04:00
Daniel Gasienica
e97b078088
Use componentWillUnmount
2018-04-25 15:24:52 -04:00
Daniel Gasienica
9abf1f0fcd
Use dash-case
for CSS class names
2018-04-25 15:24:52 -04:00
Daniel Gasienica
2e121310e4
🎨 Fix lint error
2018-04-25 15:24:52 -04:00
Daniel Gasienica
4d04638358
Document changes for MVP
2018-04-25 15:24:52 -04:00
Daniel Gasienica
c3e04ecf87
Remove use of LoadingIndicator
2018-04-25 15:24:52 -04:00
Daniel Gasienica
6d5d0df1c0
🎨 Fix TSLint errors
2018-04-25 15:24:52 -04:00
Daniel Gasienica
8b9516de72
Update test for attachment metadata
2018-04-25 15:24:52 -04:00
Daniel Gasienica
f240269d7b
MVP: Only show images in media gallery
2018-04-25 15:24:51 -04:00
Daniel Gasienica
b4e3749c88
MVP: Only show media tab
...
Until we support showing documents.
2018-04-25 15:24:51 -04:00
Daniel Gasienica
60ed82b728
Show all lightbox controls in style guide
2018-04-25 15:24:51 -04:00
Daniel Gasienica
a7ed21a811
Add shouldShowSaveAsButton
option
2018-04-25 15:24:51 -04:00
Daniel Gasienica
0d676a65b8
Open media gallery item in lightbox
2018-04-25 15:24:51 -04:00
Daniel Gasienica
a9f7f18721
Add ItemClickEvent
2018-04-25 15:24:51 -04:00
Daniel Gasienica
d634a414c3
Make visibility of previous/next buttons opt-in
2018-04-25 15:24:51 -04:00
Daniel Gasienica
142236640e
Click lightbox to close
2018-04-25 15:24:51 -04:00
Daniel Gasienica
ce825fbd66
Rename save
to onSave
2018-04-25 15:24:51 -04:00
Daniel Gasienica
1b9e581e90
Show lightbox image as large as possible
2018-04-25 15:24:51 -04:00
Daniel Gasienica
2cb0b0aeb1
Add arrow controls
2018-04-25 15:24:51 -04:00
Daniel Gasienica
246e0ca87b
Add note about inline styles
2018-04-25 15:24:51 -04:00
Daniel Gasienica
d797ede791
Close lightbox on escape key press
2018-04-25 15:24:51 -04:00
Daniel Gasienica
86da80fd23
Wire up attachment saving
2018-04-25 15:24:51 -04:00
Daniel Gasienica
593976fe21
Extract Backbone Lightbox view module
2018-04-25 15:24:51 -04:00
Daniel Gasienica
2474b42198
Port lightbox icon buttons
2018-04-25 15:24:51 -04:00
Daniel Gasienica
4a5a2cb5c1
Replace Backbone with React lightbox
2018-04-25 15:24:51 -04:00
Daniel Gasienica
cb94d09ef9
Rename media gallery items
2018-04-25 15:24:51 -04:00
Daniel Gasienica
5d0469adef
Skip loading videos into memory for performance
2018-04-25 15:24:51 -04:00
Daniel Gasienica
c6904476f4
Improve IndexableBoolean
type
2018-04-25 15:24:51 -04:00
Daniel Gasienica
809e34b0f4
Load 50 attachments for media gallery
2018-04-25 15:24:51 -04:00
Daniel Gasienica
0a4be2e0f4
Remove unused i18n
2018-04-25 15:24:51 -04:00
Daniel Gasienica
4ce0472b9f
Extract Message.loadWithObjectURL
2018-04-25 15:24:51 -04:00
Daniel Gasienica
45d89d1e44
Create UserMessage
type
...
Describes user visible messages that can have attachments.
2018-04-25 15:24:51 -04:00
Daniel Gasienica
27c4bf90e3
Add Signal.Backbone
2018-04-25 15:24:51 -04:00
Daniel Gasienica
825980fbd1
Add Collection.fetchVisualMediaAttachments
2018-04-25 15:24:51 -04:00
Daniel Gasienica
cad5e417f3
Add arrayBufferToObjectURL
module
2018-04-25 15:24:51 -04:00
Daniel Gasienica
e5d90775d0
Add MapAsync
type definition
2018-04-25 15:24:51 -04:00
Daniel Gasienica
648a7ab1bb
Autoformat using Prettier
2018-04-25 15:24:51 -04:00
Daniel Gasienica
e07458d886
Add basic Backbone type definitions
2018-04-25 15:24:51 -04:00
Daniel Gasienica
9d84b2f420
Index messages with attachments using a boolean
...
When indexing message attachment metadata using numeric indexes such as:
```javascript
{
conversationId: '+12223334455',
received_at: 123,
attachments: […],
numAttachments: 2,
},
{
conversationId: '+12223334455',
received_at: 456,
attachments: [],
numAttachments: 0,
}
{
conversationId: '+12223334455',
received_at: 789,
attachments: [],
numAttachments: 1,
}
```
It creates an index as follows:
```
[conversationId, received_at, numAttachments]
['+12223334455', 123, 2]
['+12223334455', 456, 0]
['+12223334455', 789, 1]
```
This means a query such as…
```
lowerBound: ['+12223334455', 0, 1 ]
upperBound: ['+12223334455', Number.MAX_VALUE, Number.MAX_VALUE]
```
…will return all three original entries because they span the `received_at`
from `0` through `Number.MAX_VALUE`. One workaround is to index booleans using
`1 | undefined` where `1` is included in the index and `undefined` is not, but
that way we lose the ability to query for the `false` value. Instead, we flip
adjust the index to `[conversationId, hasAttachments, received_at]` and can
then query messages with attachments using
```
[conversationId, 1 /* hasAttachments */, 0 /* received_at */]
[conversationId, 1 /* hasAttachments */, Number.MAX_VALUE /* received_at */]
```
2018-04-25 15:24:51 -04:00
Daniel Gasienica
c46e1a1519
Move top-level functions to Signal.Util
2018-04-25 15:24:51 -04:00
Daniel Gasienica
a609c31a57
Style attachment section headers
2018-04-25 15:24:51 -04:00
Daniel Gasienica
ae4c74dd5b
Skip metadata initialization for verified-change
messages
2018-04-25 15:24:51 -04:00
Daniel Gasienica
b0fefdbb98
Implementing grouping messages by date
2018-04-25 15:24:51 -04:00
Daniel Gasienica
424965f876
🎨 Autoformat code
2018-04-25 15:24:51 -04:00
Daniel Gasienica
f367a9b059
Move private
method below public
ones
2018-04-25 15:24:51 -04:00
Daniel Gasienica
3d70e46aea
Calculate dates in UTC
2018-04-25 15:24:51 -04:00
Daniel Gasienica
d7b21ef5dc
Render attachments grouped by date
2018-04-25 15:24:51 -04:00
Daniel Gasienica
e34347f290
Add groupMessagesByDate
2018-04-25 15:24:51 -04:00
Daniel Gasienica
9053b6acfc
Remove unused style
2018-04-25 15:24:51 -04:00
Daniel Gasienica
66516fd36a
Use short format for dates
2018-04-25 15:24:51 -04:00
Daniel Gasienica
923d5ff088
Add missingCaseError
function
2018-04-25 15:24:51 -04:00
Daniel Gasienica
fc1c3aabf5
Add scaffolding for media gallery
2018-04-25 15:24:51 -04:00
Daniel Gasienica
a8be4f2d8d
Expose Lodash in style guide
2018-04-25 15:24:51 -04:00
Daniel Gasienica
94ef3bab80
Move test file
2018-04-25 15:24:50 -04:00
Daniel Gasienica
32a3ef518b
Render media gallery placeholder panel
2018-04-25 15:24:50 -04:00
Daniel Gasienica
f9e4613395
Move TS test for message migration
2018-04-25 15:24:50 -04:00
Daniel Gasienica
867bece952
Add Message.initializeAttachmentMetadata
2018-04-25 15:24:50 -04:00
Daniel Gasienica
c5352cf26c
Separate required from optional Message
keys
2018-04-25 15:24:50 -04:00
Daniel Gasienica
fc12353bb8
Add Attachment.isVisualMedia
2018-04-25 15:24:50 -04:00
Daniel Gasienica
47cc701e72
Add GoogleChrome
module
...
Helps us determine which media we can natively display / play back in Electron.
2018-04-25 15:24:50 -04:00
Daniel Gasienica
6ff82adf0a
Add MIME.isImage
and MIME.isVideo
2018-04-25 15:24:50 -04:00
Daniel Gasienica
df2e6e7864
Port MIME
module to TypeScript
2018-04-25 15:24:50 -04:00
Scott Nonnenberg
ef1d568a80
Restore rendering of group update and end session messages
...
The previous work to refactor bubbles broke rendering for these message
types. :0/
2018-04-23 19:16:00 -07:00
Scott Nonnenberg
fdc13d0af3
Fix some tslint errors
...
I really need to get it running in my editor!
2018-04-20 16:19:53 -07:00
Scott Nonnenberg
bd88407b78
iOS theme: Permanant background to attachment part of bubble
...
(this is to handle a quote making bubble wider, but a narrow image)
2018-04-20 16:02:33 -07:00
Scott Nonnenberg
21713cbce7
Update quotes to render emoji just like normal messages
2018-04-20 15:24:05 -07:00
Scott Nonnenberg
37cac717cb
Use fit: cover for non-square thumbnails, better movie icon
...
Also: Match Android's X button in the quote composition area
2018-04-20 15:23:55 -07:00
Scott Nonnenberg
12257e1560
MessageView: Show menu w/ 'reply to message' on triple-dot click
2018-04-20 15:23:55 -07:00