fix(Storybook): update InviteFriendsToCommunityPopup page

This commit is contained in:
Michał Cieślak 2022-11-07 14:14:18 +01:00 committed by Michał
parent 6e705eab2a
commit c21337a02f
3 changed files with 121 additions and 72 deletions

View File

@ -18,6 +18,10 @@ Item {
{colorId: 19, segmentLength: 2}])
}
function isCompressedPubKey() {
return true
}
Component.onCompleted: {
Utils.globalUtilsInst = this
globalUtilsReady = true

View File

@ -13,6 +13,10 @@ Item {
return "compressed"
}
function isCompressedPubKey() {
return true
}
function getColorHashAsJson(publicKey) {
return JSON.stringify([{colorId: 0, segmentLength: 1},
{colorId: 19, segmentLength: 2}])

View File

@ -1,22 +1,45 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import AppLayouts.Chat.popups 1.0
import utils 1.0
import Storybook 1.0
SplitView {
orientation: Qt.Vertical
Logs { id: logs }
property bool globalUtilsReady: false
property bool mainModuleReady: false
Item {
SplitView.fillWidth: true
SplitView.fillHeight: true
Rectangle {
color: 'lightgray'
anchors.fill: parent
}
property bool globalUtilsReady: false
property bool mainModuleReady: false
Button {
anchors.centerIn: parent
text: "Reopen"
onClicked: loader.item.open()
}
QtObject {
function getCompressedPk(publicKey) {
return "compressed"
}
function isCompressedPubKey() {
return true
}
function getColorHashAsJson(publicKey) {
return JSON.stringify([{colorId: 0, segmentLength: 1},
{colorId: 19, segmentLength: 2}])
@ -49,6 +72,7 @@ Item {
}
Loader {
id: loader
active: globalUtilsReady && mainModuleReady
anchors.fill: parent
@ -68,6 +92,13 @@ Item {
}
}
communitySectionModule: QtObject {
function inviteUsersToCommunity() {
logs.logEvent("communitySectionModule::inviteUsersToCommunity",
["keys", "message"], arguments)
}
}
contactsStore: QtObject {
readonly property ListModel myContactsModel: ListModel {
Component.onCompleted: {
@ -94,3 +125,13 @@ Item {
}
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 200
logsView.logText: logs.logText
}
}