chore(Community Settings): unused SettingsPageLayout removed, minor naming adjustments
Closes: #11177
This commit is contained in:
parent
cd142a74fc
commit
fcbc86d882
|
@ -10,8 +10,7 @@ Page {
|
|||
topPadding: 16
|
||||
|
||||
property alias buttons: pageHeader.buttons
|
||||
property alias pageTitle: pageHeader.title
|
||||
property alias pageSubtitle: pageHeader.subtitle
|
||||
property alias subtitle: pageHeader.subtitle
|
||||
|
||||
background: null
|
||||
|
||||
|
@ -21,5 +20,7 @@ Page {
|
|||
height: 44
|
||||
leftPadding: 64
|
||||
rightPadding: width - 560 - leftPadding
|
||||
|
||||
title: root.title
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,157 +0,0 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
||||
import utils 1.0
|
||||
import shared.panels 1.0
|
||||
import shared.popups 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
// required
|
||||
property alias title: itemHeader.text
|
||||
property Component content
|
||||
|
||||
// optional
|
||||
property Component footer
|
||||
property bool dirty: false
|
||||
property bool editable: false
|
||||
property int headerWidth: d.defaultContentWidth
|
||||
property string previousPageName: ""
|
||||
property bool saveChangesButtonEnabled: !!root.contentItem && !!root.contentItem.saveChangesButtonEnabled
|
||||
property alias primaryHeaderButton: primaryHeaderBtn
|
||||
property alias secondaryHeaderButton: secondaryHeaderBtn
|
||||
property alias saveChangesText: settingsDirtyToastMessage.saveChangesText
|
||||
property alias cancelChangesText: settingsDirtyToastMessage.cancelChangesText
|
||||
property alias changesDetectedText: settingsDirtyToastMessage.changesDetectedText
|
||||
property alias subTitle: sideTextHeader.text
|
||||
|
||||
readonly property Item contentItem: contentLoader.item
|
||||
readonly property size settingsDirtyToastMessageImplicitSize:
|
||||
Qt.size(settingsDirtyToastMessage.implicitWidth,
|
||||
settingsDirtyToastMessage.implicitHeight + settingsDirtyToastMessage.anchors.bottomMargin)
|
||||
|
||||
signal saveChangesClicked
|
||||
signal resetChangesClicked
|
||||
signal primaryHeaderButtonClicked
|
||||
signal secondaryHeaderButtonClicked
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
||||
readonly property int leftMargin: 64
|
||||
readonly property int defaultContentWidth: 560
|
||||
}
|
||||
|
||||
function reloadContent() {
|
||||
contentLoader.active = false
|
||||
contentLoader.active = true
|
||||
}
|
||||
|
||||
function notifyDirty() {
|
||||
settingsDirtyToastMessage.notifyDirty()
|
||||
}
|
||||
|
||||
implicitHeight: layout.implicitHeight
|
||||
implicitWidth: layout.implicitWidth
|
||||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: 24
|
||||
spacing: 16
|
||||
|
||||
RowLayout {
|
||||
Layout.leftMargin: d.leftMargin
|
||||
Layout.maximumWidth: root.headerWidth
|
||||
Layout.maximumHeight: 44
|
||||
|
||||
spacing: 9
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
StatusBaseText {
|
||||
id: itemHeader
|
||||
|
||||
color: Theme.palette.directColor1
|
||||
font.pixelSize: 26
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
id: sideTextHeader
|
||||
|
||||
Layout.leftMargin: 6
|
||||
Layout.topMargin: 6
|
||||
|
||||
color: Theme.palette.baseColor1
|
||||
font.pixelSize: 15
|
||||
}
|
||||
}
|
||||
|
||||
// Filler
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
id: secondaryHeaderBtn
|
||||
|
||||
Layout.fillHeight: true
|
||||
|
||||
objectName: "secondaryHeaderButton"
|
||||
visible: false
|
||||
|
||||
onClicked: root.secondaryHeaderButtonClicked()
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
id: primaryHeaderBtn
|
||||
|
||||
Layout.fillHeight: true
|
||||
|
||||
objectName: "primaryHeaderButton"
|
||||
visible: false
|
||||
|
||||
onClicked: root.primaryHeaderButtonClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: contentLoader
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.leftMargin: d.leftMargin
|
||||
Layout.rightMargin: 24
|
||||
|
||||
sourceComponent: root.content
|
||||
}
|
||||
|
||||
Loader {
|
||||
visible: !!root.footer
|
||||
Layout.fillWidth: true
|
||||
sourceComponent: root.footer
|
||||
}
|
||||
}
|
||||
|
||||
SettingsDirtyToastMessage {
|
||||
id: settingsDirtyToastMessage
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottomMargin: 16
|
||||
}
|
||||
active: root.dirty
|
||||
flickable: root.dirty ? root.contentItem : null
|
||||
saveChangesButtonEnabled: root.saveChangesButtonEnabled
|
||||
onResetChangesClicked: root.resetChangesClicked()
|
||||
onSaveChangesClicked: root.saveChangesClicked()
|
||||
}
|
||||
}
|
|
@ -1,2 +1 @@
|
|||
SettingsPage 1.0 SettingsPage.qml
|
||||
SettingsPageLayout 1.0 SettingsPageLayout.qml
|
||||
|
|
|
@ -57,7 +57,7 @@ StackView {
|
|||
|
||||
initialItem: SettingsPage {
|
||||
implicitWidth: 0
|
||||
pageTitle: qsTr("Airdrops")
|
||||
title: qsTr("Airdrops")
|
||||
|
||||
buttons: StatusButton {
|
||||
objectName: "addNewItemButton"
|
||||
|
@ -84,7 +84,7 @@ StackView {
|
|||
id: newAirdropView
|
||||
|
||||
SettingsPage {
|
||||
pageTitle: qsTr("New airdrop")
|
||||
title: qsTr("New airdrop")
|
||||
|
||||
contentItem: EditAirdropView {
|
||||
id: view
|
||||
|
|
|
@ -38,7 +38,7 @@ SettingsPage {
|
|||
}
|
||||
}
|
||||
|
||||
pageTitle: qsTr("Members")
|
||||
title: qsTr("Members")
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ StackView {
|
|||
|
||||
initialItem: SettingsPage {
|
||||
implicitWidth: 0
|
||||
pageTitle: qsTr("Tokens")
|
||||
title: qsTr("Tokens")
|
||||
|
||||
buttons: StatusButton {
|
||||
objectName: "addNewItemButton"
|
||||
|
@ -123,8 +123,8 @@ StackView {
|
|||
property string referenceName: ""
|
||||
property string referenceSymbol: ""
|
||||
|
||||
pageTitle: optionsTab.currentItem == assetsTab
|
||||
? qsTr("Mint asset") : qsTr("Mint collectible")
|
||||
title: optionsTab.currentItem == assetsTab
|
||||
? qsTr("Mint asset") : qsTr("Mint collectible")
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
width: root.viewWidth
|
||||
|
@ -210,8 +210,8 @@ StackView {
|
|||
|
||||
property alias token: preview.token
|
||||
|
||||
pageTitle: token.name
|
||||
pageSubtitle: token.symbol
|
||||
title: token.name
|
||||
subtitle: token.symbol
|
||||
|
||||
contentItem: CommunityTokenView {
|
||||
id: preview
|
||||
|
@ -265,8 +265,8 @@ StackView {
|
|||
|
||||
property string tokenKey
|
||||
|
||||
pageTitle: view.name
|
||||
pageSubtitle: view.symbol
|
||||
title: view.name
|
||||
subtitle: view.symbol
|
||||
|
||||
buttons: [
|
||||
StatusButton {
|
||||
|
|
|
@ -52,7 +52,7 @@ StackLayout {
|
|||
clip: true
|
||||
|
||||
SettingsPage {
|
||||
pageTitle: qsTr("Overview")
|
||||
title: qsTr("Overview")
|
||||
|
||||
rightPadding: 64
|
||||
bottomPadding: 64
|
||||
|
@ -178,7 +178,7 @@ StackLayout {
|
|||
SettingsPage {
|
||||
id: editCommunityPage
|
||||
|
||||
pageTitle: qsTr("Edit Community")
|
||||
title: qsTr("Edit Community")
|
||||
|
||||
contentItem: Loader {
|
||||
id: editSettingsPanelLoader
|
||||
|
|
|
@ -41,7 +41,8 @@ StackView {
|
|||
// Community Permissions possible view contents:
|
||||
initialItem: SettingsPage {
|
||||
implicitWidth: 0
|
||||
pageTitle: qsTr("Permissions")
|
||||
|
||||
title: qsTr("Permissions")
|
||||
|
||||
buttons: StatusButton {
|
||||
objectName: "addNewItemButton"
|
||||
|
@ -101,7 +102,8 @@ StackView {
|
|||
id: newPermissionViewPage
|
||||
|
||||
implicitWidth: 0
|
||||
pageTitle: isEditState ? qsTr("Edit permission") : qsTr("New permission")
|
||||
|
||||
title: isEditState ? qsTr("Edit permission") : qsTr("New permission")
|
||||
|
||||
property alias holdingsToEditModel: editPermissionView.selectedHoldingsModel
|
||||
property alias channelsToEditModel: editPermissionView.selectedChannelsModel
|
||||
|
|
Loading…
Reference in New Issue