6import org.mauikit.controls as Maui
7import org.mauikit.accounts as MA
27 title: i18nd("mauikitaccounts",
"Accounts")
33 readonly property alias
model : _syncingModel
39 readonly property alias
list : _syncingModel.
list
46 control.addAccount(serverField.text, userField.text, passwordField.text)
53 text:
i18nd(
"mauikitaccounts",
"Add")
54 onTriggered: _syncDialog.open()
61 title:
i18nd(
"mauikitaccounts",
"Remove Account")
62 message:
i18nd(
"mauikitaccounts",
"Are you sure you want to remove this account?")
69 var account = MA.Accounts.get(_listView.currentIndex)
70 console.log(account.label)
71 control.removeAccount(account.server, account.user)
82 text:
i18nd(
"mauikitaccounts",
"Remove...")
83 Maui.Theme.textColor:
Maui.Theme.negativeTextColor
85 onTriggered: _removeDialog.open()
92 Layout.fillHeight:
true
93 Layout.fillWidth:
true
101 delegate:
Maui.ListDelegate
104 width: ListView.view.width
108 radius:
Maui.Style.radiusV
112 _listView.currentIndex = index
117 _listView.currentIndex = index
123 _listView.currentIndex = index
128 holder.visible: _listView.count == 0
131 holder.emoji:
"qrc:/assets/dialog-information.svg"
132 holder.title:
i18nd(
"mauikitaccounts",
"No accounts yet!")
133 holder.body:
i18nd(
"mauikitaccounts",
"Start adding new accounts to sync your files, music, contacts, images, notes, etc...")
143 function addAccount(server, user, password)
146 MA.Accounts.registerAccount({server: server, user: user, password: password})
154 function removeAccount(server, user)
156 if(server.length && user.length)
157 MA.Accounts.removeAccount(server, user)
165 function removeAccountAndFiles(server, user)
167 if(server.length && user.length)
168 MA.Accounts.removeAccountAndFiles(server, user)
alias list
Alias to the list containing the data of the accounts.
alias model
Alias to the MauiKit BaseModel handling the data.
A dialog for enetering the credentials for an online account.
QString i18nd(const char *domain, const char *text, const TYPE &arg...)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
QString label(StandardShortcut id)