mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 18:25:33 +00:00
3705249e40
- implement the basic Onboarding UI skeleton and the Create Profile flows - adjust the PasswordView and EnterSeedPhrase views to the latest design - add the main OnboardingLayout and StatusPinInput pages to Storybook - change terminology app-wide: "Seed phrase" -> "Recovery phrase" - implement the Login flows (seed, sync, keycard) - amend the keycard flow sequences with separate (non) empty page Fixes #16719 Fixes #16742 Fixes #16743
68 lines
1.6 KiB
QML
68 lines
1.6 KiB
QML
import QtQuick 2.15
|
|
|
|
import StatusQ 0.1
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Controls 0.1
|
|
|
|
StatusInput {
|
|
id: root
|
|
|
|
// TODO: Use https://github.com/status-im/status-desktop/issues/6136
|
|
|
|
enum Mode {
|
|
WriteMode,
|
|
ReadMode
|
|
}
|
|
|
|
required property int mode
|
|
property bool readOnly: false
|
|
|
|
input.edit.readOnly: root.readOnly
|
|
input.font: Theme.monoFont.name
|
|
input.placeholderFont: root.input.font
|
|
|
|
input.rightComponent: {
|
|
switch (root.mode) {
|
|
case StatusSyncCodeInput.Mode.WriteMode:
|
|
return root.valid ? validCodeIconComponent
|
|
: ClipboardUtils.hasText ? pasteButtonComponent : null
|
|
case StatusSyncCodeInput.Mode.ReadMode:
|
|
return copyButtonComponent
|
|
}
|
|
}
|
|
rightPadding: 12
|
|
|
|
Component {
|
|
id: copyButtonComponent
|
|
|
|
StatusButton {
|
|
objectName: "syncCodeCopyButton"
|
|
size: StatusBaseButton.Size.Tiny
|
|
text: qsTr("Copy")
|
|
onClicked: ClipboardUtils.setText(root.text)
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: pasteButtonComponent
|
|
|
|
StatusButton {
|
|
objectName: "syncCodePasteButton"
|
|
size: StatusBaseButton.Size.Tiny
|
|
enabled: !root.readOnly && ClipboardUtils.hasText
|
|
text: qsTr("Paste")
|
|
onClicked: root.input.text = ClipboardUtils.text
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: validCodeIconComponent
|
|
|
|
StatusIcon {
|
|
icon: "tiny/checkmark"
|
|
color: Theme.palette.successColor1
|
|
}
|
|
}
|
|
}
|