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.
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.
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
This is needed when accessing the context menu from the timeline status updates.
Previously, it'd only change the active channel because it assumed the user is already
in the chat view. This is no longer the case when in timeline view, so we need to make sure
we first navigate to the chat view.
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.
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
StatusChatInput was relying on the suggestions ListModel, even though there was
no guarantee that it would exist. This is more apparent when using the component
in different context (e.g. Timeline/Status Updates). QML will throw a reference
error in this case.
`StatusChatInput` ideally shouldn't rely on chatsModel and other global
objects at all. Also, when using the component in different places, it can cause
accidental sending of message when testing the component (because all the logic is already
wired up)
We've introduced a bug in https://github.com/status-im/nim-status-client/commit/8fd28dfa where a
non-existing `UnblockContactConfirmationDialog` usage was added.
This commit changes it to be a standard `ConfirmationDialog` to make the application compile
again.
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
This PR is a response to @emizzle's suggested change in PR #1431 . It checks if a user is blocked before exposing certain functionality to the user in a Profile popup. The new unblock button also has a fail-safe unblock confirmation popup
disable the chat input if 1-on-1 chat recipient has been blocked.
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
- Account color is used in list hightlight, separator and tabs
- Popup fields are cleared when opened
- Account color is randomized when popup is opened
- Show scrollbars in asset list if needed
- Show scrollbars in account list if needed
- Fix margin between assets
- Add symbol to asset amounts
- Stop scrolling at element bounds
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
fixes https://github.com/status-im/nim-status-client/issues/1232
This PR repurposes the DownloadView into a Loader component of a browser tab and is displayed when:
1. a new downloads tab is opened or
2. a new tab with the link status://downloads or finally when
3. the ShowAll button has been clicked.
You can open any number of Downloads tabs
When you open a new tab and type in status://downloads the title will remain as 'New Tab'
fix: add localization
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
We were previously displaying an address in the "to" field for TransactionPreview. Instead, this is meant to be a contact view.
- Fix ContactSelector to trigger selectedContactChanged
- Fix RecipientSelector > ContactSelector to trigger resolveEns from outside call to prevent infinite loop from the above fix
- Add alias to pre-selected contact for the Contact view of TransactionPreview
- Add option to change debounce delay so that when values are pre-selected (readonly), there is no delay before resolution.
- Fix missing tx data param in walletModel.estimateGas
BalanceValidator and GasValidator have been moved outside of the TransactionPreview component, because there are some transaction modals that may not need them to be baked in to TransactionPreview. It is useful to have these components on the tx preview step only when we start the process on the preview step.
Fixes#1202
I had to revert the loader changes that switched from/to as it was causes quite a lot of logistical complexity. Instead of using Loaders, we are setting the type of account (account or contact), and it is being displayed appropriately. There is a very slight deviation from the design, however it is consistent with the design for other transaction previews.
feat: add BalanceValidator
Shows an exclamation icon next to the "from" account when the balance for the requested asset is too low.
This is useful when the user starts the transaction wizard on the TransactionPreview step.
fix: SignTransactionModal - set default focused account when none is found
refactor: move token lookup from QML to nim in the toMessage procedure.
fix: 1:1 tx requests - handle case where token contract is not found (ie sending SNT from mainnet and receiving message on testnet)
feat: error checking for building a token transaction
feat: TransactionPreview - add a validation check that disallows continuation if the selected "from" account has insufficient funds
I noticed that the 1:1 chat commands were not able to send token transactions due to "intrinsic gas too low" error. I quickly realised there there were a few components missing, which have been fixed.
*feat: update the 1:1 chat commands transaction modal to allow editing of the from account and network fee*
The TransactionStackGroup was updated slightly to allow manual control of back/next actions.
Fixes#870.
*fix: Create distinct modal transaction actions*
Previously, adding `Connection`s for the `walletModel.transactionWasSent` signal in different dialogs would cause the signal to be handled in the wrong dialog. The solution was to pass a `uuid` from the requesting dialog, and include the `uuid` in the response, so that only requests that were requested from the dialog would be handled.
*fix: update 1:1 translations*
All the translations were not being translated for me. I noticed that they did not exist in the `.ts` translation files either.