feat(SyncingView): show installation id in debug mode (#11058)

This commit is contained in:
Igor Sirotin 2023-06-14 16:02:57 +03:00 committed by GitHub
parent a073a3ff6c
commit 951fa8b0f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 89 additions and 0 deletions

View File

@ -225,6 +225,10 @@ ListModel {
title: "ContactsListAndSearch"
section: "Components"
}
ListElement {
title: "StatusInput"
section: "Components"
}
ListElement {
title: "StatusChatInput"
section: "Components"

View File

@ -0,0 +1,72 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Controls 0.1
import Storybook 1.0
import Models 1.0
import utils 1.0
import shared.status 1.0
import shared.stores 1.0
SplitView {
id: root
Logs { id: logs }
SplitView {
orientation: Qt.Vertical
SplitView.fillWidth: true
ColumnLayout {
SplitView.fillHeight: true
SplitView.fillWidth: true
StatusInput {
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Layout.margins: 16
placeholderText: placeHolderInput.text
enabled: enabledCheckBox.checked
input.edit.readOnly: readOnlyCheckBox.checked
input.clearable: clearableCheckBox.checked
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 200
logsView.logText: logs.logText
}
}
Pane {
SplitView.minimumWidth: 300
SplitView.preferredWidth: 300
ColumnLayout {
TextInput {
id: placeHolderInput
text: "Placeholder"
}
CheckBox {
id: enabledCheckBox
text: "enabled"
checked: true
}
CheckBox {
id: readOnlyCheckBox
text: "read only"
}
CheckBox {
id: clearableCheckBox
text: "clearable"
}
}
}
}

View File

@ -220,6 +220,7 @@ StatusSectionLayout {
profileStore: root.store.profileStore
devicesStore: root.store.devicesStore
privacyStore: root.store.privacyStore
advancedStore: root.store.advancedStore
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.syncingSettings)
contentWidth: d.contentWidth
}

View File

@ -20,6 +20,7 @@ StatusDialog {
id: root
property DevicesStore devicesStore
property AdvancedStore advancedStore
property var deviceModel
readonly property string deviceName: d.deviceName
@ -46,6 +47,7 @@ StatusDialog {
}
contentItem: ColumnLayout {
spacing: 8
StatusInput {
id: nameInput
Layout.fillWidth: true
@ -63,6 +65,14 @@ StatusDialog {
d.saveNewName()
}
}
StatusInput {
id: idInput
Layout.fillWidth: true
label: qsTr("Installation ID")
enabled: false
text: root.deviceModel.installationId
visible: root.advancedStore.isDebugEnabled
}
}
footer: StatusDialogFooter {

View File

@ -30,6 +30,7 @@ SettingsContentBase {
property DevicesStore devicesStore
property ProfileStore profileStore
property PrivacyStore privacyStore
property AdvancedStore advancedStore
Component.onCompleted: {
root.devicesStore.loadDevices()
@ -252,6 +253,7 @@ SettingsContentBase {
SyncDeviceCustomizationPopup {
anchors.centerIn: parent
devicesStore: root.devicesStore
advancedStore: root.advancedStore
}
}