summaryrefslogtreecommitdiffstats
path: root/accounts/maildir
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/maildir')
-rw-r--r--accounts/maildir/package/contents/ui/MaildirAccountSettings.qml92
1 files changed, 43 insertions, 49 deletions
diff --git a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
index ba5bd766..0fb87810 100644
--- a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
+++ b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
@@ -26,9 +26,10 @@ import org.kube.accounts.maildir 1.0 as MaildirAccount
26 26
27Item { 27Item {
28 property string accountId 28 property string accountId
29 property string heading: "Add your Maildir archive" 29 property string heading: qsTr("Add your Maildir archive")
30 property string subheadline: "To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube." 30 property string subheadline: qsTr("To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube.")
31 property bool valid: true 31 property bool valid: true
32 implicitHeight: grid.implicitHeight
32 33
33 MaildirAccount.MaildirSettings { 34 MaildirAccount.MaildirSettings {
34 id: maildirSettings 35 id: maildirSettings
@@ -44,66 +45,59 @@ Item {
44 maildirSettings.remove() 45 maildirSettings.remove()
45 } 46 }
46 47
47 Item { 48 GridLayout {
48 anchors { 49 id: grid
49 fill: parent 50 anchors.fill: parent
50 } 51 columns: 2
52 columnSpacing: Kube.Units.largeSpacing
53 rowSpacing: Kube.Units.largeSpacing
51 54
52 GridLayout { 55 Kube.Label {
53 anchors { 56 text: qsTr("Title of Account")
54 fill: parent 57 Layout.alignment: Qt.AlignRight
58 }
59 Kube.TextField {
60 Layout.fillWidth: true
61 placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name")
62 text: maildirSettings.accountName
63 onTextChanged: {
64 maildirSettings.accountName = text
55 } 65 }
56 columns: 2 66 }
57 columnSpacing: Kube.Units.largeSpacing 67
58 rowSpacing: Kube.Units.largeSpacing 68 Kube.Label {
69 text: qsTr("Path")
70 Layout.alignment: Qt.AlignRight
71 }
72 RowLayout {
73 Layout.fillWidth: true
59 74
60 Kube.Label {
61 text: qsTr("Title of Account")
62 Layout.alignment: Qt.AlignRight
63 }
64 Kube.TextField { 75 Kube.TextField {
76 id: path
65 Layout.fillWidth: true 77 Layout.fillWidth: true
66 placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") 78 enabled: false
67 text: maildirSettings.accountName 79 text: maildirSettings.path
68 onTextChanged: {
69 maildirSettings.accountName = text
70 }
71 } 80 }
72 81
73 Kube.Label { 82 Controls.Button {
74 text: qsTr("Path") 83 iconName: Kube.Icons.folder
75 Layout.alignment: Qt.AlignRight
76 }
77 RowLayout {
78 Layout.fillWidth: true
79 84
80 Kube.TextField { 85 onClicked: {
81 id: path 86 fileDialogComponent.createObject(parent)
82 Layout.fillWidth: true
83 enabled: false
84 text: maildirSettings.path
85 } 87 }
86 88
87 Controls.Button { 89 Component {
88 iconName: Kube.Icons.folder 90 id: fileDialogComponent
89 91 Dialogs.FileDialog {
90 onClicked: { 92 id: fileDialog
91 fileDialogComponent.createObject(parent)
92 }
93
94 Component {
95 id: fileDialogComponent
96 Dialogs.FileDialog {
97 id: fileDialog
98 93
99 visible: true 94 visible: true
100 title: "Choose the maildir folder" 95 title: "Choose the maildir folder"
101 96
102 selectFolder: true 97 selectFolder: true
103 98
104 onAccepted: { 99 onAccepted: {
105 maildirSettings.path = fileDialog.fileUrl 100 maildirSettings.path = fileDialog.fileUrl
106 }
107 } 101 }
108 } 102 }
109 } 103 }