Commit bbcc1bb1 authored by Nicolas Fella's avatar Nicolas Fella Committed by Bhushan Shah

[accounts] Move available accounts into page

parent 6611a0ef
Pipeline #7999 passed with stage
in 8 minutes and 40 seconds
......@@ -71,41 +71,7 @@ ScrollViewKCM {
Layout.alignment: Qt.AlignRight
text: i18n("Add new Account")
icon.name: "contact-new"
onClicked: {
availableAccountsSheet.open()
}
}
}
Component {
id: jobComponent
CreateAccount {
onFinished: {
availableAccountsSheet.close()
}
}
}
Kirigami.OverlaySheet {
id: availableAccountsSheet
parent: kaccountsRoot.parent
ListView {
Layout.fillWidth: true
Layout.fillHeight: true
model: OA.ProviderModel {}
delegate: Kirigami.BasicListItem {
icon: model.iconName
label: model.displayName
Layout.fillWidth: true
onClicked: {
var job = jobComponent.createObject(kaccountsRoot, { "providerName": providerId })
job.start()
}
}
onClicked: kcm.push("AvailableAccounts.qml")
}
}
}
/*
* Copyright 2019 Nicolas Fella <nicolas.fella@gmx.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.7
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.0 as Controls
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kaccounts 1.0
import org.kde.kcm 1.2
import Ubuntu.OnlineAccounts 0.1 as OA
ScrollViewKCM {
id: root
title: i18n("Add new Account")
ListView {
anchors.fill: parent
model: OA.ProviderModel {}
delegate: Kirigami.BasicListItem {
icon: model.iconName
label: model.displayName
width: parent.width
onClicked: {
var job = jobComponent.createObject(root, { "providerName": providerId })
job.start()
}
}
}
Component {
id: jobComponent
CreateAccount {
onFinished: kcm.pop()
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment