Warning, /maui/mauikit-accounts/src/controls.5/CredentialsDialog.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * Copyright 2018 Camilo Higuita <milo.h@aol.com>
0003 *
0004 * This program is free software; you can redistribute it and/or modify
0005 * it under the terms of the GNU Library General Public License as
0006 * published by the Free Software Foundation; either version 2, or
0007 * (at your option) any later version.
0008 *
0009 * This program is distributed in the hope that it will be useful,
0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0012 * GNU General Public License for more details
0013 *
0014 * You should have received a copy of the GNU Library General Public
0015 * License along with this program; if not, write to the
0016 * Free Software Foundation, Inc.,
0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018 */
0019
0020 import QtQuick 2.14
0021 import QtQuick.Controls 2.14
0022 import QtQuick.Layouts 1.3
0023 import org.mauikit.controls 1.3 as Maui
0024
0025 /**
0026 * SyncDialog
0027 * A global sidebar for the application window that can be collapsed.
0028 *
0029 *
0030 *
0031 *
0032 *
0033 *
0034 */
0035 Maui.PopupPage
0036 {
0037 id: control
0038
0039 maxWidth: 350
0040
0041 title: i18nd("mauikitaccounts","New Account")
0042 // page.showTitle: false
0043
0044 /**
0045 * customServer : bool
0046 */
0047 property bool customServer: false
0048
0049 /**
0050 * serverField : TextField
0051 */
0052 property alias serverField: serverField
0053
0054 /**
0055 * userField : TextField
0056 */
0057 property alias userField: userField
0058
0059 /**
0060 * passwordField : TextField
0061 */
0062 property alias passwordField: passwordField
0063
0064
0065 actions: [
0066 Action
0067 {
0068 text: i18nd("mauikitaccounts","Sign up")
0069 enabled: !customServer
0070 onTriggered: Qt.openUrlExternally("https://www.opendesktop.org/register")
0071 },
0072
0073 Action
0074 {
0075 text: i18nd("mauikitaccounts","Sign in")
0076 }
0077 ]
0078
0079
0080 Image
0081 {
0082 visible: !customServer
0083 Layout.alignment: Qt.AlignCenter
0084 Layout.preferredWidth: Maui.Style.iconSizes.huge
0085 Layout.preferredHeight: Maui.Style.iconSizes.huge
0086 Layout.margins: Maui.Style.space.medium
0087
0088 sourceSize.width: width
0089 sourceSize.height: height
0090
0091 source: "qrc:/assets/opendesktop.png"
0092 }
0093
0094 Label
0095 {
0096 visible: !customServer
0097 Layout.fillWidth: true
0098 horizontalAlignment: Qt.AlignHCenter
0099 Layout.preferredHeight: Maui.Style.rowHeight
0100 text: "opendesktop.org"
0101 elide: Text.ElideNone
0102 wrapMode: Text.NoWrap
0103 font.weight: Font.Bold
0104 font.bold: true
0105 font.pointSize: Maui.Style.fontSizes.big
0106 }
0107
0108 TextField
0109 {
0110 id: userField
0111 Layout.fillWidth: true
0112 placeholderText: i18nd("mauikitaccounts","Username")
0113 icon.source: "im-user"
0114 inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData
0115 }
0116
0117 Maui.PasswordField
0118 {
0119 id: passwordField
0120 Layout.fillWidth: true
0121 placeholderText: i18nd("mauikitaccounts","Password")
0122 inputMethodHints: Qt.ImhNoAutoUppercase
0123 }
0124
0125 TextField
0126 {
0127 id: serverField
0128 visible: customServer
0129 icon.source: "link"
0130 Layout.fillWidth: true
0131 placeholderText: i18nd("mauikitaccounts","Server address")
0132 inputMethodHints: Qt.ImhUrlCharactersOnly | Qt.ImhNoAutoUppercase
0133 text: customServer ? "" : "https://cloud.opendesktop.cc/cloud/remote.php/webdav/"
0134 }
0135
0136 Button
0137 {
0138 Layout.fillWidth: true
0139 icon.name: "filename-space-amarok"
0140 text: customServer ? i18nd("mauikitaccounts","opendesktop") : i18nd("mauikitaccounts","Custom server")
0141 onClicked: customServer = !customServer
0142 }
0143
0144 }