Fixes: #11480
* hook up join popup to permission model
* fix chats not being put in the permission model
* make it work with channel permissions as well
---------
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
This commit includes the following changes:
1. Request from backend the messages count in a specific interval as opposed to all messages timestamps in that interval.
2. Update the chart end date before refreshing the data
3. Fix metrics type parsing in community service
4. Fix a bug where the new incoming data was not processed by ChartJs without a hover event on the chart. The fix here is to manually request paint() on model changes.d
Issues found and not handled here:
1. On large communities the backend request can take 3 minutes to complete
2. CPU usage can easily go to 100% when switching chart tabs on large communities. All the requests are processed by the backend.
* feat(Community): Community messaging statistics chart
Close 11152
- Use se `collectCommunityMessageMetrics` for messaging statistics chart
in community overview
* feat(Community): Transfer community metrics with dto objects
* feat: impl simple string-based model for community metrics
* fix(Community): Review fixes and fix for changing community when chat is open
* Update src/app/modules/main/chat_section/controller.nim
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
---------
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
Bump Status GO to support session based activity requests
Transaction module was replaced by activity module,
this change removes the old code.
Details:
- Remove transaction.Item and use the DTO directly
- Replace the still using missing functionality
- Remove old way of fetching transactions in response to the history event
- Use activity filter to provide history for "recents" in Send.
Closes#11339
Also: refactor(communities), moved request to join funcs to communities module
This is needed because we can now request to join from the Import popup
Closes#11242
Adding the export control node popup. The popup is behind an authentication wall.
1. Create ExportControlNodePopup qml
2. Add the popup in storybook
3. Create authentication flow with qml callback to open the popup after authentication
4. Add the popup open action in Global.qml
Fixes#11125
Updates the communities asset and collectibles lists when a new token is deployed.
Also refactors the section module to remove all that code and use the communities token list instead.
Adds community ID to the token list model so that we can show only the global tokens and the tokens from the community are shown in the community
Fixes#10501
The problem was that didn't have access to the updated contact from status-go after banning or unbanning, so we just changed the banned property, but there is more that gets changed in the backend, like `removed` being set to `true` as well.
With this fix, when you unban someone, you go back to a fresh start, as **non** contact, so you need to send a request again. That was the state you got if you restarted the app, so "re-sync" the state with status-go.
Another issue was on the frontend (QML). When banned, and after restarting to get the right state, the unban button would be disabled and the Add contact request button would show, which is not good. We only want to send requests when unbanned.
Fixes#10523
The problem was that the CreateChatView now uses an isolated Chat RootStore, since we can't be sure if the personal chat section will be loaded yet.
To fix that, I created a new store that is only for storing the properties needed for that new chat. That way we are sure that it is created and shared to necessary components.
- do not hardcode width of child elements (impossible to propagate
setting the width from the toplevel/parent component)
- made both the community and non-community chat item look the same and
according to the Figma designs (including margins, scrollbar positions,
spacing etc)
- cleaned up some hardcoded values and dead code
Fixes#10469
Also:
test(suite_communities): Fixed community related tests
- A new intermediate popup is now displayed when user clicks on `Create New Community` button from `Community Portal`.
- Reformulated `tst_communityPermissions` since now it is a default option without the need of activating it from experimental feature's section.
Closes#10115
Implement the UI part of Profile/Settings/Showcase:
- Communities/Accounts/Collectibles/Assets tabs
- drag and drop of items between "hidden" and "in showcase" sections
- ability to set individual items' visibility
- persistency (showcase saved across restarts), not exposed yet due to
missing backend API
Closes#9936
There's a bug that all requests to join a community require the user to
authenticate themselves. This should only be needed for community that
are token permissioned.
This commit fixes it by only performing auth when requesting from the
tokengated community view.
Fixes#10010
Users that request access to community that are token permissioned
need to authenticate and enter their password, so they can reveal
their wallet addresses
- Refactored minting components store access, since some panels were accessing stores directly. Now `CommunitySettingsView` is the single place where stores are accessed.
- Renamed store `CommunitesStore` to `CommunityTokensStore` for handling minting / airdrop actions / request models.
- `NetworkFilter` refactored to prevent direct access to store inside the component.
Closes#9663
This does a few things:
- It integrates with the latest `CommunityTokensMetadata` to access
community specific ERC721 token
- It changes `ChatLayout` such that it conditionally loads either
`ChatView` or `JoinCommunityView`. `JoinCommunityView` has been
specifically designed for token-gated communities
Here's what works (in terms of token permissions):
1. If a community has token permissions and the the current users is not
a member of that community, we show `JoinCommunityView` instead of
`ChatView`
2. Any community token permissions of type "Become member" are listed in
the `JoinCommunityView`
3. There are different types of token critera a permission can have:
ERC20 token, ERC721 token, or ENS (which is also ERC721 but we have
a type for that nonetheless)
Only ERC20 token balances are checked for the known wallet accounts.
This happens every time the known token list has been updated (every
10 min atm).
We still need to add balance checks for any ERC721 tokens and ENS.
4. If token permissions are created, updated or deleted by the community
owner, the `JoinCommunityView` will update in real-time.
You'll also notice that the `Reveal my address and request access`
button will be enabled if any of the token permissions are fulfilled
(only ERC20 at the time being). Clicking that button will not yet send
a request.
This will be done in the next step as part of https://github.com/status-im/status-desktop/issues/9761
So far CP components (views, panels) were accessing stores directly.
Now `CommunitySettingsView` is a single place where stores are accessed.
Other components no longer depend on stores.
Moreover:
- dedicated store `PermissionsStore` created for handling permissions
in a single, separated place
- storybook pages fixed
Closes: #9784
This commit is the first of implementing community permissions.
**It is not implementing the complete feature**, rather does it
introduce the first pieces, such that we can get code reviewed and
merged before it grows too big.
To review these features, please make sure to
1. Enable wallet (Settings -> Advanced -> Wallet toggle)
2. Enable community permissions (Settings -> Advanced -> Community
Permissions toggle)
You'll have to restart the app after doing so.
The commit introduces the following:
**UI, API calls and view models to CRUD community permissions**
After creating a community, the user can go to the community
settings and create new token permissions. The user can also update
and delete existing permissions.
**Asset and collectible view models**
To create community token permissions, users have to select
the token criteria. This commit introduces the `assetsModel` for ERC20
tokens and `collectiblesModel` for `ERC721` tokens.
The latter only supports custom minted community tokens at this point.
**This commit requires:** https://github.com/status-im/status-go/pull/3207