mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-07 12:17:38 +00:00
chore(Storybook): Basic page for InDropdown (community permissions) added
This commit is contained in:
parent
d58dd3331b
commit
7954b0f330
@ -57,6 +57,10 @@ ListModel {
|
||||
title: "HoldingsDropdown"
|
||||
section: "Popups"
|
||||
}
|
||||
ListElement {
|
||||
title: "InDropdown"
|
||||
section: "Popups"
|
||||
}
|
||||
ListElement {
|
||||
title: "MembersSelector"
|
||||
section: "Components"
|
||||
|
@ -29,6 +29,14 @@
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2975%3A489607",
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2975%3A492910"
|
||||
],
|
||||
"InDropdown": [
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A482182",
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A482231",
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A482280",
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A481935",
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A482006",
|
||||
"https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A482016"
|
||||
],
|
||||
"InviteFriendsToCommunityPopup": [
|
||||
"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",
|
||||
|
127
storybook/pages/InDropdownPage.qml
Normal file
127
storybook/pages/InDropdownPage.qml
Normal file
@ -0,0 +1,127 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
|
||||
import AppLayouts.Chat.controls.community 1.0
|
||||
|
||||
import Models 1.0
|
||||
|
||||
import Storybook 1.0
|
||||
|
||||
SplitView {
|
||||
id: root
|
||||
|
||||
orientation: Qt.Vertical
|
||||
|
||||
Logs { id: logs }
|
||||
|
||||
Pane {
|
||||
id: pane
|
||||
|
||||
SplitView.fillWidth: true
|
||||
SplitView.fillHeight: true
|
||||
|
||||
ListModel {
|
||||
id: chatsModel
|
||||
|
||||
ListElement {
|
||||
itemId: 0
|
||||
name: "welcome"
|
||||
isCategory: false
|
||||
color: ""
|
||||
colorId: 1
|
||||
icon: ""
|
||||
}
|
||||
ListElement {
|
||||
itemId: 1
|
||||
name: "announcements"
|
||||
isCategory: false
|
||||
color: ""
|
||||
colorId: 1
|
||||
icon: ""
|
||||
}
|
||||
ListElement {
|
||||
name: "Discussion"
|
||||
isCategory: true
|
||||
|
||||
subItems: [
|
||||
ListElement {
|
||||
itemId: 2
|
||||
name: "general"
|
||||
icon: ""
|
||||
emoji: "👋"
|
||||
},
|
||||
ListElement {
|
||||
itemId: 3
|
||||
name: "help"
|
||||
icon: ""
|
||||
color: ""
|
||||
colorId: 1
|
||||
emoji: "⚽"
|
||||
}
|
||||
]
|
||||
}
|
||||
ListElement {
|
||||
name: "Support"
|
||||
isCategory: true
|
||||
|
||||
subItems: [
|
||||
ListElement {
|
||||
itemId: 4
|
||||
name: "faq"
|
||||
icon: ""
|
||||
color: ""
|
||||
colorId: 1
|
||||
},
|
||||
ListElement {
|
||||
itemId: 5
|
||||
name: "report-scam"
|
||||
icon: ""
|
||||
color: ""
|
||||
colorId: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
ListElement {
|
||||
name: "Empty"
|
||||
isCategory: true
|
||||
|
||||
subItems: []
|
||||
}
|
||||
}
|
||||
|
||||
InDropdown {
|
||||
parent: pane
|
||||
anchors.centerIn: parent
|
||||
|
||||
communityName: "Socks"
|
||||
communityImage: ModelsData.icons.socks
|
||||
communityColor: "red"
|
||||
|
||||
model: chatsModel
|
||||
|
||||
onAddChannelClicked: {
|
||||
logs.logEvent("InDropdown::addChannelClicked")
|
||||
}
|
||||
|
||||
onCommunitySelected: {
|
||||
logs.logEvent("InDropdown::communitySelected")
|
||||
}
|
||||
|
||||
onChannelsSelected: {
|
||||
logs.logEvent("InDropdown::channelSelected", ["channels"], arguments)
|
||||
}
|
||||
|
||||
onOpened: contentItem.parent.parent = pane
|
||||
Component.onCompleted: open()
|
||||
}
|
||||
}
|
||||
|
||||
LogsAndControlsPanel {
|
||||
id: logsAndControlsPanel
|
||||
|
||||
SplitView.minimumHeight: 100
|
||||
SplitView.preferredHeight: 200
|
||||
|
||||
logsView.logText: logs.logText
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user