Commit Graph

296 Commits

Author SHA1 Message Date
Jonathan Rainville 6afe9088e9 fix: show notification if the window isn't focused 2020-12-28 14:29:54 -05:00
Pascal Precht 90dfa94805 refactor: move getProfileImage API to appMain
Prior to this commit, the function was expected on a `chatView` QML object.
This has worked out so far because the places where the API is used were always
living inside `ChatLayout`.

With the new timeline however, this is no longer the case so we have to make sure
that the API is available to other views as well.
2020-12-21 14:15:08 -05:00
Pascal Precht 8a1a265036 fix(StatusUpdate): ensure hover effect is working properly
This commit introduces some `MouseArea`s so components inside the
`StatusUpdate` component cancel it out by having a higher `z`.

Also, in some cases we need to conditionally set the `root.hovered` property
to ensure the values get inverted correctly, otherwise it causes undesired
flicker effects.
2020-12-21 14:14:48 -05:00
emizzle 6a0a75888b feat: whitelist gifs (no url extension needed)
Fixes #1377.
Fixes #1479.

Two sites have been added to the whitelist: giphy.com and tenor.com.

`imageUrls` in its entirety has been removed and instead all links are being handle through the message `linkUrls`. This prevents double-handling of urls that may or may not be images.

The logic to automatically show links previews works like this:
1. If the setting "display chat images" is enabled, all links that *contain* ".png", ".jpg", ".jpeg", ".svg", ".gif" will be automatically shown. If the URL doesn't contain the extension, we are not downloading it. This was meant to be somewhat of a security compromise as we do not want to download each and every link posted in a message just to find out its true content type.
2. If the above setting is *disabled*, then we follow the whitelist settings for tenor and giphy. This allows us to preview gifs that do not have a file extension in their url.

