Commit Graph

396 Commits

Author SHA1 Message Date
Jonathan Rainville 63bf1be96a fix: fix community button staying active when clicking on a new section
Fixes #2133
2021-03-26 15:25:53 -04:00
Jonathan Rainville e0b8a74e29 fix: fix show tooltip under the version button because of small space 2021-03-25 16:57:47 -04:00
Jonathan Rainville d09f049e77 feat: enable tooltip orientation 2021-03-25 16:57:47 -04:00
Eric Mastro 2336aa4e6f fix: custom token validation for non-token addresses
When contract addresses that are not ERC-20 or ERC-721 were input, the token would be allowed to be added and would crash the app.

In addition, when an ERC-20 contract was deployed without a name and symbol, “Invalid ERC-20 address” would appear.

This PR adds error checking from the token detail lookup and reports the error back to the user in the modal. This prevents non-ERC-20/721 contracts from being able to be added to the app and prevents a crash.
2021-03-25 15:52:02 -04:00
Pascal Precht 42e3444731 fix(StatusChatInput): fix text area alignment so it doesn't jump
There was a UI bug in the StatusChatInput where, only in the timeline view,
the scrollview wrapping the textarea would have a weird behaviour in which
it would render the visible text(placeholder) *lower* than how it's actually
positioned. Once the textarea is clicked, it would re-adjust with a smooth
scroll.

Obviously this is undesired behaviour as the text should always render in the
correct position.

This commit finally fixes this weird behaviour by moving the dynamic height
calculation to the wrapping Rectangle and changing the textarea's top- and
bottom paddings dynamically.

Fixes #2018
2021-03-24 14:35:30 -04:00
Jonathan Rainville 7188579e46 fix: fix mention showing as pubkey and show styling 2021-03-24 14:16:55 -04:00
Jonathan Rainville 5d67a3f5f9 fix: fix sending three word names mentions not working 2021-03-24 14:16:55 -04:00
Jonathan Rainville 7fb9578285 feat: highlite mentions in the chat input as well 2021-03-22 15:49:21 -04:00
Pascal Precht a27f9cf25d fix(StatusRadioButtonRow): ensure checked state is propagated properly
There were cases in which this component was used and its `checked` state wasn't
properly emitted to the underlying component.

This commit fixes that by ensuring the `MouseArea` only alters the radio button's
`checked` state and let the radio button handle the event propagation.
2021-03-19 16:17:14 -04:00
Pascal Precht accf92be2f fix(Separator): ensure custom color works as expected
This was a regression introduced in https://github.com/status-im/status-desktop/pull/2065.
The new wrapping Rectangle would get the color that is possibily passed down
to Separator. Instead it should get properly bound to the actual separator.
2021-03-19 15:54:27 -04:00
Pascal Precht 05a8303d5b
feat(PopupMenu): introduce `danger` type for actions
This is needed so that "dangerous" actions, such as deleting data
or removing users from groups etc, can get a dedicated hover color as well.
2021-03-18 10:03:19 +01:00
Pascal Precht f497091c3e
feat: introduce new StatusContextMenuButton component
We've been implementing such a button in various ways throughout the
application. Sometimes using SVG icons and rectangles, sometimes highjacking
`StyledText` components (which was clever though).

Obviously this resulted in inconsistencies, so this commit introduces
a new dedicated component to render the three-dots button for context menus.
2021-03-18 10:03:04 +01:00
Pascal Precht d46be4f740 feat(Separator): enabled custom separator height
Sometimes, `Separator` is used inside context menus to separate groups
of actions that belong together. The separator in itself doesn't have any
padding or margins in this case because the just gets transcluded as is
in the context menu, between menu items.
There are cases in the design where a padding/margin is desired though.

This change makes that possible by wrapping the separator `Rectangle` with
another `Rectangle` which controls a custom height (if desired). The inner
rectangle is then just always vertically center.

In practice this means, existing usages of `Separator` behave exactly the same,
they don't break. In addtion one can set `Separator { height: x }` while maintaining
a 1px separator line.
2021-03-18 09:37:13 +01:00
Pascal Precht 907fbc21b8 fix(Chat): don't render "Copy Link" menu item if not desired
This adjust the rules to render the copy link menu item so that it aligns
with what has been mentioned in #1943.

Fixes #1943
2021-03-17 15:28:12 -04:00
Pascal Precht ea39ead64b
feat(StatusSettingsLineButton): make some of the component's props configurable
This helps with using this component in other places where the default
settings for some UI related properties don't match otherwise.
2021-03-17 10:30:19 +01:00
Jonathan Rainville b9594591b0 fix: fix a lot of issues relative to dark theme
Fixes #1997
2021-03-16 17:22:58 -04:00
Iuri Matias 5cef8e3e60 adjust content height of sticker popup 2021-03-16 15:39:52 -04:00
Richard Ramos 4f4a3f1c30 feat: see stickers details when clicking on a sticker 2021-03-16 15:39:52 -04:00
Pascal Precht 79338f76be feat(ModalPopup): hide footer section if footerContent height is 0
In the recent past we've improved our `ModalPopup` to allow for a bit more control
when it comes to rendering a modal footer section with call-to-action items.

The footer section is rendered when there's `footerContent` and when the height
of the footer content is > 0. This means it's possible to also hide the footer content
section from the modal, even when there's footer content children.

However, there's a separator rendered whenver the footer is visible, regardless of its
height. This results in undesired behaviour when rendering footer children of height 0.

To avoid this, this commit adjust the condition so that the separator is only rendered
when the footer visible AND the height of it is > 0.
2021-03-16 14:29:36 -04:00
Eric Mastro f1e83f74bc feat: drag and drop images
Allow up to 5 images to be dragged and dropped in to one-on-one chats and in the timeline. Can be combined with the existing upload button. The upload file dialog has been changed to allow multiple selections. Drag and dropped images adhere to the following rules, with corresponding validations messages:
- Max 5 image
- Image size must be 0.5 MB or less
- File extension must be one of [".png", ".jpg", ".jpeg", ".heif", "tif", ".tiff"]

Drag and drop and uploaded images are now also deduplicated.
2021-03-16 13:51:37 -04:00
Pascal Precht 01d3369c64 fix(Communities): fallback to letter identicon if no image available
Prior to this commit, communities without an image would render invisible
in the navigation bar of the application. To avoid this, we're now falling
back to our StatusLetterIdenticon component, which renders the first letter
of the community name with the color of the community.
2021-03-11 10:00:05 -05:00
Richard Ramos 6a51d80832 fix: use SVGs in emoji popup 2021-03-08 14:10:58 -05:00
Jonathan Rainville 44c9f480c2 feat: set profile and community image cropper to 1:1 ratio 2021-03-05 14:01:30 -05:00
Jonathan Rainville 07d36cc9f6 feat: make image cropper receive a ratio that it needs to respect 2021-03-05 14:01:30 -05:00
Richard Ramos 9749fe4938 fix: remove svg hack 2021-03-05 09:36:50 -05:00
Pascal Precht e6f17fdf55 uiux(StatusChatInput): highlight matching formatting option
This will highlight any option in the text formatting menu whose
formatting matches the selected text formatting

