Skip to content
Snippets Groups Projects
Commit 46da989a authored by Sébastien Blin's avatar Sébastien Blin
Browse files

settings: move link device button

Change-Id: Ibafb7afb3eb4fa373a02120ae3575254c645a5c8
GitLab: #1253
parent 1a463ec6
No related branches found
No related tags found
No related merge requests found
...@@ -417,7 +417,7 @@ Item { ...@@ -417,7 +417,7 @@ Item {
// accountSettingsPages // accountSettingsPages
property string customizeAccountDescription: qsTr("Your profile is only shared with your contacts.\nYour picture and your nickname can be changed at all time in the settings of your account.") property string customizeAccountDescription: qsTr("Your profile is only shared with your contacts.\nYour picture and your nickname can be changed at all time in the settings of your account.")
property string usernameAccountDescription: qsTr("A chosen username can help to be found more easily on Jami.\nIf a username is not chosen, a randomly generated 40-character identifier will be assigned to this account as a username. It is more difficult to be found and reached with this identifier.") property string usernameAccountDescription: qsTr("A chosen username can help to be found more easily on Jami.\nIf a username is not chosen, a randomly generated 40-character identifier will be assigned to this account as a username. It is more difficult to be found and reached with this identifier.")
property string ecryptAccountDescription: qsTr("Your Jami account is registered only on this device as an archive containing the keys of your account. Access to this archive can be protected by a password.") property string encryptAccountDescription: qsTr("Your Jami account is registered only on this device as an archive containing the keys of your account. Access to this archive can be protected by a password.")
property string saveAccountTitle: qsTr("Backup account") property string saveAccountTitle: qsTr("Backup account")
property string saveAccountDescription: qsTr("This Jami account exists only on this device.\nThe account will be lost if this device is lost or the application is uninstalled. It is recommended to make a backup of this account.") property string saveAccountDescription: qsTr("This Jami account exists only on this device.\nThe account will be lost if this device is lost or the application is uninstalled. It is recommended to make a backup of this account.")
property string deleteAccountTitle: qsTr("Delete your account") property string deleteAccountTitle: qsTr("Delete your account")
...@@ -425,7 +425,6 @@ Item { ...@@ -425,7 +425,6 @@ Item {
property string linkedAccountList: qsTr("List of the devices that are linked to this account:") property string linkedAccountList: qsTr("List of the devices that are linked to this account:")
property string linkedThisDevice: qsTr("This device") property string linkedThisDevice: qsTr("This device")
property string linkedOtherDevices: qsTr("Other linked devices") property string linkedOtherDevices: qsTr("Other linked devices")
property string linkedAccountDescription: qsTr("Linking this account to other devices enables it to be used on other devices.")
// CurrentAccountSettings && AdvancedSettings // CurrentAccountSettings && AdvancedSettings
property string backupSuccessful: qsTr("Backup successful") property string backupSuccessful: qsTr("Backup successful")
...@@ -448,7 +447,11 @@ Item { ...@@ -448,7 +447,11 @@ Item {
property string encryptTitle: qsTr("Encrypt account with a password") property string encryptTitle: qsTr("Encrypt account with a password")
property string encryptDescription: qsTr("A Jami account is created and stored locally only on this device, as an archive containing your account keys. Access to this archive can optionally be protected by a password.") property string encryptDescription: qsTr("A Jami account is created and stored locally only on this device, as an archive containing your account keys. Access to this archive can optionally be protected by a password.")
property string encryptWarning: qsTr("Please note that if you lose your password, it CANNOT be recovered!") property string encryptWarning: qsTr("Please note that if you lose your password, it CANNOT be recovered!")
property string enterNickname: qsTr("Enter a nickname, surname...") property string enterNickname: qsTr("Enter a nickname, surname…")
property string linkTitle: qsTr("Use this account on other devices")
property string linkDescription: qsTr("This account is created and stored locally, if you want to use it on another device you have to link the new device to this account.")
property string linkAnotherDevice: qsTr("Link device")
// NameRegistrationDialog // NameRegistrationDialog
property string setUsername: qsTr("Set username") property string setUsername: qsTr("Set username")
...@@ -461,7 +464,6 @@ Item { ...@@ -461,7 +464,6 @@ Item {
// LinkedDevices // LinkedDevices
property string tipLinkNewDevice: qsTr("Link a new device to this account") property string tipLinkNewDevice: qsTr("Link a new device to this account")
property string linkAnotherDevice: qsTr("Link a new device")
property string linkNewDevice: qsTr("Exporting account…") property string linkNewDevice: qsTr("Exporting account…")
property string removeDevice: qsTr("Remove Device") property string removeDevice: qsTr("Remove Device")
property string sureToRemoveDevice: qsTr("Are you sure you wish to remove this device?") property string sureToRemoveDevice: qsTr("Are you sure you wish to remove this device?")
......
...@@ -83,44 +83,5 @@ SettingsPageBase { ...@@ -83,44 +83,5 @@ SettingsPageBase {
title: JamiStrings.linkedOtherDevices title: JamiStrings.linkedOtherDevices
} }
} }
Text {
id: linkedDevicesDescription
Layout.alignment: Qt.AlignLeft
Layout.preferredWidth: parent.width
visible: (CurrentAccount.managerUri === "" && CurrentAccount.enabled)
text: JamiStrings.linkedAccountDescription
color: JamiTheme.textColor
horizontalAlignment: Text.AlignLeft
wrapMode: Text.WordWrap
font.pixelSize: JamiTheme.settingsDescriptionPixelSize
font.kerning: true
lineHeight: JamiTheme.wizardViewTextLineHeight
}
MaterialButton {
id: linkDevPushButton
TextMetrics {
id: linkDevPushButtonTextSize
font.weight: Font.Bold
font.pixelSize: JamiTheme.wizardViewButtonFontPixelSize
text: linkDevPushButton.text
}
Layout.alignment: Qt.AlignLeft
preferredWidth: linkDevPushButtonTextSize.width + 2 * JamiTheme.buttontextWizzardPadding
visible: CurrentAccount.managerUri === "" && CurrentAccount.enabled
primary: true
toolTipText: JamiStrings.tipLinkNewDevice
text: JamiStrings.linkAnotherDevice
onClicked: viewCoordinator.presentDialog(appWindow, "settingsview/components/LinkDeviceDialog.qml")
}
} }
} }
...@@ -161,6 +161,68 @@ SettingsPageBase { ...@@ -161,6 +161,68 @@ SettingsPageBase {
} }
} }
ColumnLayout {
id: linkDevice
Layout.fillWidth: true
visible: !isSIP && CurrentAccount.managerUri === ""
spacing: JamiTheme.settingsCategorySpacing
Text {
id: linkTitle
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
text: JamiStrings.linkTitle
color: JamiTheme.textColor
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
font.pixelSize: JamiTheme.settingsTitlePixelSize
font.kerning: true
}
Text {
id: linkDescription
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
text: JamiStrings.linkDescription
color: JamiTheme.textColor
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
font.pixelSize: JamiTheme.settingsDescriptionPixelSize
font.kerning: true
lineHeight: JamiTheme.wizardViewTextLineHeight
}
MaterialButton {
id: linkDeviceBtn
TextMetrics {
id: linkDeviceBtnTextSize
font.weight: Font.Bold
font.pixelSize: JamiTheme.wizardViewButtonFontPixelSize
text: linkDeviceBtn.text
}
preferredWidth: linkDeviceBtnTextSize.width + 2 * JamiTheme.buttontextWizzardPadding
primary: true
Layout.alignment: Qt.AlignLeft
toolTipText: JamiStrings.tipLinkNewDevice
text: JamiStrings.linkAnotherDevice
onClicked: viewCoordinator.presentDialog(appWindow, "settingsview/components/LinkDeviceDialog.qml")
}
}
ColumnLayout { ColumnLayout {
id: encryptAccount id: encryptAccount
...@@ -190,7 +252,7 @@ SettingsPageBase { ...@@ -190,7 +252,7 @@ SettingsPageBase {
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true Layout.fillWidth: true
text: JamiStrings.ecryptAccountDescription text: JamiStrings.encryptAccountDescription
color: JamiTheme.textColor color: JamiTheme.textColor
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
......
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