Fix some issues in cloud login page
This commit is contained in:
parent
d984a9d39c
commit
0cadc3a542
@ -503,9 +503,9 @@
|
|||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<source>There are %n boxes connected to your cloud</source>
|
<source>There are %n boxes connected to your cloud</source>
|
||||||
<translation>
|
<translation type="vanished">
|
||||||
<numerusform>Es ist %1 Box mit Deiner Cloud verbunden</numerusform>
|
<numerusform>Es ist %n Box mit Deiner Cloud verbunden</numerusform>
|
||||||
<numerusform>Es sind %1 Boxen mit Deiner Cloud verbunden</numerusform>
|
<numerusform>Es sind %n Boxen mit Deiner Cloud verbunden</numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -640,6 +640,13 @@
|
|||||||
<source>See our <a href="%1">privacy policy</a> to find out what information is processed. By signing up to %2:cloud you accept those terms and conditions.</source>
|
<source>See our <a href="%1">privacy policy</a> to find out what information is processed. By signing up to %2:cloud you accept those terms and conditions.</source>
|
||||||
<translation>Bitte lese unsere <a href="%1">Datenschutzerklärung</a> um herauszufinden welche Informationen verarbeitet werden. Wenn du dich bei %2:cloud registrierst, erklärst Du Dich damit einverstanden.</translation>
|
<translation>Bitte lese unsere <a href="%1">Datenschutzerklärung</a> um herauszufinden welche Informationen verarbeitet werden. Wenn du dich bei %2:cloud registrierst, erklärst Du Dich damit einverstanden.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message numerus="yes">
|
||||||
|
<source>There are %n boxes connected to your cloud.</source>
|
||||||
|
<translation>
|
||||||
|
<numerusform>Es ist %n Box mit Deiner Cloud verbunden.</numerusform>
|
||||||
|
<numerusform>Es sind %n Boxen mit Deiner Cloud verbunden.</numerusform>
|
||||||
|
</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CloudSettingsPage</name>
|
<name>CloudSettingsPage</name>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE TS>
|
<!DOCTYPE TS>
|
||||||
<TS version="2.1">
|
<TS version="2.1" language="en_US">
|
||||||
<context>
|
<context>
|
||||||
<name>AWSPasswordTextField</name>
|
<name>AWSPasswordTextField</name>
|
||||||
<message>
|
<message>
|
||||||
@ -334,8 +334,9 @@
|
|||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<source>There are %n boxes connected to your cloud</source>
|
<source>There are %n boxes connected to your cloud</source>
|
||||||
<translation type="unfinished">
|
<translation type="obsolete">
|
||||||
<numerusform></numerusform>
|
<numerusform>There is %n box connected to your cloud.</numerusform>
|
||||||
|
<numerusform>There are %n boxes connected to your cloud.</numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -466,6 +467,13 @@
|
|||||||
<source>See our <a href="%1">privacy policy</a> to find out what information is processed. By signing up to %2:cloud you accept those terms and conditions.</source>
|
<source>See our <a href="%1">privacy policy</a> to find out what information is processed. By signing up to %2:cloud you accept those terms and conditions.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message numerus="yes">
|
||||||
|
<source>There are %n boxes connected to your cloud.</source>
|
||||||
|
<translation>
|
||||||
|
<numerusform>There is %n box connected to your cloud.</numerusform>
|
||||||
|
<numerusform>There are %n boxes connected to your cloud.</numerusform>
|
||||||
|
</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CloudSettingsPage</name>
|
<name>CloudSettingsPage</name>
|
||||||
|
|||||||
@ -37,77 +37,72 @@ Page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Flickable {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
interactive: contentHeight > height
|
|
||||||
contentHeight: childrenRect.height
|
|
||||||
visible: AWSClient.isLoggedIn
|
visible: AWSClient.isLoggedIn
|
||||||
|
|
||||||
ColumnLayout {
|
Label {
|
||||||
width: parent.width
|
Layout.fillWidth: true
|
||||||
Label {
|
Layout.topMargin: app.margins
|
||||||
Layout.fillWidth: true
|
Layout.leftMargin: app.margins
|
||||||
Layout.topMargin: app.margins
|
Layout.rightMargin: app.margins
|
||||||
Layout.leftMargin: app.margins
|
wrapMode: Text.WordWrap
|
||||||
Layout.rightMargin: app.margins
|
text: qsTr("Logged in as %1").arg(AWSClient.username)
|
||||||
wrapMode: Text.WordWrap
|
}
|
||||||
text: qsTr("Logged in as %1").arg(AWSClient.username)
|
|
||||||
}
|
Button {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: app.margins
|
||||||
|
text: qsTr("Log out")
|
||||||
|
onClicked: {
|
||||||
|
logoutDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ThinDivider {}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: app.margins
|
||||||
|
Layout.leftMargin: app.margins
|
||||||
|
Layout.rightMargin: app.margins
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
text: AWSClient.awsDevices.count === 0 ?
|
||||||
|
qsTr("There are no boxes connected to your cloud yet.") :
|
||||||
|
qsTr("There are %n boxes connected to your cloud.", "", AWSClient.awsDevices.count)
|
||||||
|
}
|
||||||
|
ListView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
clip: true
|
||||||
|
model: AWSClient.awsDevices
|
||||||
|
delegate: MeaListItemDelegate {
|
||||||
|
width: parent.width
|
||||||
|
text: model.name
|
||||||
|
subText: model.id
|
||||||
|
progressive: false
|
||||||
|
prominentSubText: false
|
||||||
|
canDelete: true
|
||||||
|
iconName: "../images/cloud.svg"
|
||||||
|
secondaryIconName: !model.online ? "../images/cloud-error.svg" : ""
|
||||||
|
|
||||||
Button {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.margins: app.margins
|
|
||||||
text: qsTr("Log out")
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
logoutDialog.open()
|
print("clicked, connected:", engine.connection.connected, model.id)
|
||||||
}
|
if (!engine.connection.connected) {
|
||||||
}
|
var host = discovery.nymeaHosts.find(model.id)
|
||||||
|
engine.connection.connect(host);
|
||||||
ThinDivider {}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: app.margins
|
|
||||||
Layout.leftMargin: app.margins
|
|
||||||
Layout.rightMargin: app.margins
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
text: AWSClient.awsDevices.count === 0 ?
|
|
||||||
qsTr("There are no boxes connected to your cloud yet.") :
|
|
||||||
qsTr("There are %n boxes connected to your cloud", "", AWSClient.awsDevices.count)
|
|
||||||
}
|
|
||||||
ListView {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
clip: true
|
|
||||||
model: AWSClient.awsDevices
|
|
||||||
delegate: MeaListItemDelegate {
|
|
||||||
width: parent.width
|
|
||||||
text: model.name
|
|
||||||
subText: model.id
|
|
||||||
progressive: false
|
|
||||||
prominentSubText: false
|
|
||||||
canDelete: true
|
|
||||||
iconName: "../images/cloud.svg"
|
|
||||||
secondaryIconName: !model.online ? "../images/cloud-error.svg" : ""
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
print("clicked, connected:", engine.connection.connected, model.id)
|
|
||||||
if (!engine.connection.connected) {
|
|
||||||
var host = discovery.nymeaHosts.find(model.id)
|
|
||||||
engine.connection.connect(host);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onDeleteClicked: {
|
|
||||||
AWSClient.unpairDevice(model.id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyIndicator {
|
onDeleteClicked: {
|
||||||
anchors.centerIn: parent
|
AWSClient.unpairDevice(model.id);
|
||||||
visible: AWSClient.awsDevices.busy
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BusyIndicator {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
visible: AWSClient.awsDevices.busy
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user