2021-10-06 09:16:39 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
2021-10-13 21:31:04 +00:00
|
|
|
property var aboutModuleInst: aboutModule
|
|
|
|
|
2021-12-29 15:09:29 +00:00
|
|
|
property var profileSectionModuleInst: profileSectionModule
|
2021-12-27 11:04:10 +00:00
|
|
|
|
2021-12-31 12:29:51 +00:00
|
|
|
property ContactsStore contactsStore: ContactsStore {
|
|
|
|
contactsModule: profileSectionModuleInst.contactsModule
|
|
|
|
}
|
|
|
|
|
2021-12-14 18:47:32 +00:00
|
|
|
property AdvancedStore advancedStore: AdvancedStore {
|
2021-12-29 15:09:29 +00:00
|
|
|
advancedModule: profileSectionModuleInst.advancedModule
|
2021-12-14 18:47:32 +00:00
|
|
|
}
|
|
|
|
|
2021-12-27 11:04:10 +00:00
|
|
|
property DevicesStore devicesStore: DevicesStore {
|
2021-12-29 15:09:29 +00:00
|
|
|
devicesModule: profileSectionModuleInst.devicesModule
|
2021-12-27 11:04:10 +00:00
|
|
|
}
|
|
|
|
|
2021-12-27 16:40:46 +00:00
|
|
|
property SyncStore syncStore: SyncStore {
|
2021-12-29 15:09:29 +00:00
|
|
|
syncModule: profileSectionModuleInst.syncModule
|
2021-12-27 16:40:46 +00:00
|
|
|
}
|
|
|
|
|
2021-12-28 14:43:25 +00:00
|
|
|
property NotificationsStore notificationsStore: NotificationsStore {
|
2021-12-29 15:09:29 +00:00
|
|
|
notificationsModule: profileSectionModuleInst.notificationsModule
|
2021-12-28 14:43:25 +00:00
|
|
|
}
|
|
|
|
|
2021-12-29 09:53:56 +00:00
|
|
|
property LanguageStore languageStore: LanguageStore {
|
2021-12-29 15:09:29 +00:00
|
|
|
languageModule: profileSectionModuleInst.languageModule
|
2021-12-29 09:53:56 +00:00
|
|
|
}
|
|
|
|
|
2021-12-29 10:32:43 +00:00
|
|
|
property AppearanceStore appearanceStore: AppearanceStore {
|
|
|
|
}
|
|
|
|
|
2021-12-29 15:09:29 +00:00
|
|
|
property ProfileStore profileStore: ProfileStore {
|
|
|
|
profileModule: profileSectionModuleInst.profileModule
|
|
|
|
}
|
|
|
|
|
2021-12-30 12:39:47 +00:00
|
|
|
property PrivacyStore privacyStore: PrivacyStore {
|
|
|
|
privacyModule: profileSectionModuleInst.privacyModule
|
|
|
|
}
|
|
|
|
|
2022-01-17 08:56:44 +00:00
|
|
|
property EnsUsernamesStore ensUsernamesStore: EnsUsernamesStore {
|
|
|
|
ensUsernamesModule: profileSectionModuleInst.ensUsernamesModule
|
|
|
|
}
|
2021-12-13 14:24:21 +00:00
|
|
|
|
2022-02-11 09:44:49 +00:00
|
|
|
property WalletStore walletStore: WalletStore {
|
|
|
|
}
|
|
|
|
|
2021-10-22 19:21:04 +00:00
|
|
|
property var dappList: dappPermissionsModule.dapps
|
|
|
|
property var permissionList: dappPermissionsModule.permissions
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2021-10-20 09:50:50 +00:00
|
|
|
property bool browserMenuItemEnabled: localAccountSensitiveSettings.isBrowserEnabled
|
2022-02-11 09:44:49 +00:00
|
|
|
property bool appsMenuItemsEnabled: localAccountSensitiveSettings.isMultiNetworkEnabled
|
2021-10-06 09:16:39 +00:00
|
|
|
|
|
|
|
property ListModel mainMenuItems: ListModel {
|
2022-02-25 13:32:46 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
append({subsection: Constants.settingsSubsection.profile,
|
|
|
|
text: qsTr("My Profile"),
|
|
|
|
icon: "profile"})
|
|
|
|
append({subsection: Constants.settingsSubsection.contacts,
|
|
|
|
text: qsTr("Contacts"),
|
|
|
|
icon: "contact"})
|
|
|
|
append({subsection: Constants.settingsSubsection.ensUsernames,
|
|
|
|
text: qsTr("ENS usernames"),
|
|
|
|
icon: "username"})
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-11 09:44:49 +00:00
|
|
|
property ListModel appsMenuItems: ListModel {
|
2022-02-25 13:32:46 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
append({subsection: Constants.settingsSubsection.wallet,
|
|
|
|
text: qsTr("Wallet"),
|
|
|
|
icon: "wallet"})
|
2022-02-11 09:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
property ListModel settingsMenuItems: ListModel {
|
2022-02-25 13:32:46 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
append({subsection: Constants.settingsSubsection.privacyAndSecurity,
|
|
|
|
text: qsTr("Privacy and security"),
|
|
|
|
icon: "security"})
|
|
|
|
append({subsection: Constants.settingsSubsection.appearance,
|
|
|
|
text: qsTr("Appearance"),
|
|
|
|
icon: "appearance"})
|
|
|
|
append({subsection: Constants.settingsSubsection.sound,
|
|
|
|
text: qsTr("Sound"),
|
|
|
|
icon: "sound"})
|
|
|
|
append({subsection: Constants.settingsSubsection.language,
|
|
|
|
text: qsTr("Language"),
|
|
|
|
icon: "language"})
|
|
|
|
append({subsection: Constants.settingsSubsection.notifications,
|
|
|
|
text: qsTr("Notifications"),
|
|
|
|
icon: "notification"})
|
|
|
|
append({subsection: Constants.settingsSubsection.syncSettings,
|
|
|
|
text: qsTr("Sync settings"),
|
|
|
|
icon: "mobile"})
|
|
|
|
append({subsection: Constants.settingsSubsection.devicesSettings,
|
|
|
|
text: qsTr("Devices settings"),
|
|
|
|
icon: "mobile"})
|
|
|
|
append({subsection: Constants.settingsSubsection.browserSettings,
|
|
|
|
text: qsTr("Browser settings"),
|
|
|
|
icon: "browser"})
|
|
|
|
append({subsection: Constants.settingsSubsection.advanced,
|
|
|
|
text: qsTr("Advanced"),
|
|
|
|
icon: "settings"})
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
property ListModel extraMenuItems: ListModel {
|
2022-02-25 13:32:46 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
append({subsection: Constants.settingsSubsection.needHelp,
|
|
|
|
text: qsTr("Need help?"),
|
|
|
|
icon: "help"})
|
|
|
|
append({subsection: Constants.settingsSubsection.about,
|
|
|
|
text: qsTr("About"),
|
|
|
|
icon: "info"})
|
|
|
|
append({subsection: Constants.settingsSubsection.signout,
|
|
|
|
text: qsTr("Sign out & Quit"),
|
|
|
|
icon: "logout"})
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function initPermissionList(name) {
|
2021-10-22 19:21:04 +00:00
|
|
|
dappPermissionsModule.fetchPermissions(name)
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
2021-10-22 19:21:04 +00:00
|
|
|
function revokePermission(dapp, name) {
|
|
|
|
dappPermissionsModule.revokePermission(dapp, name)
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
2021-10-22 19:21:04 +00:00
|
|
|
function clearPermissions(dapp) {
|
|
|
|
dappPermissionsModule.clearPermissions(dapp)
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function initDappList() {
|
2021-10-22 19:21:04 +00:00
|
|
|
dappPermissionsModule.fetchDapps()
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function getCurrentVersion() {
|
2021-10-13 21:31:04 +00:00
|
|
|
return aboutModuleInst.getCurrentVersion()
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function nodeVersion() {
|
2021-10-13 21:31:04 +00:00
|
|
|
return aboutModuleInst.nodeVersion()
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function checkForUpdates() {
|
2021-12-23 13:45:52 +00:00
|
|
|
aboutModuleInst.checkForUpdates()
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
}
|