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