Skip to content
Snippets Groups Projects
Commit af357313 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-11913 minor issues and flipable item update

parent f9bf03b9
No related branches found
Tags v26
1 merge request!39QDS-11913 minor issues and flipable item update
Pipeline #67577 passed
Subproject commit 59721758afe9d7034ca76f1a19c3c5c97610ceaa
Subproject commit 5f115ed120adb58972ac3a0a2b80ec42cf3769a1
......@@ -359,8 +359,7 @@ void Backend::runDemoProject(const QString &projectName)
if (!cached) {
updatePopup("Downloading demo project...", false);
const std::optional<QByteArray> project = m_serviceConnector.fetchDemo(projectName
+ ".qmlrc");
const std::optional<QByteArray> project = m_serviceConnector.fetchDemo(projectName);
if (project == std::nullopt) {
qCritical() << "Could not download demo project. Please check the logs for more "
......
......@@ -19,7 +19,13 @@ Item {
Text {
id: qrCodeStatus
text: qsTr("No user is registered. To access your shared projects:")
text: {
if (backend.userHash() === '') {
return qsTr("No user is registered. To access your shared projects:\n\n1. Open the project with Design Studio (4.4 or later).\n2. Select File -> Share Application Online.\n3. Scan the QR code.")
}
return qsTr("User registration is completed.\nScan a new QR code to access the shared project from a different user.");
}
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
......@@ -28,24 +34,14 @@ Item {
Connections {
target: backend
function onUserHashChanged(){
qrCodeStatus.text = "User registration is completed.\nScan a new QR code to access the shared project from a different user.";
qrCodeInstructions.text = "";
qrCodeStatus.text = qsTr("User registration is completed.\nScan a new QR code to access the shared project from a different user.");
}
}
}
Text {
id: qrCodeInstructions
text: qsTr("1. Open the project with Design Studio (4.4 or later).\n2. Select File -> Share Application Online.\n3. Scan the QR code.")
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Button {
id: scanQrCode
text: qsTr("Scan QR Code")
text: qsTr("Scan QR code")
onClicked: backend.scanQrCode()
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
......@@ -75,12 +71,15 @@ Item {
projectList.enabled = true;
downloadUserProject.enabled = true;
} else {
projectList.displayText = "No projects are available";
projectList.displayText = qsTr("No project is available");
projectList.enabled = false;
downloadUserProject.enabled = false;
}
}
displayText: "Scan QR code to access your projects";
onCurrentIndexChanged: {
displayText = model[currentIndex].appName;
}
displayText: qsTr("Scan QR code to access your projects");
currentIndex: -1
Layout.preferredHeight: 50
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment