Warning, /pim/kube/accounts/fastmail/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 0024 Item { 0025 property alias accountId: settings.accountIdentifier 0026 property string heading: qsTr("Login") 0027 property string subheadline: settings.accountName 0028 property bool valid: pwField.acceptableInput 0029 0030 FastmailSettings { 0031 id: settings 0032 } 0033 0034 function login(){ 0035 settings.login({accountSecret: pwField.text}) 0036 if (!!extensionPoint.item) { 0037 extensionPoint.item.storeSecret(accountId, settings.emailAddress, {accountSecret: pwField.text}) 0038 } 0039 } 0040 0041 GridLayout { 0042 anchors { 0043 fill: parent 0044 } 0045 columns: 2 0046 columnSpacing: Kube.Units.largeSpacing 0047 rowSpacing: Kube.Units.largeSpacing 0048 0049 Kube.Label { 0050 text: qsTr("Password") 0051 Layout.alignment: Qt.AlignRight 0052 } 0053 0054 Kube.PasswordField { 0055 id: pwField 0056 Layout.fillWidth: true 0057 focus: true 0058 0059 placeholderText: qsTr("App-specific password for your FastMail account") 0060 text: (!!extensionPoint.item && !!extensionPoint.item.secret) ? extensionPoint.item.secret.accountSecret : "" 0061 } 0062 Row { 0063 Layout.columnSpan: 2 0064 Kube.ExtensionPoint { 0065 id: extensionPoint 0066 extensionPoint: "extensions/login" 0067 context: {"accountId": settings.accountIdentifier} 0068 } 0069 } 0070 } 0071 }