status-desktop/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml

155 lines
5.3 KiB
QML
Raw Normal View History

import QtQuick 2.13
import utils 1.0
QtObject {
id: root
property var aboutModuleInst: aboutModule
property var profileSectionModuleInst: profileSectionModule
property ContactsStore contactsStore: ContactsStore {
contactsModule: profileSectionModuleInst.contactsModule
}
property AdvancedStore advancedStore: AdvancedStore {
advancedModule: profileSectionModuleInst.advancedModule
}
property DevicesStore devicesStore: DevicesStore {
devicesModule: profileSectionModuleInst.devicesModule
}
property SyncStore syncStore: SyncStore {
syncModule: profileSectionModuleInst.syncModule
}
property NotificationsStore notificationsStore: NotificationsStore {
notificationsModule: profileSectionModuleInst.notificationsModule
}
property LanguageStore languageStore: LanguageStore {
languageModule: profileSectionModuleInst.languageModule
}
property AppearanceStore appearanceStore: AppearanceStore {
}
property ProfileStore profileStore: ProfileStore {
profileModule: profileSectionModuleInst.profileModule
}
property PrivacyStore privacyStore: PrivacyStore {
privacyModule: profileSectionModuleInst.privacyModule
}
property EnsUsernamesStore ensUsernamesStore: EnsUsernamesStore {
ensUsernamesModule: profileSectionModuleInst.ensUsernamesModule
}
property WalletStore walletStore: WalletStore {
}
2021-10-22 19:21:04 +00:00
property var dappList: dappPermissionsModule.dapps
property var permissionList: dappPermissionsModule.permissions
property bool browserMenuItemEnabled: localAccountSensitiveSettings.isBrowserEnabled
property bool appsMenuItemsEnabled: localAccountSensitiveSettings.isMultiNetworkEnabled
property ListModel mainMenuItems: ListModel {
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"})
}
}
property ListModel appsMenuItems: ListModel {
Component.onCompleted: {
append({subsection: Constants.settingsSubsection.wallet,
text: qsTr("Wallet"),
icon: "wallet"})
}
}
property ListModel settingsMenuItems: ListModel {
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"})
}
}
property ListModel extraMenuItems: ListModel {
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"})
}
}
function initPermissionList(name) {
2021-10-22 19:21:04 +00:00
dappPermissionsModule.fetchPermissions(name)
}
2021-10-22 19:21:04 +00:00
function revokePermission(dapp, name) {
dappPermissionsModule.revokePermission(dapp, name)
}
2021-10-22 19:21:04 +00:00
function clearPermissions(dapp) {
dappPermissionsModule.clearPermissions(dapp)
}
function initDappList() {
2021-10-22 19:21:04 +00:00
dappPermissionsModule.fetchDapps()
}
function getCurrentVersion() {
return aboutModuleInst.getCurrentVersion()
}
function nodeVersion() {
return aboutModuleInst.nodeVersion()
}
function checkForUpdates() {
aboutModuleInst.checkForUpdates()
}
}