From 80b46ce78862e11e7e7cf982f474fe03d9fb3486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Cie=C5=9Blak?= Date: Tue, 20 Dec 2022 01:00:47 +0100 Subject: [PATCH] chore(Storybook): Basic page for StatusChatListAndCategories added --- storybook/PagesModel.qml | 4 + .../pages/StatusChatListAndCategoriesPage.qml | 96 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 storybook/pages/StatusChatListAndCategoriesPage.qml diff --git a/storybook/PagesModel.qml b/storybook/PagesModel.qml index ca879477a9..d7ac97618e 100644 --- a/storybook/PagesModel.qml +++ b/storybook/PagesModel.qml @@ -73,6 +73,10 @@ ListModel { title: "StatusChatInput" section: "Components" } + ListElement { + title: "StatusChatListAndCategories" + section: "Components" + } ListElement { title: "BrowserSettings" section: "Settings" diff --git a/storybook/pages/StatusChatListAndCategoriesPage.qml b/storybook/pages/StatusChatListAndCategoriesPage.qml new file mode 100644 index 0000000000..f955ea7d57 --- /dev/null +++ b/storybook/pages/StatusChatListAndCategoriesPage.qml @@ -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 + } +}