2import QtQuick.Controls.Suru 2.2
3import Lomiri.Components 1.3
4import Dekko.Mail.API 1.0
5import Dekko.Mail.Stores.Accounts 1.0
6import Dekko.Mail.Stores.Settings 1.0
8import Dekko.Lomiri.Constants 1.0
9import Dekko.Lomiri.Components 1.0
15 title: qsTr(
"Identities")
19 ViewActions.popStageArea(ViewKeys.settingsStack2)
20 ViewActions.popStageArea(ViewKeys.settingsStack1)
23 primaryAction: Action {
24 iconName:
"contact-new"
25 onTriggered: SettingsActions.openSettingsGroup(Qt.resolvedUrl(
"./NewIdentityPage.qml"))
31 sortCallBack: function (left, right) {
37 model: identitiesModel.source ? identitiesModel : null
51 section.property:
"accountName"
52 section.delegate: Rectangle {
55 color: Suru.secondaryBackgroundColor
59 leftMargin: units.gu(1.5)
60 verticalCenter: parent.verticalCenter
77 model: proxy.model ? proxy : null
80 leadingActions: ListItemActions {
84 onTriggered: AccountActions.removeIdentity(model.id)
94 SettingsStore.saveGroupDisabled =
true
96 SettingsStore.tempIsNew =
false
98 SettingsStore.tempIdentity = model.value
99 SettingsActions.openSettingsGroup(Qt.resolvedUrl(
"./EditIdentityPage.qml"))
101 SettingsStore.saveGroupDisabled =
false
106 readonly
property bool isDefault: AccountStore.identities.defaultIdentity === model.id
107 title.text: isDefault ? model.name + qsTr(
" (Default)") : model.name
108 subtitle.text: model.email
109 summary.text: model.signature
110 summary.maximumLineCount: 1