2023-06-21 20:37:51 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
import AppLayouts.stores 1.0 as AppLayoutsStores
|
2023-06-21 20:37:51 +00:00
|
|
|
import AppLayouts.Profile.views 1.0
|
2024-01-24 16:35:53 +00:00
|
|
|
import AppLayouts.Wallet.stores 1.0
|
2024-03-15 16:03:15 +00:00
|
|
|
import AppLayouts.Profile.stores 1.0
|
2023-06-21 20:37:51 +00:00
|
|
|
import mainui 1.0
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
2023-10-23 11:36:33 +00:00
|
|
|
import shared.stores 1.0
|
2023-06-21 20:37:51 +00:00
|
|
|
|
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
|
2024-01-24 16:35:53 +00:00
|
|
|
readonly property WalletAssetsStore walletAssetStore: WalletAssetsStore {
|
|
|
|
assetsWithFilteredBalances: walletAssetStore.groupedAccountsAssetsModel
|
|
|
|
}
|
|
|
|
|
|
|
|
readonly property var currencyStore: CurrenciesStore {}
|
|
|
|
|
2023-06-21 20:37:51 +00:00
|
|
|
Popups {
|
|
|
|
popupParent: root
|
2024-05-22 08:13:39 +00:00
|
|
|
rootStore: AppLayoutsStores.RootStore
|
2023-10-23 11:36:33 +00:00
|
|
|
communityTokensStore: CommunityTokensStore {}
|
2023-06-21 20:37:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListModel {
|
|
|
|
id: emptyModel
|
|
|
|
}
|
|
|
|
|
2024-02-07 14:56:45 +00:00
|
|
|
CommunitiesModel {
|
2023-06-21 20:37:51 +00:00
|
|
|
id: communitiesModel
|
|
|
|
}
|
|
|
|
|
|
|
|
CommunitiesView {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.preferredHeight: 400
|
|
|
|
|
|
|
|
contentWidth: 664
|
2024-03-15 16:03:15 +00:00
|
|
|
profileSectionStore: ProfileSectionStore {
|
2023-06-21 20:37:51 +00:00
|
|
|
property var communitiesProfileModule: QtObject {
|
|
|
|
function setCommunityMuted(communityId, mutedType) {
|
|
|
|
logs.logEvent("profileSectionStore::communitiesProfileModule::setCommunityMuted", ["communityId", "mutedType"], arguments)
|
|
|
|
}
|
|
|
|
function leaveCommunity(communityId) {
|
|
|
|
logs.logEvent("profileSectionStore::communitiesProfileModule::leaveCommunity", ["communityId"], arguments)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
property var communitiesList: ctrlEmptyView.checked ? emptyModel : communitiesModel
|
|
|
|
}
|
2024-05-22 08:13:39 +00:00
|
|
|
rootStore: AppLayoutsStores.RootStore {
|
2023-12-11 09:47:30 +00:00
|
|
|
function isMyCommunityRequestPending(communityId) {
|
2023-06-21 20:37:51 +00:00
|
|
|
return communityId === "0x0006"
|
|
|
|
}
|
|
|
|
function cancelPendingRequest(communityId) {
|
|
|
|
logs.logEvent("rootStore::cancelPendingRequest", ["communityId"], arguments)
|
|
|
|
}
|
|
|
|
function setActiveCommunity(communityId) {
|
|
|
|
logs.logEvent("rootStore::setActiveCommunity", ["communityId"], arguments)
|
|
|
|
}
|
|
|
|
}
|
2024-01-24 16:35:53 +00:00
|
|
|
currencyStore: currencyStore
|
|
|
|
walletAssetsStore: walletAssetsStore
|
2023-06-21 20:37:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 200
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
|
|
|
Switch {
|
|
|
|
id: ctrlEmptyView
|
|
|
|
text: "No communities"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Views
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/idUoxN7OIW2Jpp3PMJ1Rl8/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop?type=design&node-id=16089-387522&t=HRT9BmZXnl7Lt55Q-0
|