diff --git a/src/wizard/qml/ImportRing.qml b/src/wizard/qml/ImportRing.qml index ffa35a3d..9085a632 100644 --- a/src/wizard/qml/ImportRing.qml +++ b/src/wizard/qml/ImportRing.qml @@ -1,194 +1,194 @@ /*************************************************************************** * Copyright (C) 2017 by Bluesystems * * Author : Emmanuel Lepage Vallee * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * **************************************************************************/ import QtQuick 2.0 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 import Ring 1.0 Item { id: importRing property bool nextAvailable: false property var account: null signal registrationCompleted() function isNextAvailable() { nextAvailable = pinField.text.length > 0 && password.text.length > 0 } function createAccount() { if (!nextAvailable) { console.log("Account creation failed: missing fields") return; } registrationPopup.visible = true registrationTimeout.running = true registrationPopup.color = "white" account = AccountModel.add(WelcomeDialog.defaultUserName, Account.RING) account.archivePassword = password.text account.archivePin = pinField.text account.upnpEnabled = true; account.performAction(Account.SAVE) account.performAction(Account.RELOAD) } ColumnLayout { anchors.fill: parent Label { id: label2 clip: false text: i18n("Link this device") verticalAlignment: Text.AlignVCenter padding: 0 font.bold: true horizontalAlignment: Text.AlignHCenter anchors.leftMargin: 8 anchors.left: parent.left Layout.fillWidth: true /*Behavior on Layout.maximumHeight { NumberAnimation { easing.type: Easing.OutQuad duration: 500 } }*/ } Label { id: label1 text: i18n("Enter your main Ring account password") Layout.fillWidth: true anchors.leftMargin: 8 anchors.left: parent.left } TextField { id: password echoMode: "Password" Layout.fillWidth: true onTextChanged: isNextAvailable() } Label { id: label wrapMode: "WordWrap" - text: i18n("Enter the PIN number form another configured Ring account. Use the \"Export account on Ring\" feature to obtain a PIN.") + text: i18n("Enter the PIN number from another configured Ring account. Use the \"Export account on Ring\" feature to obtain a PIN.") Layout.fillWidth: true anchors.leftMargin: 8 } TextField { id: pinField echoMode: "Password" Layout.fillWidth: true onTextChanged: isNextAvailable() } Rectangle { Layout.fillHeight: true } } Rectangle { id: registrationPopup width: 200 height: 75 color: "#eeeeee" visible: false z: 200 anchors.centerIn: item1 RowLayout { anchors.verticalCenter: parent.verticalCenter BusyIndicator { id: registrationIndicator Layout.fillHeight: false } Label { id: registrationStatus text: i18n("Importing account") Layout.fillHeight: false Layout.fillWidth: true color: "black" } } } // Hide the error message after a second Timer { id: hidePopup repeat: false running: false interval: 1000 onTriggered: { registrationPopup.visible = false } } // Remove the popup after 30 seconds if it didn't finish by then Timer { id: registrationTimeout repeat: false interval: 30000 running: false onTriggered: { registrationPopup.color = "red" registerFoundLabel.text = i18n("Timeout") hidePopup.running = true } } /*transitions: Transition { NumberAnimation { properties: "opacity" easing.type: Easing.OutQuad duration: 500 onStopped: { label2.visible = false userName.visible = false rowLayout.visible = false } } }*/ Connections { target: account onStateChanged: { switch(state) { case Account.ERROR: registrationPopup.color = "red" registrationStatus.text = i18n("Importing failed") hidePopup.running = true registrationTimeout.stop() break case Account.READY: registrationPopup.visible = false registrationTimeout.stop() importRing.registrationCompleted() account = null break } } } } diff --git a/src/wizard/qml/Page1Form.ui.qml b/src/wizard/qml/Page1Form.ui.qml index da253748..70795d42 100644 --- a/src/wizard/qml/Page1Form.ui.qml +++ b/src/wizard/qml/Page1Form.ui.qml @@ -1,127 +1,127 @@ /*************************************************************************** * Copyright (C) 2017 by Bluesystems * * Author : Emmanuel Lepage Vallee * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * **************************************************************************/ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 Page { id: frontPage Rectangle { anchors.fill: parent x: -1 color: "#004d61" } property alias importRingAccount: importRingAccount property alias createRingAccount: createRingAccount property alias createAnonRingAccount: createAnonRingAccount property alias importSIPAccount: importSIPAccount property alias createIp2IPAccount: createIp2IPAccount property alias createRing: createRing property alias importRing: importRing property alias profilePage: profilePage property alias welcomeMessage: text1 property alias logo: image Text { id: text1 anchors.horizontalCenter: parent.horizontalCenter y: 149 width: 423 height: 86 - text: i18n("Welcome to Ring-KDE. Before you can contact your friend, you have to have an account. Don't worry, creating one is easy and doesn't require sharing any personal information. If you are in an office or your phone service provider offers a SIP account, you can also configure Ring-KDE to take your \"real\" phone calls") + text: i18n("Welcome to Ring-KDE. Before you can contact your friend, you have to have an account. Don't worry, creating one is easy and doesn't require sharing any personal information. If you are in an office or your phone service provider offers a SIP account, you can also configure Ring-KDE to take your \"real\" phone calls.") wrapMode: Text.WordWrap font.pixelSize: 12 color: "white" } Button { id: createRingAccount anchors.horizontalCenter: parent.horizontalCenter y: 246 text: i18n("Create a new GNU Ring account") } Button { id: importRingAccount anchors.horizontalCenter: parent.horizontalCenter y: 300 text: i18n("Import an existing account") } Button { id: createAnonRingAccount anchors.horizontalCenter: parent.horizontalCenter y: 354 text: i18n("Use an anonymous account") visible: false } Button { id: importSIPAccount anchors.horizontalCenter: parent.horizontalCenter y: 408 text: i18n("Import a SIP account") visible: false } Button { id: createIp2IPAccount anchors.horizontalCenter: parent.horizontalCenter y: 462 text: i18n("Use on local network") visible: false } Image { id: image anchors.horizontalCenter: parent.horizontalCenter y: 43 width: 100 height: 100 source: "ring-kde.svg" } CreateRing { id: createRing x: -20 y: text1.height + 8 opacity: 0 visible: false width: logo.width + text1.width } ImportRing { id: importRing x: -20 y: text1.height + 8 opacity: 0 visible: false width: logo.width + text1.width } ProfilePage { id: profilePage visible: false y: text1.height + 8 height: parent.height - text1.height - 8 -45/*footer.height*/ width: parent.width anchors.bottomMargin: 45/*footer.height*/ anchors.topMargin: 12 } } diff --git a/src/wizard/qml/StartingPageForm.ui.qml b/src/wizard/qml/StartingPageForm.ui.qml index fff69798..9873bbeb 100644 --- a/src/wizard/qml/StartingPageForm.ui.qml +++ b/src/wizard/qml/StartingPageForm.ui.qml @@ -1,207 +1,207 @@ /*************************************************************************** * Copyright (C) 2017 by Bluesystems * * Author : Emmanuel Lepage Vallee * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * **************************************************************************/ import QtQuick 2.4 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 Item { property alias background: background property alias whatsNew: swipeView width: 400 height: 400 Rectangle { id: background anchors.fill: parent color: "#0886a0" x: 51 y: 40 width: 200 height: 200 ColumnLayout { id: columnLayout anchors.fill: parent RowLayout { id: rowLayout clip: true Layout.maximumHeight: 500 Layout.fillWidth: true Image { id: image1 height: 200 Layout.maximumHeight: 200 Layout.alignment: Qt.AlignRight | Qt.AlignVCenter fillMode: Image.PreserveAspectFit source: "beta_logo.svg" Layout.fillHeight: true Layout.fillWidth: true } Image { id: image fillMode: Image.PreserveAspectFit height: widthparent.maxHeight ? parent.maxHeight : width ) width: (parent.rowWidth) < parent.minWidth ? parent.minWidth : ( parent.rowWidth > parent.maxWidth ? parent.maxWidth : parent.rowWidth) source: "people.svg" Layout.fillHeight: true Layout.fillWidth: false Layout.maximumHeight: 300 Layout.maximumWidth: 300 Layout.preferredHeight: parent.height Layout.preferredWidth: parent.height anchors.verticalCenter: parent.verticalCenter } } Item { height: 40 } SwipeView { id: swipeView clip: true Layout.fillHeight: true Layout.fillWidth: true RowLayout { Image { Layout.fillHeight: true source: "image://icon/channel-secure-symbolic" Layout.preferredWidth: 100 fillMode: Image.PreserveAspectFit } Label { wrapMode: Text.WordWrap clip: true - text: i18n("Ring-KDE allows you to communicate privately with your friends. It uses peer to peer technologies popularised by BitTorrent to create a decentralized network of users. There is no central server and all communications are end-to-end encrypted. ") + text: i18n("Ring-KDE allows you to communicate privately with your friends. It uses peer to peer technologies popularised by BitTorrent to create a decentralized network of users. There is no central server and all communications are end-to-end encrypted.") Layout.fillWidth: true Layout.fillHeight: true } } RowLayout { Image { Layout.fillHeight: true source: "image://icon/text-directory" Layout.preferredWidth: 100 fillMode: Image.PreserveAspectFit } Label { wrapMode: Text.WordWrap clip: true - text: i18n("Ring-KDE stores all data locally using standard formats such as JSON, vCard, MIME, PCM/WAV, INI ans X-509. No data is ever uploaded to external servers.") + text: i18n("Ring-KDE stores all data locally using standard formats such as JSON, vCard, MIME, PCM/WAV, INI and X-509. No data is ever uploaded to external servers.") Layout.fillWidth: true Layout.fillHeight: true } } RowLayout { Image { Layout.fillHeight: true source: "image://icon/call-start" Layout.preferredWidth: 100 fillMode: Image.PreserveAspectFit } Label { wrapMode: Text.WordWrap clip: true - text: i18n("Ring-KDE supports your office phone account. Answers, transfer and record your phone calls directly from KDE") + text: i18n("Ring-KDE supports your office phone account. Answers, transfer and record your phone calls directly from KDE.") Layout.fillWidth: true Layout.fillHeight: true } } RowLayout { Image { Layout.fillHeight: true source: "image://icon/standard-connector" Layout.preferredWidth: 100 fillMode: Image.PreserveAspectFit } Label { wrapMode: Text.WordWrap clip: true - text: i18n("Ring is based on open standards and is can interoperate with other SIP compliant systems.") + text: i18n("Ring is based on open standards and it can interoperate with other SIP compliant systems.") Layout.fillWidth: true Layout.fillHeight: true } } RowLayout { Image { Layout.fillHeight: true source: "image://icon/text-x-python" Layout.preferredWidth: 100 fillMode: Image.PreserveAspectFit } Label { wrapMode: Text.WordWrap clip: true text: i18n("Ring offers an user friendly DBus API to automate all aspects of the application.") Layout.fillWidth: true Layout.fillHeight: true } } RowLayout { Image { Layout.fillHeight: true source: "image://icon/call-start" Layout.preferredWidth: 100 fillMode: Image.PreserveAspectFit } Label { wrapMode: Text.WordWrap clip: true text: i18n("Ring-KDE can call real phone numbers. Cheap credits are available from thousand of providers worldwide. Use your favorite search engine to locate a local SIP phone provider.") Layout.fillWidth: true Layout.fillHeight: true } } } Label { id: label color: "white" text: i18n("Press anywhere to begin") font.pointSize: 12 horizontalAlignment: Text.AlignHCenter Layout.fillWidth: true font.bold: true Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter } } } }