chore(Storybook): Basic page for StatusChatListAndCategories added

This commit is contained in:
Michał Cieślak 2022-12-20 01:00:47 +01:00 committed by Michał
parent a1202b0896
commit 80b46ce788
2 changed files with 100 additions and 0 deletions

View File

@ -73,6 +73,10 @@ ListModel {
title: "StatusChatInput"
section: "Components"
}
ListElement {
title: "StatusChatListAndCategories"
section: "Components"
}
ListElement {
title: "BrowserSettings"
section: "Settings"

View File

@ -0,0 +1,96 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import StatusQ.Components 0.1
import Storybook 1.0
SplitView {
id: root
orientation: Qt.Vertical
Logs { id: logs }
Pane {
SplitView.fillWidth: true
SplitView.fillHeight: true
StatusChatListAndCategories {
anchors.fill: parent
model: ListModel {
ListElement {
itemId: "id1"
position: 0
name: "X"
subItems: []
isCategory: false
active: true
notificationsCount: 12
hasUnreadMessages: false
color: ""
colorId: 1
icon: ""
muted: false
type: StatusChatListItem.Type.CommunityChat
}
ListElement {
itemId: "id2"
position: 0
name: "Y"
isCategory: true
subItems: [
ListElement {
itemId: "id3"
position: 0
name: "Y_1"
subItems: []
active: true
notificationsCount: 0
hasUnreadMessages: false
color: ""
colorId: 1
icon: ""
muted: false
},
ListElement {
itemId: "id4"
position: 1
name: "Y_2"
active: true
notificationsCount: 1
hasUnreadMessages: true
color: ""
colorId: 2
icon: ""
muted: false
},
ListElement {
itemId: "id5"
position: 1
name: "Y_3"
active: true
notificationsCount: 1
hasUnreadMessages: false
color: ""
colorId: 2
icon: ""
muted: true
}
]
}
}
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 200
logsView.logText: logs.logText
}
}