2020-10-04 23:03:37 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-06 09:16:39 +00:00
|
|
|
import "../../../../shared"
|
2021-10-14 11:33:34 +00:00
|
|
|
import "../../../../shared/popups"
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2020-10-04 23:03:37 +00:00
|
|
|
import "./"
|
2021-10-06 09:16:39 +00:00
|
|
|
import "../panels"
|
2020-10-04 23:03:37 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
// TODO: replace with StatusModal
|
2020-10-04 23:03:37 +00:00
|
|
|
ModalPopup {
|
2021-10-06 09:16:39 +00:00
|
|
|
id: root
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Dapp permissions"
|
|
|
|
title: qsTrId("dapp-permissions")
|
2020-10-04 23:03:37 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
property var store
|
|
|
|
|
|
|
|
Component.onCompleted: store.initDappList()
|
|
|
|
Component.onDestruction: store.clearDappList()
|
2020-10-04 23:03:37 +00:00
|
|
|
|
|
|
|
property Component permissionListPopup: PermissionList {
|
|
|
|
onClosed: destroy()
|
2021-10-06 09:16:39 +00:00
|
|
|
store: root.store
|
|
|
|
onAccessRevoked: store.initDappList()
|
2020-10-04 23:03:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
anchors.fill: parent
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
ScrollBar.vertical.policy: dappListView.contentHeight > dappListView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 0
|
|
|
|
clip: true
|
|
|
|
id: dappListView
|
2021-10-06 09:16:39 +00:00
|
|
|
model: root.store.dappList
|
2020-10-04 23:03:37 +00:00
|
|
|
delegate: Dapp {
|
|
|
|
name: model.name
|
|
|
|
onDappClicked: permissionListPopup.createObject(privacyContainer, {dapp: dapp}).open()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;height:300;width:300}
|
|
|
|
}
|
|
|
|
##^##*/
|