From 00377c1d324c03f07e9d2c3d19dce12ce3dc6620 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 23 Aug 2018 12:21:43 +0200 Subject: Revert "Add caldav and carddav URLs + rename Gmail -> Google" This reverts commit ef1cf433c9598430654e87790fdb1be11f82ecd1. --- CMakeLists.txt | 4 +- accounts/CMakeLists.txt | 2 +- accounts/gmail/CMakeLists.txt | 19 +++++++ accounts/gmail/gmailaccountplugin.cpp | 29 +++++++++++ accounts/gmail/gmailaccountplugin.h | 31 +++++++++++ accounts/gmail/gmailsettings.cpp | 55 ++++++++++++++++++++ accounts/gmail/gmailsettings.h | 33 ++++++++++++ accounts/gmail/metadata.json | 4 ++ accounts/gmail/qml/AccountSettings.qml | 92 +++++++++++++++++++++++++++++++++ accounts/gmail/qml/Login.qml | 60 +++++++++++++++++++++ accounts/gmail/qmldir | 3 ++ accounts/google/CMakeLists.txt | 19 ------- accounts/google/googleaccountplugin.cpp | 29 ----------- accounts/google/googleaccountplugin.h | 31 ----------- accounts/google/googlesettings.cpp | 63 ---------------------- accounts/google/googlesettings.h | 33 ------------ accounts/google/metadata.json | 4 -- accounts/google/qml/AccountSettings.qml | 92 --------------------------------- accounts/google/qml/Login.qml | 60 --------------------- accounts/google/qmldir | 3 -- 20 files changed, 329 insertions(+), 337 deletions(-) create mode 100644 accounts/gmail/CMakeLists.txt create mode 100644 accounts/gmail/gmailaccountplugin.cpp create mode 100644 accounts/gmail/gmailaccountplugin.h create mode 100644 accounts/gmail/gmailsettings.cpp create mode 100644 accounts/gmail/gmailsettings.h create mode 100644 accounts/gmail/metadata.json create mode 100644 accounts/gmail/qml/AccountSettings.qml create mode 100644 accounts/gmail/qml/Login.qml create mode 100644 accounts/gmail/qmldir delete mode 100644 accounts/google/CMakeLists.txt delete mode 100644 accounts/google/googleaccountplugin.cpp delete mode 100644 accounts/google/googleaccountplugin.h delete mode 100644 accounts/google/googlesettings.cpp delete mode 100644 accounts/google/googlesettings.h delete mode 100644 accounts/google/metadata.json delete mode 100644 accounts/google/qml/AccountSettings.qml delete mode 100644 accounts/google/qml/Login.qml delete mode 100644 accounts/google/qmldir diff --git a/CMakeLists.txt b/CMakeLists.txt index 5924c124..25cc0fff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,10 +10,10 @@ cmake_policy(SET CMP0048 NEW) cmake_policy(SET CMP0053 NEW) cmake_policy(SET CMP0063 NEW) -option(EXPERIMENTAL_VIEWS "Install experimental views" ON) +option(EXPERIMENTAL_VIEWS "Install experimental views" OFF) #Do not enable this unless you actually distribute a custom extension. option(ENABLE_EXTENSION "Enable custom kube extensions" OFF) -set(AVAILABLE_ACCOUNT_PLUGINS "kolabnow" "google" "generic" CACHE STRING "List of enabled account plugins (provide as semicolon separated string)" ) +set(AVAILABLE_ACCOUNT_PLUGINS "kolabnow" "gmail" "generic" CACHE STRING "List of enabled account plugins (provide as semicolon separated string)" ) include(CPack) include(FeatureSummary) diff --git a/accounts/CMakeLists.txt b/accounts/CMakeLists.txt index 0209f00b..76a11c54 100644 --- a/accounts/CMakeLists.txt +++ b/accounts/CMakeLists.txt @@ -12,5 +12,5 @@ endmacro(install_qml_account) add_subdirectory(maildir) add_subdirectory(imap) add_subdirectory(kolabnow) -add_subdirectory(google) +add_subdirectory(gmail) add_subdirectory(generic) diff --git a/accounts/gmail/CMakeLists.txt b/accounts/gmail/CMakeLists.txt new file mode 100644 index 00000000..f8baee04 --- /dev/null +++ b/accounts/gmail/CMakeLists.txt @@ -0,0 +1,19 @@ +project(kube-accounts-gmail) + +set(SRCS + gmailsettings.cpp + gmailaccountplugin.cpp +) + +add_library(gmailaccountplugin SHARED ${SRCS}) +target_link_libraries(gmailaccountplugin + sink + frameworkplugin + Qt5::Core + Qt5::Quick + Qt5::Qml +) + +install(TARGETS gmailaccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/gmail) +install(FILES metadata.json DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/gmail) +install_qml_account(gmail) diff --git a/accounts/gmail/gmailaccountplugin.cpp b/accounts/gmail/gmailaccountplugin.cpp new file mode 100644 index 00000000..53218939 --- /dev/null +++ b/accounts/gmail/gmailaccountplugin.cpp @@ -0,0 +1,29 @@ +/* + Copyright (c) 2016 Christian Mollekopf + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library 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 Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ +#include "gmailaccountplugin.h" + +#include "gmailsettings.h" + +#include + +void GmailAccountPlugin::registerTypes (const char *uri) +{ + Q_ASSERT(uri == QLatin1String("org.kube.accounts.gmail")); + qmlRegisterType(uri, 1, 0, "GmailSettings"); +} diff --git a/accounts/gmail/gmailaccountplugin.h b/accounts/gmail/gmailaccountplugin.h new file mode 100644 index 00000000..5876e393 --- /dev/null +++ b/accounts/gmail/gmailaccountplugin.h @@ -0,0 +1,31 @@ +/* + Copyright (c) 2016 Christian Mollekopf + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library 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 Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ +#pragma once + +#include +#include + +class GmailAccountPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + virtual void registerTypes(const char *uri); +}; diff --git a/accounts/gmail/gmailsettings.cpp b/accounts/gmail/gmailsettings.cpp new file mode 100644 index 00000000..a50668b8 --- /dev/null +++ b/accounts/gmail/gmailsettings.cpp @@ -0,0 +1,55 @@ +/* + Copyright (c) 2016 Christian Mollekopf + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library 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 Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ +#include "gmailsettings.h" + +GmailSettings::GmailSettings(QObject *parent) + : AccountSettings(parent) +{ +} + +void GmailSettings::load() +{ + loadAccount(); + loadImapResource(); + loadMailtransportResource(); + loadIdentity(); +} + +void GmailSettings::save() +{ + mImapServer = "imaps://imap.gmail.com:993"; + mImapUsername = mEmailAddress; + + mSmtpServer = "smtps://smtp.gmail.com:587"; + mSmtpUsername = mEmailAddress; + + saveAccount(); + saveImapResource(); + saveMailtransportResource(); + saveIdentity(); +} + +void GmailSettings::remove() +{ + removeResource(mMailtransportIdentifier); + removeResource(mImapIdentifier); + removeIdentity(); + removeAccount(); +} + diff --git a/accounts/gmail/gmailsettings.h b/accounts/gmail/gmailsettings.h new file mode 100644 index 00000000..708cb94b --- /dev/null +++ b/accounts/gmail/gmailsettings.h @@ -0,0 +1,33 @@ +/* + Copyright (c) 2016 Christian Mollekopf + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library 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 Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ +#pragma once + +#include + +class GmailSettings : public AccountSettings +{ + Q_OBJECT + +public: + GmailSettings(QObject *parent = 0); + + Q_INVOKABLE virtual void load() Q_DECL_OVERRIDE; + Q_INVOKABLE virtual void save() Q_DECL_OVERRIDE; + Q_INVOKABLE virtual void remove() Q_DECL_OVERRIDE; +}; diff --git a/accounts/gmail/metadata.json b/accounts/gmail/metadata.json new file mode 100644 index 00000000..68c06971 --- /dev/null +++ b/accounts/gmail/metadata.json @@ -0,0 +1,4 @@ +{ + "Name": "GMail", + "RequiresKeyring": true +} diff --git a/accounts/gmail/qml/AccountSettings.qml b/accounts/gmail/qml/AccountSettings.qml new file mode 100644 index 00000000..d7df5eaf --- /dev/null +++ b/accounts/gmail/qml/AccountSettings.qml @@ -0,0 +1,92 @@ +/* + Copyright (C) 2016 Michael Bohlender, + Copyright (C) 2017 Christian Mollekopf, + + 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.4 +import QtQuick.Layouts 1.1 +import org.kube.framework 1.0 as Kube +import org.kube.accounts.gmail 1.0 as GmailAccount + +Item { + + property string accountId + property string heading: qsTr("Connect your GMail account") + property string subheadline: qsTr("To let Kube access your account, fill in email address, username and give the account a title that will be displayed inside Kube.") + property bool valid: true + implicitHeight: grid.implicitHeight + + GmailAccount.GmailSettings { + id: gmailSettings + accountIdentifier: accountId + accountType: "gmail" + } + + function save(){ + gmailSettings.save() + } + + function remove(){ + gmailSettings.remove() + } + + GridLayout { + id: grid + anchors.fill: parent + columns: 2 + columnSpacing: Kube.Units.largeSpacing + rowSpacing: Kube.Units.largeSpacing + + Kube.Label { + text: "Please note that GMail requires you to configure your account to allow IMAP connections from Kube: +
    +
  1. See https://support.google.com/mail/answer/7126229 to configure your account to allow IMAP connections. +
  2. Visit https://myaccount.google.com/lesssecureapps and enable the setting to allow Kube to connect to your account." + Layout.alignment: Qt.AlignCenter + Layout.columnSpan: 2 + textFormat: Text.StyledText + } + + Kube.Label { + text: qsTr("Name") + Layout.alignment: Qt.AlignRight + } + Kube.TextField { + Layout.fillWidth: true + placeholderText: qsTr("Your name") + text: gmailSettings.userName + onTextChanged: { + gmailSettings.userName = text + } + } + + Kube.Label { + text: qsTr("Email address") + Layout.alignment: Qt.AlignRight + } + Kube.TextField { + Layout.fillWidth: true + + text: gmailSettings.emailAddress + onTextChanged: { + gmailSettings.emailAddress = text + gmailSettings.accountName = text + } + placeholderText: qsTr("Your email address") + } + } +} diff --git a/accounts/gmail/qml/Login.qml b/accounts/gmail/qml/Login.qml new file mode 100644 index 00000000..bcab19be --- /dev/null +++ b/accounts/gmail/qml/Login.qml @@ -0,0 +1,60 @@ +/* + Copyright (C) 2016 Michael Bohlender, + Copyright (C) 2017 Christian Mollekopf, + + 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.4 +import QtQuick.Layouts 1.1 +import org.kube.framework 1.0 as Kube +import org.kube.accounts.gmail 1.0 as GmailAccount + +Item { + property alias accountId: settings.accountIdentifier + property string heading: qsTr("Login") + property string subheadline: settings.accountName + property bool valid: pwField.acceptableInput + + GmailAccount.GmailSettings { + id: settings + accountType: "gmail" + } + + function login(){ + settings.login({accountSecret: pwField.text}) + } + + GridLayout { + anchors { + fill: parent + } + columns: 2 + columnSpacing: Kube.Units.largeSpacing + rowSpacing: Kube.Units.largeSpacing + + Kube.Label { + text: qsTr("Password") + Layout.alignment: Qt.AlignRight + } + + Kube.PasswordField { + id: pwField + Layout.fillWidth: true + focus: true + placeholderText: qsTr("Password of your IMAP account") + } + } +} diff --git a/accounts/gmail/qmldir b/accounts/gmail/qmldir new file mode 100644 index 00000000..78a9e5b7 --- /dev/null +++ b/accounts/gmail/qmldir @@ -0,0 +1,3 @@ +module org.kube.accounts.gmail + +plugin gmailaccountplugin diff --git a/accounts/google/CMakeLists.txt b/accounts/google/CMakeLists.txt deleted file mode 100644 index 3732190d..00000000 --- a/accounts/google/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -project(kube-accounts-google) - -set(SRCS - googlesettings.cpp - googleaccountplugin.cpp -) - -add_library(googleaccountplugin SHARED ${SRCS}) -target_link_libraries(googleaccountplugin - sink - frameworkplugin - Qt5::Core - Qt5::Quick - Qt5::Qml -) - -install(TARGETS googleaccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/google) -install(FILES metadata.json DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/google) -install_qml_account(google) diff --git a/accounts/google/googleaccountplugin.cpp b/accounts/google/googleaccountplugin.cpp deleted file mode 100644 index d419e585..00000000 --- a/accounts/google/googleaccountplugin.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (c) 2016 Christian Mollekopf - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This library 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 Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ -#include "googleaccountplugin.h" - -#include "googlesettings.h" - -#include - -void GoogleAccountPlugin::registerTypes (const char *uri) -{ - Q_ASSERT(uri == QLatin1String("org.kube.accounts.google")); - qmlRegisterType(uri, 1, 0, "GoogleSettings"); -} diff --git a/accounts/google/googleaccountplugin.h b/accounts/google/googleaccountplugin.h deleted file mode 100644 index d546c4f9..00000000 --- a/accounts/google/googleaccountplugin.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (c) 2016 Christian Mollekopf - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This library 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 Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ -#pragma once - -#include -#include - -class GoogleAccountPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - virtual void registerTypes(const char *uri); -}; diff --git a/accounts/google/googlesettings.cpp b/accounts/google/googlesettings.cpp deleted file mode 100644 index 6c4c32de..00000000 --- a/accounts/google/googlesettings.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (c) 2016 Christian Mollekopf - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This library 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 Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ -#include "googlesettings.h" - -GoogleSettings::GoogleSettings(QObject *parent) - : AccountSettings(parent) -{ -} - -void GoogleSettings::load() -{ - loadAccount(); - loadImapResource(); - loadMailtransportResource(); - loadIdentity(); -} - -void GoogleSettings::save() -{ - mImapServer = "imaps://imap.gmail.com:993"; - mImapUsername = mEmailAddress; - - mSmtpServer = "smtps://smtp.gmail.com:587"; - mSmtpUsername = mEmailAddress; - - mCardDavServer = QStringLiteral("https://www.googleapis.com/carddav/v1/principals/") + mEmailAddress + "/"; - mCardDavUsername = mEmailAddress; - - mCalDavServer = QStringLiteral("https://www.google.com/calendar/dav/") + mEmailAddress + "/"; - mCalDavUsername = mEmailAddress; - - saveAccount(); - saveImapResource(); - saveMailtransportResource(); - saveCardDavResource(); - saveCalDavResource(); - saveIdentity(); -} - -void GoogleSettings::remove() -{ - removeResource(mMailtransportIdentifier); - removeResource(mImapIdentifier); - removeIdentity(); - removeAccount(); -} - diff --git a/accounts/google/googlesettings.h b/accounts/google/googlesettings.h deleted file mode 100644 index ac7ae61f..00000000 --- a/accounts/google/googlesettings.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (c) 2016 Christian Mollekopf - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This library 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 Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ -#pragma once - -#include - -class GoogleSettings : public AccountSettings -{ - Q_OBJECT - -public: - GoogleSettings(QObject *parent = 0); - - Q_INVOKABLE virtual void load() Q_DECL_OVERRIDE; - Q_INVOKABLE virtual void save() Q_DECL_OVERRIDE; - Q_INVOKABLE virtual void remove() Q_DECL_OVERRIDE; -}; diff --git a/accounts/google/metadata.json b/accounts/google/metadata.json deleted file mode 100644 index 0ad786f1..00000000 --- a/accounts/google/metadata.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Name": "Google", - "RequiresKeyring": true -} diff --git a/accounts/google/qml/AccountSettings.qml b/accounts/google/qml/AccountSettings.qml deleted file mode 100644 index 73cdfbd7..00000000 --- a/accounts/google/qml/AccountSettings.qml +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender, - Copyright (C) 2017 Christian Mollekopf, - - 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.4 -import QtQuick.Layouts 1.1 -import org.kube.framework 1.0 as Kube -import org.kube.accounts.google 1.0 as GoogleAccount - -Item { - - property string accountId - property string heading: qsTr("Connect your Google account") - property string subheadline: qsTr("To let Kube access your account, fill in email address, username and give the account a title that will be displayed inside Kube.") - property bool valid: true - implicitHeight: grid.implicitHeight - - GoogleAccount.GoogleSettings { - id: googleSettings - accountIdentifier: accountId - accountType: "google" - } - - function save(){ - googleSettings.save() - } - - function remove(){ - googleSettings.remove() - } - - GridLayout { - id: grid - anchors.fill: parent - columns: 2 - columnSpacing: Kube.Units.largeSpacing - rowSpacing: Kube.Units.largeSpacing - - Kube.Label { - text: "Please note that Google requires you to configure your account to allow IMAP connections from Kube: -
      -
    1. See https://support.google.com/mail/answer/7126229 to configure your account to allow IMAP connections. -
    2. Visit https://myaccount.google.com/lesssecureapps and enable the setting to allow Kube to connect to your account." - Layout.alignment: Qt.AlignCenter - Layout.columnSpan: 2 - textFormat: Text.StyledText - } - - Kube.Label { - text: qsTr("Name") - Layout.alignment: Qt.AlignRight - } - Kube.TextField { - Layout.fillWidth: true - placeholderText: qsTr("Your name") - text: googleSettings.userName - onTextChanged: { - googleSettings.userName = text - } - } - - Kube.Label { - text: qsTr("Email address") - Layout.alignment: Qt.AlignRight - } - Kube.TextField { - Layout.fillWidth: true - - text: googleSettings.emailAddress - onTextChanged: { - googleSettings.emailAddress = text - googleSettings.accountName = text - } - placeholderText: qsTr("Your email address") - } - } -} diff --git a/accounts/google/qml/Login.qml b/accounts/google/qml/Login.qml deleted file mode 100644 index 0a44aa8c..00000000 --- a/accounts/google/qml/Login.qml +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2016 Michael Bohlender, - Copyright (C) 2017 Christian Mollekopf, - - 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.4 -import QtQuick.Layouts 1.1 -import org.kube.framework 1.0 as Kube -import org.kube.accounts.google 1.0 as GoogleAccount - -Item { - property alias accountId: settings.accountIdentifier - property string heading: qsTr("Login") - property string subheadline: settings.accountName - property bool valid: pwField.acceptableInput - - GoogleAccount.GoogleSettings { - id: settings - accountType: "google" - } - - function login(){ - settings.login({accountSecret: pwField.text}) - } - - GridLayout { - anchors { - fill: parent - } - columns: 2 - columnSpacing: Kube.Units.largeSpacing - rowSpacing: Kube.Units.largeSpacing - - Kube.Label { - text: qsTr("Password") - Layout.alignment: Qt.AlignRight - } - - Kube.PasswordField { - id: pwField - Layout.fillWidth: true - focus: true - placeholderText: qsTr("Password of your IMAP account") - } - } -} diff --git a/accounts/google/qmldir b/accounts/google/qmldir deleted file mode 100644 index a4a06cb7..00000000 --- a/accounts/google/qmldir +++ /dev/null @@ -1,3 +0,0 @@ -module org.kube.accounts.google - -plugin googleaccountplugin -- cgit v1.2.3