Warning, /pim/kube/accounts/kolabnow/qml/Login.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> 0003 Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com> 0004 0005 This program is free software; you can redistribute it and/or modify 0006 it under the terms of the GNU General Public License as published by 0007 the Free Software Foundation; either version 2 of the License, or 0008 (at your option) any later version. 0009 0010 This program is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU General Public License for more details. 0014 0015 You should have received a copy of the GNU General Public License along 0016 with this program; if not, write to the Free Software Foundation, Inc., 0017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 import QtQuick 2.4 0021 import QtQuick.Layouts 1.1 0022 import org.kube.framework 1.0 as Kube 0023 import org.kube.accounts.kolabnow 1.0 as KolabnowAccount 0024 0025 Item { 0026 property alias accountId: settings.accountIdentifier 0027 property string heading: qsTr("Login") 0028 property string subheadline: settings.accountName 0029 property bool valid: pwField.acceptableInput 0030 0031 KolabnowAccount.KolabnowSettings { 0032 id: settings 0033 accountType: "kolabnow" 0034 } 0035 0036 function login(){ 0037 settings.login({accountSecret: pwField.text}) 0038 if (!!extensionPoint.item) { 0039 extensionPoint.item.storeSecret(accountId, settings.emailAddress, {accountSecret: pwField.text}) 0040 } 0041 } 0042 0043 GridLayout { 0044 anchors { 0045 fill: parent 0046 } 0047 columns: 2 0048 columnSpacing: Kube.Units.largeSpacing 0049 rowSpacing: Kube.Units.largeSpacing 0050 0051 Kube.Label { 0052 text: qsTr("Password") 0053 Layout.alignment: Qt.AlignRight 0054 } 0055 0056 Kube.PasswordField { 0057 id: pwField 0058 Layout.fillWidth: true 0059 focus: true 0060 0061 placeholderText: qsTr("Password of your Kolab Now account") 0062 text: (!!extensionPoint.item && !!extensionPoint.item.secret) ? extensionPoint.item.secret.accountSecret : "" 0063 } 0064 Row { 0065 Layout.columnSpan: 2 0066 Kube.ExtensionPoint { 0067 id: extensionPoint 0068 extensionPoint: "extensions/login" 0069 context: {"accountId": settings.accountIdentifier} 0070 } 0071 } 0072 } 0073 }