status-desktop/ui/imports/shared/views/SyncingCodeInstructions.qml
Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00

68 lines
1.4 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
import utils 1.0
import shared.controls 1.0
ColumnLayout {
id: root
enum Purpose {
AppSync,
KeypairSync
}
enum Type {
QRCode,
EncryptedKey
}
property int purpose: SyncingCodeInstructions.Purpose.AppSync
property int type: SyncingCodeInstructions.Type.QRCode
spacing: Theme.xlPadding
StatusSwitchTabBar {
id: switchTabBar
Layout.fillWidth: true
Layout.leftMargin: Theme.padding
Layout.rightMargin: Theme.padding
Layout.minimumWidth: 400
currentIndex: 0
StatusSwitchTabButton {
text: qsTr("Mobile")
}
StatusSwitchTabButton {
text: qsTr("Desktop")
}
}
StackLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.preferredHeight: Math.max(mobileSync.implicitHeight, desktopSync.implicitHeight)
currentIndex: switchTabBar.currentIndex
GetSyncCodeMobileInstructions {
id: mobileSync
Layout.alignment: Qt.AlignHCenter
purpose: root.purpose
type: root.type
}
GetSyncCodeDesktopInstructions {
id: desktopSync
Layout.alignment: Qt.AlignHCenter
purpose: root.purpose
type: root.type
}
}
}