Closes #1931
2021-03-04 08:57:43 -05:00
Jonathan Rainville 7e8dc8c5d1 fix: fix community channels not showing the right type
Fixes #1954
2021-03-03 16:45:23 -05:00
Jonathan Rainville 84034d5dbf fix: fix channel color in communities 2021-03-03 16:45:23 -05:00
Jonathan Rainville 64d38b6049 feat: implement redesign of communities on the left tab 2021-03-03 16:45:23 -05:00
Jonathan Rainville a47847b40f fix: fix community profile looks and style 2021-03-03 16:45:23 -05:00
Jonathan Rainville 6213e020a0 feat: new design for export popup 2021-03-03 16:45:23 -05:00
Jonathan Rainville f9817d4f52 feat: add community requests, permissions, ENS and more 2021-03-03 16:45:23 -05:00
Pascal Precht 6603f025c3 fix(StatusChatInput): exclude markdown indicators from formatting
Closes #1928
2021-03-03 15:42:42 -05:00
Pascal Precht ed0b9ec1d6 uiux(StatusChatInput): close text format menu on deletion
Closes #1932
2021-03-03 13:30:57 -05:00
Richard Ramos 608455f563 fix: improve qml bottlenecks 2021-03-01 14:17:26 -05:00
ace-smart 604200639b Fixed copy button of the invite link in dark mode. Fixes #1913 2021-02-25 15:43:37 -05:00
ace-smart 4c31a97db8 Fixed wrong color issue of the wallet layout. Fixes #1903 2021-02-25 15:43:14 -05:00
Pascal Precht 84806ee96c feat(MessageContextMenu): add copy link actions
This commit adds a menu item to the message context menu to
copy links that may exist inside of a message.

There are three possible scenarios:

1. There's no link in the message, which causes the menu to not
render the dedicated menu item at all
2. There's one link in the message, which renders an additional
`Action` with a copy-to-clipboard functionality
3. There are multiple links in a single message. This adds a
nested `PopupMenu` in the existing menu with menu items for each
link extracted from the message

To make this work there were some changes in the `PopupMenu` component
needed, as it wasn't take the sub menu's `enabled` state into account
properly. This makde it always render nested menus even when they
should've been invisible.

Closes: #1733
2021-02-23 08:53:54 -05:00
Richard Ramos 750371a3f8 fix: don't estimate gas before when displaying sticker packs
Fixes: #1728
2021-02-22 17:31:17 -05:00
Richard Ramos 6207c8af53 fix: appSettings were being overwritten due to defaultAppSettings periodically executing sync() 2021-02-18 16:40:21 -05:00
Pascal Precht 10636c2460 feat(StatusChatInput): render formatted text inside input
Closes #1796
2021-02-18 16:37:36 -05:00
Jonathan Rainville 46412204c5 feat: implement new colors for dark mode 2021-02-18 15:24:12 -05:00
Jonathan Rainville 0e699cac65 chore: run translation scripts 2021-02-18 15:23:58 -05:00
Pascal Precht 96c2f123b4 feat(StatusChatInput): make text input formatting work via shortcuts
Closes #1803
2021-02-15 16:22:16 -05:00
Pascal Precht 6c272dddf6 feat(StatusChatInput): introduce context menu to format message
Closes #1804
2021-02-12 14:44:47 -05:00
Richard Ramos 58e9584984 fix: make mentions with nicknames work the same as mobile 2021-02-12 14:39:34 -05:00
Richard Ramos f84c96752b fix: code review 2021-02-10 13:52:25 -05:00
Richard Ramos 9cb7573189 fix: loading indicator for sticker market
Fixes #1729
2021-02-10 13:52:25 -05:00
Pascal Precht 040b2020dd fix: ensure application uses correct system tray icon when bootstrapping
This commit checks on bootstrap what the currently configured theme
of the user is and loads the system tray icon in its corresponding
variation.

Unfortunately, MacOS doesn't seem to automatically swap out the icons
based on the system's theme, so we have to do it manually with two
different SVG files.

Another gotcha here is that, it doesn't seem to be possible to change
the system tray icon at runtime. When trying to reassign the `icon.source`
based on a newly selected theme, the icon disappears altogether.
The application also doesn't get notified when a user switches the theme
inside the operating system, requiring her to switch to the same theme
manually unless restarted.

Last but not least, using SVG files instead of PNG doesn't seem to solve
the problem that the icon is rendered blurry. I've looked in the docs
but there doesn't seem to be an option to have any influence on that...
2021-02-10 13:40:41 -05:00
ace-smart 0c65551b45 Limited StatusToolTip width for maxWidth. Fixes #1817 2021-02-10 13:37:02 -05:00