1263 Commits

Author SHA1 Message Date
Jonathan Rainville
aeded149db fix: show community button tooltip on the right
Fixes #2069
2021-03-25 16:57:47 -04:00
Jonathan Rainville
0478a04db9 fix: fix chat time tooltip being too big
Fixes #1946
2021-03-25 16:57:47 -04:00
Jonathan Rainville
012b5dc8a0 fix: fix language list view scrollbar and binding loop 2021-03-25 16:45:56 -04:00
Iuri Matias
3813a1a330 fix language modal 2021-03-25 16:45:56 -04:00
Iuri Matias
5e0da7c1ec updated language modal 2021-03-25 16:45:56 -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
rinzlxr
0abaa61067 fix: typos and switch statement string literals
remove console log

fix last typo
2021-03-25 15:00:13 -04:00
Iuri Matias
857f0ac069 remove various titles from profile sections 2021-03-24 14:45:17 -04:00
Iuri Matias
3d2eaa3369 remove various titles from profile sections 2021-03-24 14:45:17 -04:00
Iuri Matias
4e15002beb hide reactions and replies when the message is a transaction 2021-03-24 14:43:04 -04:00
Jonathan Rainville
686cbc7f54 fix: fix communities not showing the letter identicon correctly 2021-03-24 14:20:47 -04:00
Pascal Precht
c28d4054ef fix(Chat): ensure chat reply separator doesn't leak into message
Fixes #1988
2021-03-24 14:17:43 -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
rinzlxr
47ae3a4c16 ens section fixes
use the available dark image for ens section

add the image, ensure 624 widths and fix button

move common strings to constants and use number consts
2021-03-24 14:09:59 -04:00
Jonathan Rainville
2a9f9118a1 fix: fix settings not being refetched when they had been edited before 2021-03-24 12:06:24 -05:00
Pascal Precht
e1a4a47636 fix(Chat): disable HoverHandler when profile popup or context menu are open
Alright, this is an interesting one:

As described in #1829, when the profile popup is opened within the chat view,
users are still able to click *through* the popup on message, which then puts them in
an active state.

I've done a bunch of debugging as described [here](https://github.com/status-im/status-desktop/issues/1829#issuecomment-804748148) and after doing some
further debugging, I found out that `isMessageActive` isn't really the culprit here.

What causes this effect is the `HoverHandler` that's attached to the `CompactMessage` item.
`HoverHandler` is a standard QML type that emits `hoverChanged` signals so one can do things like
applying hover effects on elements, which is exactly what we do:

```
HoverHandler {
  onHoverChanged: {
    root.isHovered = hovered  // `root` being the message item
  }
}
```

I assume we went with this handler because putting a `MouseArea` in there instead, which fills
the entire message component pretty much eliminates all existing mouse handlers attached to
other child components, such as the profile image or the username of the message, which also
open a message context menu.

It turns out that, having a `HoverHandler` as described above, actually activates it when the
user clicks with the left mouse button as well (not just on hover). That's what causes the "click-through"
effect. This can be verified by setting `acceptedButtons` to `Qt.RightButton`, basically telling
the handler that only right clicks will activate it.

I then tried using `Qt.NoButtons` instead so that no button clicks and only hovers will activate
the handler, but that didn't seem to have any effect at all. It still defaults to `Qt.LeftButton`.

So the last resort was to disable the `HoverHandler` altogether, whenever either the profile popup,
or the message context menu (for emojis etc) is open.

Unfortunately, we don't have access to the profile popup in the compact message component, because it's
detached from the component tree. Therefore, I've introduced a new property `profilePopupOpened` on
the chat layout, which we can read from instead.

Fixes #1829
2021-03-23 10:32:31 -04:00
Pascal Precht
a030a4fadc refactor: make add new contact modal looks the same as new chat modal
Closes #1660 #2086
2021-03-22 15:55:13 -04:00
Pascal Precht
e2113553b9 feat(PrivateChatPopupSearchResults): introduce reset() and config API
This commit introduces a `reset()` function so that search results inside
the application can be easily reset. It also introduces a `resultClickable`
flag which allows consumers of this component to decide whether a search result
is clickable and emits a dedicated event.

