diff --git a/gemini/qml/welcomepages/cloud/AddDropbox.qml b/gemini/qml/welcomepages/cloud/AddDropbox.qml index 9db487d4022..c3bf0b6df9a 100644 --- a/gemini/qml/welcomepages/cloud/AddDropbox.qml +++ b/gemini/qml/welcomepages/cloud/AddDropbox.qml @@ -1,57 +1,58 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 import "../../components" import "dropbox" as Dropbox Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property string serviceName: ""; property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); + topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } - opacity: 0.3; + opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } Dropbox.SetupPage { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(8); } CohereButton { anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Close"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/AddGit.qml b/gemini/qml/welcomepages/cloud/AddGit.qml index 5a4feef1a5c..b7a890abdec 100644 --- a/gemini/qml/welcomepages/cloud/AddGit.qml +++ b/gemini/qml/welcomepages/cloud/AddGit.qml @@ -1,63 +1,64 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 import "../../components" Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property string serviceName: ""; property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); + topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } - opacity: 0.3; + opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } Loader { anchors { top: parent.top; left: parent.left; right: parent.right; bottom: closeButton.top; margins: Settings.theme.adjustedPixel(8); } source: "git/createCheckoutContainer.qml"; } CohereButton { id: closeButton; anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Close"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/AddWebdav.qml b/gemini/qml/welcomepages/cloud/AddWebdav.qml index a6080e92c7b..2fd6aad3248 100644 --- a/gemini/qml/welcomepages/cloud/AddWebdav.qml +++ b/gemini/qml/welcomepages/cloud/AddWebdav.qml @@ -1,57 +1,58 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 import "../../components" Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property string serviceName: ""; property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); + topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } - opacity: 0.3; + opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } Label { anchors.fill: parent; horizontalAlignment: Text.AlignHCenter; text: "Sorry, support for WebDav is not yet implemented."; } CohereButton { anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Close"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/CloudAccounts.qml b/gemini/qml/welcomepages/cloud/CloudAccounts.qml index 58737b770d1..b7579792814 100644 --- a/gemini/qml/welcomepages/cloud/CloudAccounts.qml +++ b/gemini/qml/welcomepages/cloud/CloudAccounts.qml @@ -1,227 +1,230 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 import Calligra.Gemini.Dropbox 1.0 import "../../components" import "dropbox" as Dropbox import "git" as Git Page { id: base; property string pageName: "accountsPage"; property QtObject accountsList; Connections { target: controllerMIT; onNeedAuthenticateChanged: { if(controllerMIT.needAuthenticate) { cloudAccounts.removeAccountByName("Dropbox"); } else { cloudAccounts.addAccount("Dropbox", "DropBox", "accountsPageDropbox", 0, true); } } } Component.onCompleted: { if(!controllerMIT.needAuthenticate) { cloudAccounts.addAccount("Dropbox", "DropBox", "accountsPageDropbox", 0, true); } } ListView { id: accountsView; anchors { top: parent.top; left: parent.left; right: parent.right; bottom: bottomButtons.top; } clip: true; model: accountsList; delegate: Item { height: Settings.theme.adjustedPixel(64); width: ListView.view.width; Label { anchors.fill: parent; text: model.text; horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter; font: Settings.theme.font("templateLabel"); color: "#5b6573"; } Row { anchors { verticalCenter: parent.verticalCenter; right: parent.right; } width: childrenRect.width; spacing: Settings.theme.adjustedPixel(8); Text { text: model.accountType; width: Settings.theme.adjustedPixel(100); height: parent.height; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter; font: Settings.theme.font("templateLabel"); color: "#5b6573"; visible: model.accountType !== "DropBox"; } CohereButton { anchors.verticalCenter: parent.verticalCenter; text: (model.accountType === "DropBox") ? "Sign Out" : "Edit Account"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: { dlgStack.replace(base.editComponentFromName(model.accountType)); if(dlgStack.currentPage.accountIndex !== undefined) { dlgStack.currentPage.accountIndex = index; dlgStack.currentPage.text = model.text; } } } CohereButton { anchors.verticalCenter: parent.verticalCenter; text: "Remove"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; visible: model.accountType !== "DropBox"; onClicked: { dlgStack.replace(removeAccountDlg); if(dlgStack.currentPage.accountIndex !== undefined) { dlgStack.currentPage.accountIndex = index; dlgStack.currentPage.text = model.text; } } } } } } Label { anchors.fill: accountsView; text: "You have no cloud accounts defined. Please add one by clicking on your service of choice below."; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; font: Settings.theme.font("templateLabel"); color: "#5b6573"; opacity: accountsList.count === 0 ? 1 : 0; Behavior on opacity { PropertyAnimation { duration: Constants.AnimationDuration; } } } Item { id: bottomButtons; anchors { left: parent.left; right: parent.right; bottom: parent.bottom; } height: bottomButtonRow.height + Settings.theme.adjustedPixel(8); Label { anchors.fill: parent; text: "Add new account:"; horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter; font: Settings.theme.font("templateLabel"); color: "#5b6573"; } Row { id: bottomButtonRow; anchors { verticalCenter: parent.verticalCenter; right: parent.right; } height: childrenRect.height; spacing: Settings.theme.adjustedPixel(8); Repeater { model: ListModel { ListElement { text: "Dropbox"; accountType: "DropBox"; serviceName: "dropbox"; } ListElement { text: "WebDav"; accountType: "WebDav"; serviceName: ""; } //ListElement { text: "ownCloud"; accountType: "WebDav"; serviceName: "ownCloud"; } ListElement { text: "Git"; accountType: "Git"; serviceName: ""; } //ListElement { text: "GitHub"; accountType: "Git"; serviceName: "github"; } //ListElement { text: "bitbucket (git)"; accountType: "Git"; serviceName: "bitbucket"; } } CohereButton { text: model.text textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: { dlgStack.replace(base.addComponentFromName(model.accountType)); dlgStack.currentPage.serviceName = model.serviceName; } } } } } PageStack { id: dlgStack; - anchors.fill: base; + anchors { + fill: base; + margins: -Settings.theme.adjustedPixel(8); + } initialPage: addEmptyComp; } function addComponentFromName(name) { var elements = { "DropBox": addDropBox, "WebDav": addWebDav, "Git": addGit }; return elements[name]; } Component { id: addEmptyComp; Item {} } Component { id: addDropBox; AddDropbox { addEmpty: addEmptyComp; } } Component { id: addWebDav; AddWebdav { addEmpty: addEmptyComp; } } Component { id: addGit; AddGit { addEmpty: addEmptyComp; } } function editComponentFromName(name) { var elements = { "DropBox": editDropBox, "WebDav": editWebDav, "Git": editGit }; return elements[name]; } Component { id: editDropBox; AddDropbox { addEmpty: addEmptyComp; } } Component { id: editWebDav; EditDetailsBase { addEmpty: addEmptyComp; } } Component { id: editGit; EditGit { addEmpty: addEmptyComp; } } Component { id: removeAccountDlg; RemoveAccountDlg { addEmpty: addEmptyComp; } } } diff --git a/gemini/qml/welcomepages/cloud/EditDetailsBase.qml b/gemini/qml/welcomepages/cloud/EditDetailsBase.qml index 84d5f3be3f6..69700ab7c29 100644 --- a/gemini/qml/welcomepages/cloud/EditDetailsBase.qml +++ b/gemini/qml/welcomepages/cloud/EditDetailsBase.qml @@ -1,84 +1,85 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 import "../../components" Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property int accountIndex: -1; property string text; onTextChanged: { nameField.text = text; } property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); + topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } - opacity: 0.3; + opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } TextField { id: nameField; anchors { verticalCenter: parent.verticalCenter; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } placeholder: "Account Name"; } CohereButton { id: okButton; anchors { bottom: parent.bottom; right: cancelButton.left; margins: Settings.theme.adjustedPixel(8); } text: "Save"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: { cloudAccounts.renameAccount(base.accountIndex, nameField.text); dlgStack.replace(addEmpty); } } CohereButton { id: cancelButton; anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Cancel"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: dlgStack.replace(addEmpty); } } diff --git a/gemini/qml/welcomepages/cloud/EditGit.qml b/gemini/qml/welcomepages/cloud/EditGit.qml index ad1a0849c83..86105a46bc7 100644 --- a/gemini/qml/welcomepages/cloud/EditGit.qml +++ b/gemini/qml/welcomepages/cloud/EditGit.qml @@ -1,120 +1,121 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 import "../../components" Rectangle { id: base; anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property int accountIndex: -1; onAccountIndexChanged: { accountDetails = cloudAccounts.accountDetails(accountIndex); } property string text; onTextChanged: { nameField.text = text; } property QtObject accountDetails; property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); + topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } - opacity: 0.3; + opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } TextField { id: nameField; anchors { verticalCenter: parent.verticalCenter; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } placeholder: "Account Name"; } CohereButton { id: credentialsButton; anchors { top: nameField.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Edit User Credentials"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: { dlgStack.push(userCredentials.item); if(accountDetails.readProperty("userForRemote") !== undefined) { dlgStack.currentPage.userForRemote = accountDetails.readProperty("userForRemote"); } if(accountDetails.readProperty("privateKeyFile") !== undefined) { dlgStack.currentPage.privateKeyFile = accountDetails.readProperty("privateKeyFile"); } if(accountDetails.readProperty("publicKeyFile") !== undefined) { dlgStack.currentPage.publicKeyFile = accountDetails.readProperty("publicKeyFile"); } if(accountDetails.readProperty("needsPrivateKeyPassphrase") !== undefined) { dlgStack.currentPage.needsPrivateKeyPassphrase = accountDetails.readProperty("needsPrivateKeyPassphrase"); } } } CohereButton { id: okButton; anchors { bottom: parent.bottom; right: cancelButton.left; margins: Settings.theme.adjustedPixel(8); } text: "Save"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: { cloudAccounts.renameAccount(base.accountIndex, nameField.text); dlgStack.replace(addEmpty); } } CohereButton { id: cancelButton; anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Cancel"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: dlgStack.replace(addEmpty); } Loader { id: userCredentials; source: "git/userCredentialsContainer.qml" } } diff --git a/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml b/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml index 42d9cc92dcc..c936f6482ad 100644 --- a/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml +++ b/gemini/qml/welcomepages/cloud/RemoveAccountDlg.qml @@ -1,111 +1,112 @@ /* This file is part of the KDE project * Copyright (C) 2014 Dan Leinir Turthra Jensen * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import org.calligra 1.0 import "../../components" Rectangle { anchors.fill: parent; anchors.margins: Settings.theme.adjustedPixel(16); property int accountIndex: -1; property string text; onTextChanged: { nameField.text = text; } property Component addEmpty; radius: Settings.theme.adjustedPixel(8); color: "white"; Rectangle { anchors { fill: parent; margins: -Settings.theme.adjustedPixel(16); + topMargin: -(Settings.theme.adjustedPixel(8) + Constants.GridHeight * 1.5); } - opacity: 0.3; + opacity: 0.5; color: "white"; MouseArea { anchors.fill: parent; onClicked: { /*nothing */ } } SimpleTouchArea { anchors.fill: parent; onTouched: { /*nothing */ } } } Text { anchors { bottom: parent.verticalCenter; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; font: Settings.theme.font("application"); text: "Do you wish to remove this account?"; } Text { id: nameField; anchors { top: parent.verticalCenter; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; font: Settings.theme.font("application"); } Text { anchors { top: nameField.bottom; left: parent.left; right: parent.right; margins: Settings.theme.adjustedPixel(16); } verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; font: Settings.theme.font("applicationSemi"); text: "(removing the account will leave all files in place, this only removes it from Calligra Gemini's list)"; } CohereButton { id: okButton; anchors { bottom: parent.bottom; right: cancelButton.left; margins: Settings.theme.adjustedPixel(8); } text: "Remove Account"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: { cloudAccounts.removeAccount(base.accountIndex); dlgStack.replace(addEmpty); } } CohereButton { id: cancelButton; anchors { bottom: parent.bottom; right: parent.right; margins: Settings.theme.adjustedPixel(8); } text: "Cancel"; textColor: "#5b6573"; textSize: Settings.theme.adjustedPixel(18); color: "#D2D4D5"; onClicked: dlgStack.replace(addEmpty); } }