Fixes: #2365.
Previously, suggestions for mentions were showing profile pics even for users who were not contacts. Now, profile pics are only shown for those users who are contacts. The user’s identicon is shown otherwise.
fix: user thumbnail not shown when no profile pic
When a user was a contact, but didn’t have a profile pic, an image would not be loaded and a ‘reload’ image would be shown instead. With this PR, if the user is a contact and they do not have a profile pic, their identicon will be shown instead.
Fixes#2448.
Currently, if a wrong password is entered when generating a wallet account, the app will crash due to attempting to decode a `GeneratedAccount ` from an rpc response containing only an error.
With this PR, we are detecting if an error is returned in the response, and if so, raising a StatusGoException. This exception is caught in the call chain, and translated in to a `StatusGoError` which is serialised and sent to the QML view, where it is parsed and displayed as an invalid password error in the input box.
refactor: remove string return values as error messages in wallet model
In the wallet model, we were passing back empty strings for no error, or an error as a string. This is not only confusing, but does not benefit from leaning on the compiler and strong types. One has to read the entire code to understand if a string result is returned when there is no error instead of implicitly being able to understand there is no return type.
To alleviate this, account creation fundtions that do not need to return a value have been changed to a void return type, and raise `StatusGoException` if there is an error encountered. This can be caught in the call chain and used as necessary (ie to pass to QML).
refactor: move invalid password string detection to Utils
Currently, we are reading returned view model values and checking to see if they include a known string from Status Go that means there was an invalid password used. This string was placed in the codebased in mulitple locations.
This PR moves the string check to a Utils function and updates all the references to use the function in Utils.
This commit does a couple of things:
- add StatusQ as a dependency (https://github.com/status-im/StatusQ)
our emerging component library
- updates the rcc generation script to follow symlinks as well
- add qrc:/./StatusQ/src as import path
At the time of creating this commit `StatusQ` provides only the StatusIcon
component, but more will be added in the future.
Fixes#2419
Makes it so the private key is elided by default so you can see it all from the get-go. If you focus the field, the key will "unfurl" and you can copy it manually.
Otherwise. the Copy button will always copy the whole key
Fixes: #2364
The Send Message button click event was erroring due to a refactor that had been done to allow for changing app sections.
This has been updated to follow the current way to change app sections.
fix: “Send Message” button crash in communities
This required switching from communities to normal view.
fix: crash when clicking channel link in community message
When a message in communities contains a link to another channel (ie #otherchannel), the search for this channel needed to be updated to also search for the channel by name, allowing for switching between channels within a community by message link. Additionally, when in a community, if the channel was located in a normal chat, it will switch the view to the normal chat after being found.
Fixes: #2257.
If a user had selected a watch-only address in the wallet, the backend `walletModel.currentAccount` property would also change. When loading a transaction modal, this property was used to set the `selectedAccount` value for the “from” `AccountSelector`, regardless if the account was a watch-only address.
This PR updates the logic for `selectedAccount` such that it will only allow the account to be selected if it is not a watch-only account.
A `StatusIcon` that rotates infinitely and can be used for indicating
pending states.
Usage:
```
StatusLoadingIndicator {
width: 24 // default: 17
height: 24 // default: 17
color: "red" // default: loading asset color
}
```
This also removes `LoadingImage` component from `ui/shared`.
Closes#2360
This introduces a new `StatusIcon` component to the component library,
including various icon assets.
The component can be used to render icons in different colors and rotations.
It's also one of the atomic components that can be used to build other
more complex components like icon buttons.
Usage:
```
StatusIcon {
icon: "arrow-right" // name of asset file in `ui/shared/status/assets/img/icons
width: 24 // default: 24
height 24 // default: 24
color: "red" // default: asset file color
rotation: 0 // default: 0
}
```
Closes#2330
Fixes: #2248.
Add a close button to the seed backup warning banner in the wallet. The banner will reappear upon application restart as long as the seed hasn’t already been backed up (`profileModel.mnemonic.isBackedUp`).
A new .svg with a white outline needed to be added as well because the original “close.svg” had a purple outline, which would show up when the ColorOverlay applied to the close button had an opacity less than 1.0.
The popup to invite friends to communities has so far always been a brand new
popup that's opened on top of possible existing popups.
The design however, expects that the same section should be shown as part
of a wizard-like process inside of the existing community profile overview
popup, when entered from there.
This commit extracts the invite friends popup section into component that
can be reused as stack view, as well as modal content, to implement both
scenarios.
This commit changes a bunch of things related to ui bugs in the community
profile popup. Fixes include:
- Removing the `Delete Community` option since this functionality isn't implemented yet
- Changing the color of the menu item's icons in dark mode to be blue
- Doing the same in the memberlist popup
There's a regression in the application where kicking members from communities
doesn't work anymore. This was due to UI logic being moved to a different model
without updating the corresponding view action.
Fixes#2274
Prior to this commit, only admins of a community could open up the community
profile popup from inside the community. However, normal members should be able
to do so too.
Normal members shouldn't be able to create channels, nor should "leave
channel" be an option of the context menu provided inside of a community.
This commit removes these.
As discussed in https://github.com/status-im/status-desktop/issues/2144#issuecomment-817791172 and https://github.com/status-im/status-desktop/discussions/2145, it's no longer desired
to have different appearance settings across multiple accounts.
Instead, the appearance setting should apply globally to all accounts,
essentially bypassing the individual setting stored in status-go.
This commit introduces a new global setting called `theme` which,
at the time of introducing this commit, can be either:
0 => Light
1 => Dark
2 => System
Because those enum values matches the `AppearanceContainer.Theme` enum,
this commit removes it completely and simply relies on QML's built-in
`Universal.[Light|Dark|System] variants respectively.
Closes#2144
This commit introces global settings that apply across accounts used
inside the application. This is useful when settings like the selected
locale should b the same across all accounts.
Closes#2144
Fixes#2050.
This PR contains changes to fix the name validation for new communities and new channels in communities. In the process of updating this, better validation was also added to both popups (create community and create channel), including the prevention of the "Create" button from being enabled until all form fields were valid.
During this process, it was noticed that the community image cropper was not actually cropping the image *in the preview*. Once the community was created, status-go was successfully cropping the image as the user intended. However, the preview thumbnail prior to creation was not accurately showing the cropped image preview and showing the entire image centred instead. *This is still yet to be fixed.* One solution is to upgrade Qt to `5.15` to take advantage of Image QML's `sourceClipRect`.
There was a bad merge in PR #2225 that caused the QML propery `activeMailserver` in `SyncContainer` to be stripped out. This was causing an error in the console: `qrc:/app/AppLayouts/Profile/Sections/SyncContainer.qml:16: Error: Cannot assign to non-existent property "activeMailserver”`.
This PR adds the property back in and resolves the issue.
Fixes#2143.
Methuselah is the a task manager for long-running tasks. It allows fo registration of workers that will each run in their own thead. Each worker can pass messages to and recieve messages from the main thread.
MailserverWoker was also introduced which moves all mailserver model logic to a MethuselahWorker. All communication to/from the model is done via a MethuselahTask. Results of the task are returned to the main thread by way of `signal_handler`, which calls the QtObject slot specified in the task.
Mailsever also provides a way for the model to emit events inside of the worker. These events are forwarded to the main thread via the `receiveEvent` slot of the `MailserverController`.
Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
When the profile popup is opened inside the contacts list, it doesn't have
a surrounding window context (`Popup` types should usually be used within `ApplicationWindow`
or `Window` components as per https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html).
This is problematic when popup are nested, like it's the case with the
nickname popup that will be instantiated by the profile popup.
With no window context, such nested popup can't be opened by the application.
This commit ensures the profile popup is created with a proper context,
fixing the issue that the nickname popup won't open when visting via
contacts list.
Fixes#2216