SettingsPageHeader control added

It's generic header intended to be used in all community settings
flow.
This commit is contained in:
Michał Cieślak 2023-06-27 17:54:01 +02:00 committed by Michał
parent c842876791
commit 456a21f831
4 changed files with 170 additions and 3 deletions

View File

@ -349,6 +349,10 @@ ListModel {
title: "SortableTokenHoldersList" title: "SortableTokenHoldersList"
section: "Components" section: "Components"
} }
ListElement {
title: "SettingsPageHeader"
section: "Components"
}
ListElement { ListElement {
title: "BrowserSettings" title: "BrowserSettings"
section: "Settings" section: "Settings"

View File

@ -0,0 +1,106 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import Storybook 1.0
import AppLayouts.Communities.controls 1.0
import StatusQ.Controls 0.1
SplitView {
id: root
orientation: Qt.Vertical
readonly property list<StatusButton> sampleButtons: [
StatusButton {
text: "button 1"
},
StatusButton {
text: "button 2"
}
]
Item {
id: container
SplitView.fillWidth: true
SplitView.fillHeight: true
Rectangle {
anchors.fill: settingsPageHeader
border.width: 1
anchors.margins: -15
}
SettingsPageHeader {
id: settingsPageHeader
width: widthSlider.value || undefined
title: titleTextField.text
subtitle: subtitleTextField.text
anchors.centerIn: parent
buttons: buttonsCheckBox.checked ? root.sampleButtons : null
}
}
LogsAndControlsPanel {
SplitView.minimumHeight: 100
SplitView.preferredHeight: 250
SplitView.fillWidth: true
ColumnLayout {
RowLayout {
Label {
text: "Title:"
}
TextField {
id: titleTextField
text: "Mint Collectible"
}
}
RowLayout {
Label {
text: "Subtitle:"
}
TextField {
id: subtitleTextField
text: "SNT"
}
}
RowLayout {
Label {
text: "Width:"
}
Slider {
id: widthSlider
from: 0
to: 700
stepSize: 1
}
Label {
text: widthSlider.value || "implicit"
}
}
CheckBox {
id: buttonsCheckBox
text: "Show buttons"
checked: true
}
}
}
}

View File

@ -0,0 +1,56 @@
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
Control {
id: root
property alias title: titleText.text
property alias subtitle: subtitleText.text
property list<StatusButton> buttons
contentItem: RowLayout {
spacing: 9
RowLayout {
Layout.alignment: Qt.AlignVCenter
StatusBaseText {
id: titleText
color: Theme.palette.directColor1
font.pixelSize: 26
font.bold: true
}
StatusBaseText {
id: subtitleText
Layout.leftMargin: 6
Layout.topMargin: 6
visible: !!text
color: Theme.palette.baseColor1
font.pixelSize: 15
}
}
Item {
Layout.fillWidth: true
}
RowLayout {
id: buttonsRow
spacing: parent.spacing
children: root.buttons
visible: children.length
}
}
}

View File

@ -4,15 +4,15 @@ AirdropRecipientsSelector 1.0 AirdropRecipientsSelector.qml
AirdropTokensSelector 1.0 AirdropTokensSelector.qml AirdropTokensSelector 1.0 AirdropTokensSelector.qml
BannerPicker 1.0 BannerPicker.qml BannerPicker 1.0 BannerPicker.qml
CategoryListItem 1.0 CategoryListItem.qml CategoryListItem 1.0 CategoryListItem.qml
CommunityListItem 1.0 CommunityListItem.qml
ColorPicker 1.0 ColorPicker.qml ColorPicker 1.0 ColorPicker.qml
CommunityListItem 1.0 CommunityListItem.qml
DescriptionInput 1.0 DescriptionInput.qml DescriptionInput 1.0 DescriptionInput.qml
EnsPanel 1.0 EnsPanel.qml EnsPanel 1.0 EnsPanel.qml
ExtendedDropdownContent 1.0 ExtendedDropdownContent.qml ExtendedDropdownContent 1.0 ExtendedDropdownContent.qml
HoldingTypes 1.0 HoldingTypes.qml HoldingTypes 1.0 HoldingTypes.qml
IssuePill 1.0 IssuePill.qml
InlineNetworksComboBox 1.0 InlineNetworksComboBox.qml InlineNetworksComboBox 1.0 InlineNetworksComboBox.qml
IntroMessageInput 1.0 IntroMessageInput.qml IntroMessageInput 1.0 IntroMessageInput.qml
IssuePill 1.0 IssuePill.qml
ListDropdownContent 1.0 ListDropdownContent.qml ListDropdownContent 1.0 ListDropdownContent.qml
LogoPicker 1.0 LogoPicker.qml LogoPicker 1.0 LogoPicker.qml
MembersSelectorPanel 1.0 MembersSelectorPanel.qml MembersSelectorPanel 1.0 MembersSelectorPanel.qml
@ -22,10 +22,11 @@ OutroMessageInput 1.0 OutroMessageInput.qml
PermissionItem 1.0 PermissionItem.qml PermissionItem 1.0 PermissionItem.qml
PermissionListItem 1.0 PermissionListItem.qml PermissionListItem 1.0 PermissionListItem.qml
PermissionsRow 1.0 PermissionsRow.qml PermissionsRow 1.0 PermissionsRow.qml
SettingsPageHeader 1.0 SettingsPageHeader.qml
TagsPicker 1.0 TagsPicker.qml TagsPicker 1.0 TagsPicker.qml
TagsRow 1.0 TagsRow.qml TagsRow 1.0 TagsRow.qml
ThumbnailsDropdownContent 1.0 ThumbnailsDropdownContent.qml
TokenItem 1.0 TokenItem.qml TokenItem 1.0 TokenItem.qml
TokenPanel 1.0 TokenPanel.qml TokenPanel 1.0 TokenPanel.qml
ThumbnailsDropdownContent 1.0 ThumbnailsDropdownContent.qml
singleton PermissionTypes 1.0 PermissionTypes.qml singleton PermissionTypes 1.0 PermissionTypes.qml
singleton TokenCategories 1.0 TokenCategories.qml singleton TokenCategories 1.0 TokenCategories.qml