2024-05-01 13:19:57 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2022-10-19 19:51:39 +00:00
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
2024-05-01 13:19:57 +00:00
|
|
|
orientation: Qt.Horizontal
|
2022-10-19 19:51:39 +00:00
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
2024-05-01 13:19:57 +00:00
|
|
|
StatusCommunityCard {
|
2022-10-19 19:51:39 +00:00
|
|
|
anchors.centerIn: parent
|
2024-05-01 13:19:57 +00:00
|
|
|
cardSize: ctrlSize.checked ? StatusCommunityCard.Size.Big : StatusCommunityCard.Size.Small
|
|
|
|
communityId: "community_id"
|
|
|
|
name: infoEditor.name
|
|
|
|
description: infoEditor.description
|
|
|
|
members: infoEditor.membersCount
|
|
|
|
activeUsers: members/2
|
|
|
|
//popularity: 4 // not visualized?
|
|
|
|
banner: infoEditor.banner
|
|
|
|
asset.source: infoEditor.image
|
|
|
|
asset.isImage: true
|
|
|
|
communityColor: infoEditor.color
|
|
|
|
loaded: !ctrlLoading.checked
|
|
|
|
|
|
|
|
categories: ListModel {
|
|
|
|
ListElement { name: "gaming"; emoji: "🎮"; selected: false }
|
|
|
|
ListElement { name: "art"; emoji: "🖼️️"; selected: false }
|
|
|
|
ListElement { name: "crypto"; emoji: "💸"; selected: true }
|
|
|
|
ListElement { name: "nsfw"; emoji: "🍆"; selected: false }
|
|
|
|
ListElement { name: "markets"; emoji: "💎"; selected: false }
|
2022-10-19 19:51:39 +00:00
|
|
|
}
|
|
|
|
|
2024-05-01 13:19:57 +00:00
|
|
|
onClicked: logs.logEvent("StatusCommunityCard::onClicked", ["communityId"], arguments)
|
|
|
|
onRightClicked: logs.logEvent("StatusCommunityCard::onRightClicked", ["communityId"], arguments)
|
2022-10-19 19:51:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
2024-05-01 13:19:57 +00:00
|
|
|
SplitView.preferredWidth: 250
|
2022-10-19 19:51:39 +00:00
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
2024-05-01 13:19:57 +00:00
|
|
|
CommunityInfoEditor {
|
|
|
|
id: infoEditor
|
|
|
|
colorVisible: true
|
|
|
|
adminControlsEnabled: false
|
2022-10-19 19:51:39 +00:00
|
|
|
|
2024-05-01 13:19:57 +00:00
|
|
|
Switch {
|
|
|
|
id: ctrlSize
|
|
|
|
text: "Big card"
|
|
|
|
checked: true
|
2022-10-19 19:51:39 +00:00
|
|
|
}
|
|
|
|
|
2024-05-01 13:19:57 +00:00
|
|
|
Switch {
|
|
|
|
id: ctrlLoading
|
|
|
|
text: "Loading"
|
|
|
|
checked: false
|
2022-10-19 19:51:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
2024-05-01 13:19:57 +00:00
|
|
|
// category: Components
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=8159%3A416159
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=8159%3A416160
|