feat: bump status-go to the commit that supports the new whitelist (https://github.com/status-im/status-go/pull/2094), and also lets us get link preview data from urls in the whitelist. NOTE: this commit was branched off status-go `develop`, so once it is merged, and we update this PR to the new commit, we will effectively be getting status-go develop changes. We *could* base that status-go PR off of master if it makes things easier.

fix: height on settings update issue

feat: move date/time of message below links

fix: layout issues when changing setting `neverAskAboutUnfurlingAgain`

feat: Add MessageBorder component to aid in showing rounded corners with different radius
2020-12-21 14:14:32 -05:00
Jonathan Rainville 4f2a1b5e73 fix: fix scroll going back down when hitting images 2020-12-18 15:39:16 -05:00
Jonathan Rainville d01c9fef79 feat: add profile pic support 2020-12-17 16:44:25 -05:00
Michael Bradley, Jr b524c3b423 fix: restore z-index to root Item of ChatText.qml 2020-12-16 09:16:50 -05:00
Pascal Precht 344880b3a3
fix: remove explicit properties in usernamelabel 2020-12-14 14:18:46 +01:00
Pascal Precht 743858837a uiux(StatusUpdate): add separator and fine-tune margins 2020-12-14 12:36:49 +01:00
Pascal Precht 8cd95d5bfd feat: introduce StatusUpdate component
This is a new MessageComponent type that will be used in the timeline status updates
view.
2020-12-14 12:36:49 +01:00
Richard Ramos 4d2e396b7f fix: display transaction data 2020-12-11 14:04:25 -05:00
Richard Ramos a901351e7e fix: chat reply width when content is smaller than author 2020-12-11 13:56:04 -05:00
Richard Ramos 5ad54b057b fix: missing username 2020-12-11 13:47:51 -05:00
emizzle 5953031bfc fix: YouTube unfurling
YouTube link unfurling was not working for a couple reasons.

There were two main parts fixed:
1. QML context for messages pertaining to linkUrls and imageUrls was changed from implicit to explicit. By this, I mean that any time we referenced linkUrls/imageUrls, we were relying on the knowledge that those values would be populated by some parent context several levels up. Now, we are referring to properties that have been explicitly defined on the components. This offers the ability to reuse components, and makes reading the code and debugging much easier.
2. Error handling has been added to getting link preview data. An unhandled "error" was thrown each time a link that wasn't whitelisted was passed in, causing the app to crash. For example, when a link to a tenor gif was posted in the chat, that URL was not whitelisted, causing the app to crash.
2020-12-10 14:45:48 -05:00
Pascal Precht c9f7928956 fix(Usernamelabel): ensure message time is positioned correctly 2020-12-10 12:30:31 +01:00
Pascal Precht e11139df12 feat: make `UserNameLabel` render local nick names and ENS names
In timeline status update messages we want to render the ENS name next to a
local nickname in case it exists. This commit extends the `UsernameLabel` to do
just that.

Closes #1488
2020-12-10 12:30:31 +01:00
Pascal Precht 066fd9f7e5 feat: allow message context menu to render emojis only
Closes #1492
2020-12-10 12:30:31 +01:00
Richard Ramos b0829a4615 fix: account selector in browser 2020-12-09 14:19:26 -05:00
Jonathan Rainville 08a7baed8f feat: add OS notification and setting to switch back 2020-12-09 14:19:16 -05:00
Richard Ramos ae30d04010 refactor: ProfileView 2020-12-08 17:01:22 -05:00
Richard Ramos 426fe504b4 refactor: move `generateIdenticon` to utils 2020-12-08 17:01:14 -05:00
Richard Ramos ae83818eed refactor: chats view
Extract private groups, reactions, stickers and transactions procs to individual view files
2020-12-08 17:01:14 -05:00
hydrogen 3951d0fff5 fix: ensure cursor is changed when hovering a link 2020-12-08 17:00:06 -05:00
Pascal Precht 5e422691e3
chore: remove unnecessary `enabled` prop binding in ChatText connection 2020-12-07 13:15:46 +01:00
Pascal Precht b778fa9c30 refactor(ChatText): move Connection out of component
This is done because there's gonna be a case where this connection causes errors
because the component expects `NormalMessage` to be a parent of this component.

When used in future StatusUpdates, there's no `NormalMessage`. Unfortunately,
disabling the connection based on a condition doesn't remove the error, so we have
to move this code out entirely
2020-12-07 13:06:21 +01:00
hydrogen 4e1f712376 fix: i18n placement caused incorrect reaction authors rendering
I've made a fix to better handle rendering of reaction authors in conjuction with i18n
2020-12-02 14:36:56 -05:00
Richard Ramos 6494427de0 fix: notifications
- If notification is clicked and app minimized, restore app
- If app is minimized, show notifications for active chat
2020-12-01 16:17:19 -04:00
hydrogen ff5b972139 fix: stop crash by showing error message
fix #898

The segmentation fault occured because the RPC response returned json with an error message as oppossed to the usual data required to update the chat. Since the section of the code didn't handle this error message it caused the app to crash. I've handled this error to show an error alert box by emitting a  event
2020-12-01 13:40:49 -05:00
Jonathan Rainville dae7f9cd44 fix: fix ChatImage not opening in the popup 2020-11-27 15:19:20 -05:00
Jonathan Rainville b536707646 fix: fix notification banner showing the pubkey of group chats 2020-11-27 15:15:26 -05:00
Richard Ramos 7c69f8fe52 fix: code review 2020-11-26 13:25:14 -05:00
Richard Ramos 95616e2d10 fix: colors for chat links 2020-11-26 13:25:14 -05:00
Richard Ramos 37aabf57b3 fix: code review 2020-11-26 13:24:53 -05:00
Richard Ramos 0c71ddc888 fix: use opacity gradient and icon for read more/less 2020-11-26 13:24:53 -05:00
Jonathan Rainville 9e8ecd69e9 fix: change chat rectangle width to match designs 2020-11-26 11:43:53 -05:00
Richard Ramos 8890805a14 fix: scroll to bottom when switching back from any module to chat 2020-11-26 11:43:45 -05:00
emizzle 417194e7b4 feat: Keyboard shortcuts
Add keyboard shortcuts according to https://notes.status.im/02cfVf1KQLeQU2SqrIi9tw

fix: update chat message bubbles
- Align emojis to middle of text
- Add line-height as per design
- Properly support RTL languages (right-aligned) and LTR languages (left-aligned)
- Remove unneeded non-breaking space at the beginning of current user messages
- Properly support markdown for bold, strikethrough, and italic
- Fix text being removed when in between strikethrough markdown (~~)

fix: emoji resolution update for high resolution monitors
- Emojis now use the 72x72 original set, but are down-scaled to 20x20 (in chat bubbles) or 22x22 in other places, effectively tripling their pixel density

feat: handle new lines in blockquote

Handle new lines in blockquote so that messages display correctly.

Also, add functionality when a new line is entered in to the chat input, if it's inside a blockquote, a new ">" will be added automatically. This is also handled when backspace is entered.

feat: update xss to support full qt html4 table and table-cell attributes
2020-11-26 11:33:32 -05:00
hydrogen e2ec5fa84e fix: i18n 2020-11-26 11:20:43 -05:00
hydrogen a7936e984d fix: support eliding after 5 authors
fix rightNode subscript
2020-11-26 11:20:43 -05:00
hydrogen 9f6e582111 feat: support seeing who liked a message 2020-11-26 11:20:43 -05:00
hydrogen 2baa55b5c4 feat: add fetch more menu item in the chat drop down menu
fix import

fix extra spaces
2020-11-26 11:20:25 -05:00
emizzle e0e1487643 refactor: replace transaction modal `reset` functionality
The transaction component's `reset` functionality was meant ot reset a form when the modal was closed. It was difficult to manage and added extra overhead for each additional transaction modal created.

Instead of using reset functions, we can use Loaders to load and destroy the modal's as they are opened and closed. We do not need to keep them in memory and then also reset their functions. It creates a smaller memory footprint to destroy the object and reload on open.

feat: load gas prediction prices asynchronously
2020-11-26 11:17:24 -05:00
Pascal Precht 8b74141b99 feat: allow users to change font size for chat messages
Closes #737
2020-11-25 14:41:29 +01:00
Pascal Precht 1277395431 chore: expose linkUrls property on Message QML type 2020-11-25 14:41:29 +01:00
Pascal Precht db0b765d74 feat(Notifications): allow users to turn of notifications for non-contacts
Partially fixes #1280
2020-11-24 11:16:02 +01:00
Jonathan Rainville 447591e9b4 feat: make the message box scale according to the parent's width 2020-11-19 16:57:58 -05:00
Richard Ramos 983fbfd3d4 fix: scroll speed 2020-11-19 16:57:20 -05:00
Jonathan Rainville 1ec28bca01 feat: enable animated gifs but stop them on click and out of focus 2020-11-19 16:55:41 -05:00
Jonathan Rainville 537ae7991b fix: make sure the mention and emoji pickers close when pressing escape 2020-11-19 13:54:17 -05:00
Pascal Precht 47a561daf4 uiux: apply rounded corners to images from image URLs 2020-11-17 12:48:06 -05:00