This is useful when UIs should only allow actions via the result icon button
(as it's the case with the new add-to-contact modal).
2021-03-22 15:49:47 -04:00
Jonathan Rainville
7fb9578285 feat: highlite mentions in the chat input as well 2021-03-22 15:49:21 -04:00
Pascal Precht
d2b9d54c4b fix: ensure lists and radio button groups look concise throughout app
Fixes #1992
2021-03-19 16:17:14 -04:00
Jonathan Rainville
98ef76d3c8 chore: hide edit community button until the feature is implemented 2021-03-18 14:52:28 -04:00
Pascal Precht
29c7f7b91d uiux(Profile): adjust layout max width of profile sections
Closes #1994
2021-03-18 14:50:58 -04:00
Pascal Precht
010a7e0d8e feat(Communities): open member profile on memberlist click 2021-03-18 14:47:36 -04:00
Pascal Precht
6b6a318a8c
refactor(Communities): make member list look as intended
This change aligns the member list's look & feel of the community profile popup
with the designs by implementing the proper member list items styles, hover effects
and fine-tuning the context menu.

This commit also comments some of the actions provided by the context menu,
which aren't implemented yet. There's no point in having UI components that don't or
can't function.

Those will be re-introduced once they are actually implemented.

Closes #1959
2021-03-18 10:03:24 +01:00
Pascal Precht
b4389402e9
refactor: make use of StatusContextMenuButton 2021-03-18 10:03:08 +01:00
Jonathan Rainville
23a8de0449 fix: fix community not being passed correctly to the invite bubble 2021-03-17 16:09:23 -04:00
Jonathan Rainville
f3b452188a chore: extract join.status link prefixes to Constants 2021-03-17 16:09:23 -04:00
Jonathan Rainville
62d10eba49 feat: show community invite component on community link 2021-03-17 16:09:23 -04:00
Jonathan Rainville
5581fca41d feat: show default unfurling for community links 2021-03-17 16:09:23 -04: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
362ad02ffc
refactor(Communities): make membershipt request button looks as designed
The designs for the membership request button look different now, so this
commit makes use of the `StatusSettingsLineButton` to implement that new
look & feel.
2021-03-17 10:30:19 +01:00
Pascal Precht
38bd5f1422
fix(Communities): remove type error in item width
There's no `parent` in that componen, which results in a QML type error
at runtime.
2021-03-17 10:30:18 +01:00
Pascal Precht
638892f21d
refactor(Communities): use StackView inside profile popup for memberlist
Prior to this commit, the community memberlist was represented in a nested modal
which doesn't adhere to the designs. Rather, the section should render inside the
existing modal, requiring it to be refactored using a `StackView`.

This commit refactors the community profile popup so that the different content
sections ("Overview" and "MemberList") are rendered inside of the popup and can
be pushed onto and popped off a stack view.

The content components (newly introduced in this commit) `CommunityProfilePopupMembersList`
and `CommunityProfilePopupOverview` need to define a `headerTitle`, `headerDescription` and
if needed `imageSource` so they can alter the modal's header.

The same pattern might be used in other places of the modal if required.

Partially fixes #1959
2021-03-17 10:29:31 +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
Jonathan Rainville
9d9b0ab5e6 fix: fix chat link preview modal
Fixes #2001
Fixes icons
Fixes Icon border
Fixes button hover
Fixes list scrolling and overflow
2021-03-16 17:20:12 -04:00
Iuri Matias
9621230e6d update default settings 2021-03-16 16:51:14 -04:00
Iuri Matias
9c404a1047 show browser favourites bar by default 2021-03-16 16:51:14 -04:00
Richard Ramos
4f4a3f1c30 feat: see stickers details when clicking on a sticker 2021-03-16 15:39:52 -04:00
Pascal Precht
8ad9e52abf fix(Communities): render community image in profile popup 2021-03-16 14:57:45 -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
Iuri Matias
e6a3014d9f update description of sign out button 2021-03-16 12:43:37 -04:00
Iuri Matias
3119aebed4 re-add sign out button 2021-03-16 12:43:37 -04:00
Iuri Matias
93668ff75a hide chat mode switch for now and make compact mode the default 2021-03-16 12:43:07 -04:00
Pascal Precht
e725e7982d fix(Communities): properly pass admin state to profile popup
This was hardcoded into `isAdmin` for some reason. It also seems that the
property isn't actually used anywhere in the profile popup, so we might
as well get rid off it.
2021-03-16 12:43:01 -04:00
rinzlxr
410851da33 fix: profile menu seperators
fixes #1991

fix: use secondary color instead
2021-03-16 12:38:17 -04:00
Iuri Matias
3878b8a662 update to beta.7.rc2 2021-03-15 15:05:33 -04:00
Pascal Precht
eefd56dd28 fix(Communities): ensure app remembers hidden community intro banners
Fixes #1960
2021-03-15 14:35:31 -04:00
Pascal Precht
2e710715bc fix(Communities): ensure profile popup is hydrated with correct data
The `communityProfilePopup` relies on the currently `activeCommunity` to
get its data. Unfortunately, once read, even when `chatsModel.setActiveCommunity()`
is called which triggers `activeCommunityChanged`, the data in the popup
won't be updated. The next time one would open a community profile page,
it'd have the data that was previously received from the model.

This commit ensures that the popup is hydrated with the most recent data
by explicitly updating its properties right before it's opened.
2021-03-11 10:41:19 -05:00
Pascal Precht
51c8d86ccc fix(Communities): don't crash on rejoin attempt
Prior to this commit there was a scenario where the application would
crash due a memory bug when attempting to (re)join a community.

The scenario is as follows:

1. User creates or has been invited to community with `ON_REQUEST` permissions
2. User leaves community
3. User decides to rejoin, so she selects the community she's been part
of and hits the "Join" button

At this point Status Desktop would send a new `RequestToJoin` request, as the
community has a corresponding permissions setting.

This would then result in an `already a member` error in status-go, because
status-go checks whether the requestee is already part of the members list of
the community. The error isn't handled inside Status Desktop which causes
a crash because we're trying to access data in memory that doesn't exist.

Why is this happening?

While this might be unexpected, when leaving a community (as done on step 2 of
the mentioned scenario), users don't actually lose membership but simply
"unsubscribe" from all channels in the community in question and their `joined`
flag is set to `false`.

From that point on, re-joininng a community is done by sending a `JoinCommunity`
request (instead of `RequestToJoin`), which will then set the `joined` flag to
`true` and doesn't actually check the membership in the database.

This commit ensures we're calling the right API by checking whether not only
whether the community is needs `ON _REQUEST` permissions, but also whether the
user isn't already a member of it.

Fixes #2017
2021-03-11 10:41:19 -05:00