Fix some issues in cloud login page
This commit is contained in:
parent
d984a9d39c
commit
0cadc3a542
@ -503,9 +503,9 @@
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>There are %n boxes connected to your cloud</source>
|
||||
<translation>
|
||||
<numerusform>Es ist %1 Box mit Deiner Cloud verbunden</numerusform>
|
||||
<numerusform>Es sind %1 Boxen mit Deiner Cloud verbunden</numerusform>
|
||||
<translation type="vanished">
|
||||
<numerusform>Es ist %n Box mit Deiner Cloud verbunden</numerusform>
|
||||
<numerusform>Es sind %n Boxen mit Deiner Cloud verbunden</numerusform>
|
||||
</translation>
|
||||
</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>
|
||||
<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 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>
|
||||
<name>CloudSettingsPage</name>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>AWSPasswordTextField</name>
|
||||
<message>
|
||||
@ -334,8 +334,9 @@
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>There are %n boxes connected to your cloud</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform></numerusform>
|
||||
<translation type="obsolete">
|
||||
<numerusform>There is %n box connected to your cloud.</numerusform>
|
||||
<numerusform>There are %n boxes connected to your cloud.</numerusform>
|
||||
</translation>
|
||||
</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>
|
||||
<translation type="unfinished"></translation>
|
||||
</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>
|
||||
<name>CloudSettingsPage</name>
|
||||
|
||||
@ -37,77 +37,72 @@ Page {
|
||||
}
|
||||
}
|
||||
|
||||
Flickable {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
interactive: contentHeight > height
|
||||
contentHeight: childrenRect.height
|
||||
visible: AWSClient.isLoggedIn
|
||||
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: app.margins
|
||||
Layout.leftMargin: app.margins
|
||||
Layout.rightMargin: app.margins
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("Logged in as %1").arg(AWSClient.username)
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: app.margins
|
||||
Layout.leftMargin: app.margins
|
||||
Layout.rightMargin: app.margins
|
||||
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: {
|
||||
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" : ""
|
||||
|
||||
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);
|
||||
print("clicked, connected:", engine.connection.connected, model.id)
|
||||
if (!engine.connection.connected) {
|
||||
var host = discovery.nymeaHosts.find(model.id)
|
||||
engine.connection.connect(host);
|
||||
}
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
visible: AWSClient.awsDevices.busy
|
||||
onDeleteClicked: {
|
||||
AWSClient.unpairDevice(model.id);
|
||||
}
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
visible: AWSClient.awsDevices.busy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user