2024-05-22 08:13:39 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
2022-10-25 08:24:47 +00:00
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.panels 1.0
|
2024-05-22 08:13:39 +00:00
|
|
|
import AppLayouts.Profile.stores 1.0 as ProfileStores
|
|
|
|
import AppLayouts.stores 1.0 as AppLayoutStores
|
|
|
|
|
2022-10-25 08:24:47 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
property bool globalUtilsReady: false
|
|
|
|
property bool mainModuleReady: false
|
|
|
|
|
|
|
|
QtObject {
|
2022-11-08 11:37:25 +00:00
|
|
|
function isCompressedPubKey(publicKey) {
|
|
|
|
return true
|
2022-10-25 08:24:47 +00:00
|
|
|
}
|
|
|
|
|
2022-11-08 11:37:25 +00:00
|
|
|
function getCompressedPk(publicKey) { return "zx3sh" + publicKey }
|
|
|
|
|
2022-10-25 08:24:47 +00:00
|
|
|
function getColorHashAsJson(publicKey) {
|
|
|
|
return JSON.stringify([{colorId: 0, segmentLength: 1},
|
|
|
|
{colorId: 19, segmentLength: 2}])
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
Utils.globalUtilsInst = this
|
|
|
|
globalUtilsReady = true
|
|
|
|
|
|
|
|
}
|
|
|
|
Component.onDestruction: {
|
|
|
|
globalUtilsReady = false
|
|
|
|
Utils.globalUtilsInst = {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
function getContactDetailsAsJson() {
|
|
|
|
return JSON.stringify({})
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
mainModuleReady = true
|
|
|
|
Utils.mainModuleInst = this
|
|
|
|
}
|
|
|
|
Component.onDestruction: {
|
|
|
|
mainModuleReady = false
|
|
|
|
Utils.mainModuleInst = {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Frame {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
active: globalUtilsReady && mainModuleReady
|
2023-06-26 11:48:45 +00:00
|
|
|
sourceComponent: ProfilePopupInviteFriendsPanel {
|
2022-10-25 08:24:47 +00:00
|
|
|
id: panel
|
|
|
|
|
|
|
|
community: ({ id: "communityId" })
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
rootStore: AppLayoutStores.RootStore {
|
2022-10-25 08:24:47 +00:00
|
|
|
function communityHasMember(communityId, pubKey) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
contactsStore: ProfileStores.ContactsStore {
|
2022-10-25 08:24:47 +00:00
|
|
|
readonly property ListModel myContactsModel: ListModel {
|
|
|
|
Component.onCompleted: {
|
|
|
|
const keys = []
|
|
|
|
|
|
|
|
for (let i = 0; i < 20; i++) {
|
|
|
|
const key = `pub_key_${i}`
|
|
|
|
|
|
|
|
append({
|
|
|
|
alias: "",
|
|
|
|
colorId: "1",
|
|
|
|
displayName: `contact ${i}`,
|
|
|
|
ensName: "",
|
|
|
|
icon: "",
|
|
|
|
isContact: true,
|
|
|
|
localNickname: "",
|
|
|
|
onlineStatus: 1,
|
|
|
|
pubKey: key
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Panels
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2927%3A343592
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2990%3A353179
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2927%3A344073
|