feat: dapps permissions
This commit is contained in:
parent
7af4f0fd8f
commit
11ae6529e2
|
@ -1,5 +1,5 @@
|
|||
import NimQml, sequtils, strutils, sugar, os
|
||||
import views/[mailservers_list, ens_manager, contact_list, profile_info, device_list, dapp_list]
|
||||
import views/[mailservers_list, ens_manager, contact_list, profile_info, device_list, dapp_list, permission_list]
|
||||
import ../../status/profile/[mailserver, profile, devices]
|
||||
import ../../status/profile as status_profile
|
||||
import ../../status/contacts as status_contacts
|
||||
|
@ -23,6 +23,7 @@ QtObject:
|
|||
blockedContacts*: ContactList
|
||||
deviceList*: DeviceList
|
||||
dappList*: DappList
|
||||
permissionList*: PermissionList
|
||||
network: string
|
||||
status*: Status
|
||||
isDeviceSetup: bool
|
||||
|
@ -42,6 +43,7 @@ QtObject:
|
|||
if not self.ens.isNil: self.ens.delete
|
||||
if not self.profile.isNil: self.profile.delete
|
||||
if not self.dappList.isNil: self.dappList.delete
|
||||
if not self.permissionList.isNil: self.permissionList.delete
|
||||
self.QObject.delete
|
||||
|
||||
proc newProfileView*(status: Status, changeLanguage: proc(locale: string)): ProfileView =
|
||||
|
@ -54,6 +56,7 @@ QtObject:
|
|||
result.blockedContacts = newContactList()
|
||||
result.deviceList = newDeviceList()
|
||||
result.dappList = newDappList(status)
|
||||
result.permissionList = newPermissionList(status)
|
||||
result.ens = newEnsManager(status)
|
||||
result.network = ""
|
||||
result.status = status
|
||||
|
@ -250,6 +253,12 @@ QtObject:
|
|||
QtProperty[QVariant] dappList:
|
||||
read = getDappList
|
||||
|
||||
proc getPermissionList(self: ProfileView): QVariant {.slot.} =
|
||||
return newQVariant(self.permissionList)
|
||||
|
||||
QtProperty[QVariant] permissionList:
|
||||
read = getPermissionList
|
||||
|
||||
proc getEnsManager(self: ProfileView): QVariant {.slot.} =
|
||||
return newQVariant(self.ens)
|
||||
|
||||
|
|
|
@ -60,4 +60,4 @@ QtObject:
|
|||
return newQVariant(self.permissionList)
|
||||
|
||||
QtProperty[QVariant] permissionList:
|
||||
read = getPermissionList
|
||||
read = getPermissionList
|
||||
|
|
Loading…
Reference in New Issue