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>
- It adds proxy of wallet accounts only in a single place (wallet root store) and pass the tuned model through the rest of views.
- It updates `storybook` accordingly.
Closes#11829
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
- display an info box when in wallet testnet mode with a CTA to disable
it (functionality enabled for production builds only)
- the CTA can be tested/seen via OverviewSettingsPanelPage storybook page
Closes#11468
- Renamed main `CommunitiesPortal` folder to `Communities`.
- Created new `layouts` folder.
- Moved layout files from chat to communities.
- Created new `helpers` folder.
- Moved helpers files from chat to communities.
- Moved `controls/community` files from chat to communities `controls`.
- Moved `panels/communities` files from chat to communities `panels`.
- Moved `popups/community` files from chat to communities `popups`.
- Moved `views/community` files from chat to communities `views`.
- Moved `CommunityBanner` file from shared to `Communities/controls`. Only used in communities context.
- Moved `CommunitySettingsView` and `CommunityColumnView` files from chat to communities `views`.
- Moved `PermissionsStore.qml` file to `shared/stores`.
- Updated imports.
- Updated storybook.
Part of #6204
- differentiate between "Close" and "Leave" a community where the former
applies to spectated communities
- move the "leave community" confirmation popup to a shared place
(Popups.qml), extend it with the outro message and reuse it everywhere
- don't let admins leave a community
- some minor cleanups and dead code removals
Fixes#10963
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.
- CommunitiesPortalLayout was the last piece still unconditionally loaded
on startup -> fixed
- extract the `communitiesStore` into AppMain to be able to reuse it from
other components
- move the import/create community dialogs to `Popups` (reusability)
- cleanup and remove some dead code, fix warnings
Iterates #6204
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
Also add handlers to JoinCommunityView for requesting and cancelling
requests. These will be extended in follow up commits to included
authentication modals
- 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
Prior to this change `ChatLayout` exposed `chatView` which let other
components access it, its properties and signals.
This is problematic as we need to be able to swap out the `ChatView`
with the `JoinCommunityView` for token gated communities, in which case
there won't be an instance of `chatView`.
This commit ensures that we rely purely on inputs and outputs of the
component, without exposing the component instance itself.
... doesn't work in the community section
Extract the `Chat.RootStore` as a toplevel/shared property and pass it
down to ChatLayouts, instead of cross referencing it between different
components. This was also problematic since the ChatLayouts now live
inside a Loader, so it's more appropriate to refer to the
`Chat.RootStore` directly, instead of
`personalChatLayoutLoader.item.rootStore`, since the
`personalChatLayoutLoader.item` might not be visible (due to it being
inside a Loader and a StackLayout) or it might even be a different
component (`loadingStateComponent` or `errorStateComponent`).
This also caused similar problems for other components, such as
ActivityCenterPopup or StatusStickersPopup.
Fixes#9513
- all remaining global popup components moved into a separate Popups
entity
- removed some static objects from the Global singleton (appMain,
pinnedMessagesPopup, communityProfilePopup, sounds); rationale:
singletons should not contain any state
- fixed support for popups in storybook
- fixed some warnings (most of them broke the popups in one way or the other)
Don't show members in public chat
Show members in communities by default
Enable Gif Widget by default and remove settings entry
Enable Online users by default and remove settings entry
fixes#4906