refactor(@desktop/general): `appSettings` moved to Nim
This commit is contained in:
parent
80bf896265
commit
f0b2ed6cca
|
@ -23,18 +23,15 @@ import ../modules/main/module as main_module
|
|||
|
||||
import ../core/global_singleton
|
||||
|
||||
#################################################
|
||||
# This will be removed later once we move to c++ and handle there async things
|
||||
# and improved some services, like EventsService which should implement
|
||||
# provider/subscriber principe:
|
||||
# provider/subscriber principe, similar we should have SettingsService.
|
||||
import ../../app_service/[main]
|
||||
import eventemitter
|
||||
import status/[fleet]
|
||||
|
||||
#################################################
|
||||
# At the end of refactoring this will be moved to
|
||||
# appropriate place or removed:
|
||||
import status/[fleet, settings]
|
||||
import ../profile/core as profile
|
||||
import status/types/[account]
|
||||
import status/types/[account, setting]
|
||||
#################################################
|
||||
|
||||
|
||||
|
@ -73,14 +70,15 @@ type
|
|||
walletAccountService: wallet_account_service.Service
|
||||
settingService: setting_service.Service
|
||||
bookmarkService: bookmark_service.Service
|
||||
|
||||
# Core
|
||||
localAccountSettings: LocalAccountSettings
|
||||
localAccountSettingsVariant: QVariant
|
||||
profileService: profile_service.Service
|
||||
settingsService: settings_service.Service
|
||||
contactsService: contacts_service.Service
|
||||
aboutService: about_service.Service
|
||||
|
||||
# Core
|
||||
localAccountSettingsVariant: QVariant
|
||||
localAccountSensitiveSettingsVariant: QVariant
|
||||
|
||||
# Modules
|
||||
startupModule: startup_module.AccessInterface
|
||||
mainModule: main_module.AccessInterface
|
||||
|
@ -145,8 +143,8 @@ proc newAppController*(appService: AppService): AppController =
|
|||
result.aboutService = about_service.newService()
|
||||
|
||||
# Core
|
||||
result.localAccountSettingsVariant = newQVariant(
|
||||
singletonInstance.localAccountSettings)
|
||||
result.localAccountSettingsVariant = newQVariant(singletonInstance.localAccountSettings)
|
||||
result.localAccountSensitiveSettingsVariant = newQVariant(singletonInstance.localAccountSensitiveSettings)
|
||||
# Modules
|
||||
result.startupModule = startup_module.newModule[AppController](
|
||||
result,
|
||||
|
@ -209,6 +207,7 @@ proc delete*(self: AppController) =
|
|||
#################################################
|
||||
|
||||
self.localAccountSettingsVariant.delete
|
||||
self.localAccountSensitiveSettingsVariant.delete
|
||||
|
||||
self.localSettingsService.delete
|
||||
self.accountsService.delete
|
||||
|
@ -234,8 +233,7 @@ proc startupDidLoad*(self: AppController) =
|
|||
# https://doc.qt.io/archives/qtjambi-4.5.2_01/com/trolltech/qt/qtjambi-linguist-programmers.html
|
||||
changeLanguage("en")
|
||||
|
||||
singletonInstance.engine.setRootContextProperty("localAccountSettings",
|
||||
self.localAccountSettingsVariant)
|
||||
singletonInstance.engine.setRootContextProperty("localAccountSettings", self.localAccountSettingsVariant)
|
||||
singletonInstance.engine.load(newQUrl("qrc:///main.qml"))
|
||||
|
||||
proc mainDidLoad*(self: AppController) =
|
||||
|
@ -250,6 +248,13 @@ proc start*(self: AppController) =
|
|||
self.startupModule.load()
|
||||
|
||||
proc load*(self: AppController) =
|
||||
#################################################
|
||||
# Once SettingService gets added, `pubKey` should be fetched from there, instead the following line:
|
||||
let pubKey = self.appService.status.settings.getSetting[:string](Setting.PublicKey, "0x0")
|
||||
singletonInstance.localAccountSensitiveSettings.setFileName(pubKey)
|
||||
singletonInstance.engine.setRootContextProperty("localAccountSensitiveSettings", self.localAccountSensitiveSettingsVariant)
|
||||
#################################################
|
||||
|
||||
self.settingService.init()
|
||||
self.contactService.init()
|
||||
self.chatService.init()
|
||||
|
@ -260,7 +265,6 @@ proc load*(self: AppController) =
|
|||
self.transactionService.init()
|
||||
self.mainModule.load()
|
||||
|
||||
|
||||
proc userLoggedIn*(self: AppController) =
|
||||
#################################################
|
||||
# At the end of refactoring this will be removed:
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import NimQml
|
||||
|
||||
import local_account_settings as local_acc_settings
|
||||
import local_account_settings
|
||||
import local_account_sensitive_settings
|
||||
|
||||
export local_acc_settings
|
||||
export local_account_settings
|
||||
export local_account_sensitive_settings
|
||||
|
||||
type
|
||||
GlobalSingleton = object
|
||||
|
@ -25,6 +27,14 @@ proc localAccountSettings*(self: GlobalSingleton): LocalAccountSettings =
|
|||
|
||||
return localAccountSettings
|
||||
|
||||
proc localAccountSensitiveSettings*(self: GlobalSingleton): LocalAccountSensitiveSettings =
|
||||
var localAccountSensitiveSettings {.global.}: LocalAccountSensitiveSettings
|
||||
if (localAccountSensitiveSettings.isNil):
|
||||
localAccountSensitiveSettings = newLocalAccountSensitiveSettings()
|
||||
|
||||
return localAccountSensitiveSettings
|
||||
|
||||
proc delete*(self: GlobalSingleton) =
|
||||
self.engine.delete()
|
||||
self.localAccountSettings.delete()
|
||||
self.localAccountSettings.delete()
|
||||
self.localAccountSensitiveSettings.delete()
|
|
@ -0,0 +1,941 @@
|
|||
import NimQml, os
|
||||
|
||||
import ../../constants
|
||||
|
||||
# Local Account Settings keys:
|
||||
const LSS_KEY_CHAT_SPLIT_VIEW* = "chatSplitView"
|
||||
const LSS_KEY_WALLET_SPLIT_VIEW* = "walletSplitView"
|
||||
const LSS_KEY_PROFILE_SPLIT_VIEW* = "profileSplitView"
|
||||
const LSS_KEY_COMMUNITIES_ENABLED* = "communitiesEnabled"
|
||||
const DEFAULT_COMMUNITIES_ENABLED = false
|
||||
const LSS_KEY_IS_WALLET_ENABLED* = "isWalletEnabled"
|
||||
const DEFAULT_IS_WALLET_ENABLED = false
|
||||
const LSS_KEY_IS_WALLET_V2_ENABLED* = "isWalletV2Enabled"
|
||||
const DEFAULT_IS_WALLET_V2_ENABLED = false
|
||||
const LSS_KEY_NODE_MANAGEMENT_ENABLED* = "nodeManagementEnabled"
|
||||
const DEFAULT_NODE_MANAGEMENT_ENABLED = false
|
||||
const LSS_KEY_IS_BROWSER_ENABLED* = "isBrowserEnabled"
|
||||
const DEFAULT_IS_BROWSER_ENABLED = false
|
||||
const LSS_KEY_IS_ACTIVITY_CENTER_ENABLED* = "isActivityCenterEnabled"
|
||||
const DEFAULT_IS_ACTIVITY_CENTER_ENABLED = false
|
||||
const LSS_KEY_SHOW_ONLINE_USERS* = "showOnlineUsers"
|
||||
const DEFAULT_SHOW_ONLINE_USERS = false
|
||||
const LSS_KEY_EXPAND_USERS_LIST* = "expandUsersList"
|
||||
const DEFAULT_EXPAND_USERS_LIST = false
|
||||
const LSS_KEY_IS_GIF_WIDGET_ENABLED* = "isGifWidgetEnabled"
|
||||
const DEFAULT_IS_GIF_WIDGET_ENABLED = false
|
||||
const LSS_KEY_IS_KEYCARD_ENABLED* = "isKeycardEnabled"
|
||||
const DEFAULT_IS_KEYCARD_ENABLED = false
|
||||
const LSS_KEY_IS_TENOR_WARNING_ACCEPTED* = "isTenorWarningAccepted"
|
||||
const DEFAULT_IS_TENOR_WARNING_ACCEPTED = false
|
||||
const LSS_KEY_DISPLAY_CHAT_IMAGES* = "displayChatImages"
|
||||
const DEFAULT_DISPLAY_CHAT_IMAGES = false
|
||||
const LSS_KEY_USE_COMPACT_MODE* = "useCompactMode"
|
||||
const DEFAULT_USE_COMPACT_MODE = true
|
||||
const LSS_KEY_TIMELINE_ENABLED* = "timelineEnabled"
|
||||
const DEFAULT_TIMELINE_ENABLED = true
|
||||
const LSS_KEY_RECENT_EMOJIS* = "recentEmojis"
|
||||
const LSS_KEY_HIDDEN_COMMUNITY_WELCOME_BANNERS* = "hiddenCommunityWelcomeBanners"
|
||||
const LSS_KEY_HIDDEN_COMMUNITY_BACKUP_BANNERS* = "hiddenCommunityBackUpBanners"
|
||||
const LSS_KEY_VOLUME* = "volume"
|
||||
const DEFAULT_VOLUME: float = 0.2
|
||||
const LSS_KEY_NOTIFICATION_SETTING* = "notificationSetting"
|
||||
const DEFAULT_NOTIFICATION_SETTING = 1 #notifyJustMentions from qml
|
||||
const LSS_KEY_NOTIFICATION_SOUNDS_ENABLED* = "notificationSoundsEnabled"
|
||||
const DEFAULT_NOTIFICATION_SOUNDS_ENABLED = true
|
||||
const LSS_KEY_USE_OS_NOTIFICATIONS* = "useOSNotifications"
|
||||
const DEFAULT_USE_OS_NOTIFICATIONS = true
|
||||
const LSS_KEY_NOTIFICATION_MESSAGE_PREVIEW_SETTING* = "notificationMessagePreviewSetting"
|
||||
const DEFAULT_NOTIFICATION_MESSAGE_PREVIEW_SETTING = 2 #notificationPreviewNameAndMessage from qml
|
||||
const LSS_KEY_NOTIFY_ON_NEW_REQUESTS* = "notifyOnNewRequests"
|
||||
const DEFAULT_NOTIFY_ON_NEW_REQUESTS = true
|
||||
const LSS_KEY_WITHLISTED_UNFURLING_SITES* = "whitelistedUnfurlingSites"
|
||||
const LSS_KEY_NEVER_ASK_ABOUT_UNFURLING_AGAIN* = "neverAskAboutUnfurlingAgain"
|
||||
const DEFAULT_NEVER_ASK_ABOUT_UNFURLING_AGAIN = false
|
||||
const LSS_KEY_HIDE_CHANNEL_SUGGESTIONS* = "hideChannelSuggestions"
|
||||
const DEFAULT_HIDE_CHANNEL_SUGGESTIONS = false
|
||||
const LSS_KEY_FONT_SIZE* = "fontSize"
|
||||
const DEFAULT_FONT_SIZE = 2 #fontSizeM from qml
|
||||
const LSS_KEY_HIDE_SIGN_PHRASE_MODAL* = "hideSignPhraseModal"
|
||||
const DEFAULT_HIDE_SIGN_PHRASE_MODAL = false
|
||||
const LSS_KEY_ONLY_SHOW_CONTACTS_PICS* = "onlyShowContactsProfilePics"
|
||||
const DEFAULT_ONLY_SHOW_CONTACTS_PICS = true
|
||||
const LSS_KEY_QUITE_ON_CLOSE* = "quitOnClose"
|
||||
const DEFAULT_QUITE_ON_CLOSE = false
|
||||
const LSS_KEY_SKIN_COLOR* = "skinColor"
|
||||
const DEFAULT_SKIN_COLOR = ""
|
||||
const LSS_KEY_SHOW_DELETE_MESSAGE_WARNING* = "showDeleteMessageWarning"
|
||||
const DEFAULT_SHOW_DELETE_MESSAGE_WARNING = true
|
||||
const LSS_KEY_DOWNLOAD_CHANNEL_MESSAGES_ENABLED* = "downloadChannelMessagesEnabled"
|
||||
const DEFAULT_DOWNLOAD_CHANNEL_MESSAGES_ENABLED = false
|
||||
const LSS_KEY_LAST_MODE_ACTIVE_TAB* = "lastModeActiveTab"
|
||||
const DEFAULT_LAST_MODE_ACTIVE_TAB = 0
|
||||
const LSS_KEY_LAST_MODE_ACTIVE_COMMUNITY* = "lastModeActiveCommunity"
|
||||
const DEFAULT_LAST_MODE_ACTIVE_COMMUNITY = ""
|
||||
const LSS_KEY_SHOW_BROWSER_SELECTOR* = "showBrowserSelector"
|
||||
const DEFAULT_SHOW_BROWSER_SELECTOR = true
|
||||
const LSS_KEY_OPEN_LINKS_IN_STATUS* = "openLinksInStatus"
|
||||
const DEFAULT_OPEN_LINKS_IN_STATUS = true
|
||||
const LSS_KEY_SHOULD_SHOW_FAVORITES_BAR* = "shouldShowFavoritesBar"
|
||||
const DEFAULT_SHOULD_SHOW_FAVORITES_BAR = true
|
||||
const LSS_KEY_BROWSER_HOMEPAGE* = "browserHomepage"
|
||||
const DEFAULT_BROWSER_HOMEPAGE = ""
|
||||
const LSS_KEY_SHOULD_SHOW_BROWSER_SEARCH_ENGINE* = "shouldShowBrowserSearchEngine"
|
||||
const DEFAULT_SHOULD_SHOW_BROWSER_SEARCH_ENGINE = 3 #browserSearchEngineDuckDuckGo from qml
|
||||
const LSS_KEY_USE_BROWSER_ETHEREUM_EXPLORER* = "useBrowserEthereumExplorer"
|
||||
const DEFAULT_USE_BROWSER_ETHEREUM_EXPLORER = 1 #browserEthereumExplorerEtherscan from qml
|
||||
const LSS_KEY_AUTO_LOAD_IMAGES* = "autoLoadImages"
|
||||
const DEFAULT_AUTO_LOAD_IMAGES = true
|
||||
const LSS_KEY_JAVA_SCRIPT_ENABLED* = "javaScriptEnabled"
|
||||
const DEFAULT_JAVA_SCRIPT_ENABLED = true
|
||||
const LSS_KEY_ERROR_PAGE_ENABLED* = "errorPageEnabled"
|
||||
const DEFAULT_ERROR_PAGE_ENABLED = true
|
||||
const LSS_KEY_PLUGINS_ENABLED* = "pluginsEnabled"
|
||||
const DEFAULT_PLUGINS_ENABLED = true
|
||||
const LSS_KEY_AUTO_LOAD_ICONS_FOR_PAGE* = "autoLoadIconsForPage"
|
||||
const DEFAULT_AUTO_LOAD_ICONS_FOR_PAGE = true
|
||||
const LSS_KEY_TOUCH_ICONS_ENABLED* = "touchIconsEnabled"
|
||||
const DEFAULT_TOUCH_ICONS_ENABLED = true
|
||||
const LSS_KEY_WEB_RTC_PUBLIC_INTERFACES_ONLY* = "webRTCPublicInterfacesOnly"
|
||||
const DEFAULT_WEB_RTC_PUBLIC_INTERFACES_ONLY = true
|
||||
const LSS_KEY_DEV_TOOLS_ENABLED* = "devToolsEnabled"
|
||||
const DEFAULT_DEV_TOOLS_ENABLED = false
|
||||
const LSS_KEY_PDF_VIEWER_ENABLED* = "pdfViewerEnabled"
|
||||
const DEFAULT_PDF_VIEWER_ENABLED = true
|
||||
const LSS_KEY_COMPATIBILITY_MODE* = "compatibilityMode"
|
||||
const DEFAULT_COMPATIBILITY_MODE = true
|
||||
const LSS_KEY_STICKERS_ENS_ROPSTEN* = "stickersEnsRopsten"
|
||||
const DEFAULT_STICKERS_ENS_ROPSTEN = false
|
||||
|
||||
QtObject:
|
||||
type LocalAccountSensitiveSettings* = ref object of QObject
|
||||
settingsFileDir: string
|
||||
settings: QSettings
|
||||
|
||||
proc setup(self: LocalAccountSensitiveSettings) =
|
||||
self.QObject.setup
|
||||
self.settingsFileDir = os.joinPath(DATADIR, "qt")
|
||||
|
||||
proc delete*(self: LocalAccountSensitiveSettings) =
|
||||
if(not self.settings.isNil):
|
||||
self.settings.delete
|
||||
|
||||
self.QObject.delete
|
||||
|
||||
proc newLocalAccountSensitiveSettings*():
|
||||
LocalAccountSensitiveSettings =
|
||||
new(result, delete)
|
||||
result.setup
|
||||
|
||||
proc setFileName*(self: LocalAccountSensitiveSettings, fileName: string) =
|
||||
if(not self.settings.isNil):
|
||||
self.settings.delete
|
||||
|
||||
let filePath = os.joinPath(self.settingsFileDir, fileName)
|
||||
self.settings = newQSettings(filePath, QSettingsFormat.IniFormat)
|
||||
|
||||
# float type must be exposed through QVariant property.
|
||||
proc getSettingsPropQVariant(self: LocalAccountSensitiveSettings, prop: string, default: QVariant): QVariant =
|
||||
result = if(self.settings.isNil): newQVariant() else: self.settings.value(prop, default)
|
||||
|
||||
proc getSettingsPropString(self: LocalAccountSensitiveSettings, prop: string, default: QVariant): string =
|
||||
result = if(self.settings.isNil): "" else: self.settings.value(prop, default).stringVal
|
||||
|
||||
proc getSettingsPropInt(self: LocalAccountSensitiveSettings, prop: string, default: QVariant): int =
|
||||
result = if(self.settings.isNil): 0 else: self.settings.value(prop, default).intVal
|
||||
|
||||
proc getSettingsPropBool(self: LocalAccountSensitiveSettings, prop: string, default: QVariant): bool =
|
||||
result = if(self.settings.isNil): false else: self.settings.value(prop, default).boolVal
|
||||
|
||||
template getSettingsProp[T](self: LocalAccountSensitiveSettings, prop: string, default: QVariant): untyped =
|
||||
# This doesn't work in case of QVariant, such properties will be handled in a common way.
|
||||
when T is string:
|
||||
result = getSettingsPropString(self, prop, default)
|
||||
when T is int:
|
||||
result = getSettingsPropInt(self, prop, default)
|
||||
when T is bool:
|
||||
result = getSettingsPropBool(self, prop, default)
|
||||
|
||||
template setSettingsProp(self: LocalAccountSensitiveSettings, prop: string, value: QVariant, signal: untyped) =
|
||||
if(self.settings.isNil):
|
||||
return
|
||||
|
||||
self.settings.setValue(prop, value)
|
||||
signal
|
||||
|
||||
|
||||
proc chatSplitViewChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getChatSplitView*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_CHAT_SPLIT_VIEW, newQVariant())
|
||||
proc setChatSplitView*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_CHAT_SPLIT_VIEW, value):
|
||||
self.chatSplitViewChanged()
|
||||
|
||||
QtProperty[QVariant] chatSplitView:
|
||||
read = getChatSplitView
|
||||
write = setChatSplitView
|
||||
notify = chatSplitViewChanged
|
||||
|
||||
|
||||
proc walletSplitViewChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getWalletSplitView*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_WALLET_SPLIT_VIEW, newQVariant())
|
||||
proc setWalletSplitView*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_WALLET_SPLIT_VIEW, value):
|
||||
self.walletSplitViewChanged()
|
||||
|
||||
QtProperty[QVariant] walletSplitView:
|
||||
read = getWalletSplitView
|
||||
write = setWalletSplitView
|
||||
notify = walletSplitViewChanged
|
||||
|
||||
|
||||
proc profileSplitViewChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getProfileSplitView*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_PROFILE_SPLIT_VIEW, newQVariant())
|
||||
proc setProfileSplitView*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_PROFILE_SPLIT_VIEW, value):
|
||||
self.profileSplitViewChanged()
|
||||
|
||||
QtProperty[QVariant] profileSplitView:
|
||||
read = getProfileSplitView
|
||||
write = setProfileSplitView
|
||||
notify = profileSplitViewChanged
|
||||
|
||||
|
||||
proc communitiesEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getCommunitiesEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_COMMUNITIES_ENABLED, newQVariant(DEFAULT_COMMUNITIES_ENABLED))
|
||||
proc setCommunitiesEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_COMMUNITIES_ENABLED, newQVariant(value)):
|
||||
self.communitiesEnabledChanged()
|
||||
|
||||
QtProperty[bool] communitiesEnabled:
|
||||
read = getCommunitiesEnabled
|
||||
write = setCommunitiesEnabled
|
||||
notify = communitiesEnabledChanged
|
||||
|
||||
|
||||
proc isWalletEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getIsWalletEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_IS_WALLET_ENABLED, newQVariant(DEFAULT_IS_WALLET_ENABLED))
|
||||
proc setIsWalletEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_IS_WALLET_ENABLED, newQVariant(value)):
|
||||
self.isWalletEnabledChanged()
|
||||
|
||||
QtProperty[bool] isWalletEnabled:
|
||||
read = getIsWalletEnabled
|
||||
write = setIsWalletEnabled
|
||||
notify = isWalletEnabledChanged
|
||||
|
||||
|
||||
proc isWalletV2EnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getIsWalletV2Enabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_IS_WALLET_V2_ENABLED, newQVariant(DEFAULT_IS_WALLET_V2_ENABLED))
|
||||
proc setIsWalletV2Enabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_IS_WALLET_V2_ENABLED, newQVariant(value)):
|
||||
self.isWalletV2EnabledChanged()
|
||||
|
||||
QtProperty[bool] isWalletV2Enabled:
|
||||
read = getIsWalletV2Enabled
|
||||
write = setIsWalletV2Enabled
|
||||
notify = isWalletV2EnabledChanged
|
||||
|
||||
|
||||
proc nodeManagementEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getNodeManagementEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_NODE_MANAGEMENT_ENABLED, newQVariant(DEFAULT_NODE_MANAGEMENT_ENABLED))
|
||||
proc setNodeManagementEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_NODE_MANAGEMENT_ENABLED, newQVariant(value)):
|
||||
self.nodeManagementEnabledChanged()
|
||||
|
||||
QtProperty[bool] nodeManagementEnabled:
|
||||
read = getNodeManagementEnabled
|
||||
write = setNodeManagementEnabled
|
||||
notify = nodeManagementEnabledChanged
|
||||
|
||||
|
||||
proc isBrowserEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getIsBrowserEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_IS_BROWSER_ENABLED, newQVariant(DEFAULT_IS_BROWSER_ENABLED))
|
||||
proc setIsBrowserEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_IS_BROWSER_ENABLED, newQVariant(value)):
|
||||
self.isBrowserEnabledChanged()
|
||||
|
||||
QtProperty[bool] isBrowserEnabled:
|
||||
read = getIsBrowserEnabled
|
||||
write = setIsBrowserEnabled
|
||||
notify = isBrowserEnabledChanged
|
||||
|
||||
|
||||
proc isActivityCenterEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getIsActivityCenterEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_IS_ACTIVITY_CENTER_ENABLED, newQVariant(DEFAULT_IS_ACTIVITY_CENTER_ENABLED))
|
||||
proc setIsActivityCenterEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_IS_ACTIVITY_CENTER_ENABLED, newQVariant(value)):
|
||||
self.isActivityCenterEnabledChanged()
|
||||
|
||||
QtProperty[bool] isActivityCenterEnabled:
|
||||
read = getIsActivityCenterEnabled
|
||||
write = setIsActivityCenterEnabled
|
||||
notify = isActivityCenterEnabledChanged
|
||||
|
||||
|
||||
proc showOnlineUsersChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getShowOnlineUsers*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_SHOW_ONLINE_USERS, newQVariant(DEFAULT_SHOW_ONLINE_USERS))
|
||||
proc setShowOnlineUsers*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_SHOW_ONLINE_USERS, newQVariant(value)):
|
||||
self.showOnlineUsersChanged()
|
||||
|
||||
QtProperty[bool] showOnlineUsers:
|
||||
read = getShowOnlineUsers
|
||||
write = setShowOnlineUsers
|
||||
notify = showOnlineUsersChanged
|
||||
|
||||
|
||||
proc expandUsersListChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getExpandUsersList*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_EXPAND_USERS_LIST, newQVariant(DEFAULT_EXPAND_USERS_LIST))
|
||||
proc setExpandUsersList*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_EXPAND_USERS_LIST, newQVariant(value)):
|
||||
self.expandUsersListChanged()
|
||||
|
||||
QtProperty[bool] expandUsersList:
|
||||
read = getExpandUsersList
|
||||
write = setExpandUsersList
|
||||
notify = expandUsersListChanged
|
||||
|
||||
|
||||
proc isGifWidgetEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getIsGifWidgetEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_IS_GIF_WIDGET_ENABLED, newQVariant(DEFAULT_IS_GIF_WIDGET_ENABLED))
|
||||
proc setIsGifWidgetEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_IS_GIF_WIDGET_ENABLED, newQVariant(value)):
|
||||
self.isGifWidgetEnabledChanged()
|
||||
|
||||
QtProperty[bool] isGifWidgetEnabled:
|
||||
read = getIsGifWidgetEnabled
|
||||
write = setIsGifWidgetEnabled
|
||||
notify = isGifWidgetEnabledChanged
|
||||
|
||||
|
||||
proc isKeycardEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getIsKeycardEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_IS_KEYCARD_ENABLED, newQVariant(DEFAULT_IS_KEYCARD_ENABLED))
|
||||
proc setIsKeycardEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_IS_KEYCARD_ENABLED, newQVariant(value)):
|
||||
self.isKeycardEnabledChanged()
|
||||
|
||||
QtProperty[bool] isKeycardEnabled:
|
||||
read = getIsKeycardEnabled
|
||||
write = setIsKeycardEnabled
|
||||
notify = isKeycardEnabledChanged
|
||||
|
||||
|
||||
proc isTenorWarningAcceptedChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getIsTenorWarningAccepted*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_IS_TENOR_WARNING_ACCEPTED, newQVariant(DEFAULT_IS_TENOR_WARNING_ACCEPTED))
|
||||
proc setIsTenorWarningAccepted*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_IS_TENOR_WARNING_ACCEPTED, newQVariant(value)):
|
||||
self.isTenorWarningAcceptedChanged()
|
||||
|
||||
QtProperty[bool] isTenorWarningAccepted:
|
||||
read = getIsTenorWarningAccepted
|
||||
write = setIsTenorWarningAccepted
|
||||
notify = isTenorWarningAcceptedChanged
|
||||
|
||||
|
||||
proc displayChatImagesChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getDisplayChatImages*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_DISPLAY_CHAT_IMAGES, newQVariant(DEFAULT_DISPLAY_CHAT_IMAGES))
|
||||
proc setDisplayChatImages*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_DISPLAY_CHAT_IMAGES, newQVariant(value)):
|
||||
self.displayChatImagesChanged()
|
||||
|
||||
QtProperty[bool] displayChatImages:
|
||||
read = getDisplayChatImages
|
||||
write = setDisplayChatImages
|
||||
notify = displayChatImagesChanged
|
||||
|
||||
|
||||
proc useCompactModeChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getUseCompactMode*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_USE_COMPACT_MODE, newQVariant(DEFAULT_USE_COMPACT_MODE))
|
||||
proc setUseCompactMode*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_USE_COMPACT_MODE, newQVariant(value)):
|
||||
self.useCompactModeChanged()
|
||||
|
||||
QtProperty[bool] useCompactMode:
|
||||
read = getUseCompactMode
|
||||
write = setUseCompactMode
|
||||
notify = useCompactModeChanged
|
||||
|
||||
|
||||
proc timelineEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getTimelineEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_TIMELINE_ENABLED, newQVariant(DEFAULT_TIMELINE_ENABLED))
|
||||
proc setTimelineEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_TIMELINE_ENABLED, newQVariant(value)):
|
||||
self.timelineEnabledChanged()
|
||||
|
||||
QtProperty[bool] timelineEnabled:
|
||||
read = getTimelineEnabled
|
||||
write = setTimelineEnabled
|
||||
notify = timelineEnabledChanged
|
||||
|
||||
|
||||
proc recentEmojisChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getRecentEmojis*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_RECENT_EMOJIS, newQVariant())
|
||||
proc setRecentEmojis*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_RECENT_EMOJIS, value):
|
||||
self.recentEmojisChanged()
|
||||
|
||||
QtProperty[QVariant] recentEmojis:
|
||||
read = getRecentEmojis
|
||||
write = setRecentEmojis
|
||||
notify = recentEmojisChanged
|
||||
|
||||
|
||||
proc hiddenCommunityWelcomeBannersChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getHiddenCommunityWelcomeBanners*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_HIDDEN_COMMUNITY_WELCOME_BANNERS, newQVariant())
|
||||
proc setHiddenCommunityWelcomeBanners*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_HIDDEN_COMMUNITY_WELCOME_BANNERS, value):
|
||||
self.hiddenCommunityWelcomeBannersChanged()
|
||||
|
||||
QtProperty[QVariant] hiddenCommunityWelcomeBanners:
|
||||
read = getHiddenCommunityWelcomeBanners
|
||||
write = setHiddenCommunityWelcomeBanners
|
||||
notify = hiddenCommunityWelcomeBannersChanged
|
||||
|
||||
|
||||
proc hiddenCommunityBackUpBannersChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getHiddenCommunityBackUpBanners*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_HIDDEN_COMMUNITY_BACKUP_BANNERS, newQVariant())
|
||||
proc setHiddenCommunityBackUpBanners*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_HIDDEN_COMMUNITY_BACKUP_BANNERS, value):
|
||||
self.hiddenCommunityBackUpBannersChanged()
|
||||
|
||||
QtProperty[QVariant] hiddenCommunityBackUpBanners:
|
||||
read = getHiddenCommunityBackUpBanners
|
||||
write = setHiddenCommunityBackUpBanners
|
||||
notify = hiddenCommunityBackUpBannersChanged
|
||||
|
||||
|
||||
proc volumeChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getVolume*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_VOLUME, newQVariant(DEFAULT_VOLUME))
|
||||
proc setVolume*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_VOLUME, newQVariant(value)):
|
||||
self.volumeChanged()
|
||||
|
||||
QtProperty[QVariant] volume:
|
||||
read = getVolume
|
||||
write = setVolume
|
||||
notify = volumeChanged
|
||||
|
||||
|
||||
proc notificationSettingChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getNotificationSetting*(self: LocalAccountSensitiveSettings): int {.slot.} =
|
||||
getSettingsProp[int](self, LSS_KEY_NOTIFICATION_SETTING, newQVariant(DEFAULT_NOTIFICATION_SETTING))
|
||||
proc setNotificationSetting*(self: LocalAccountSensitiveSettings, value: int) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_NOTIFICATION_SETTING, newQVariant(value)):
|
||||
self.notificationSettingChanged()
|
||||
|
||||
QtProperty[int] notificationSetting:
|
||||
read = getNotificationSetting
|
||||
write = setNotificationSetting
|
||||
notify = notificationSettingChanged
|
||||
|
||||
|
||||
proc notificationSoundsEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getNotificationSoundsEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_NOTIFICATION_SOUNDS_ENABLED, newQVariant(DEFAULT_NOTIFICATION_SOUNDS_ENABLED))
|
||||
proc setNotificationSoundsEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_NOTIFICATION_SOUNDS_ENABLED, newQVariant(value)):
|
||||
self.notificationSoundsEnabledChanged()
|
||||
|
||||
QtProperty[bool] notificationSoundsEnabled:
|
||||
read = getNotificationSoundsEnabled
|
||||
write = setNotificationSoundsEnabled
|
||||
notify = notificationSoundsEnabledChanged
|
||||
|
||||
|
||||
proc useOSNotificationsChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getUseOSNotifications*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_USE_OS_NOTIFICATIONS, newQVariant(DEFAULT_USE_OS_NOTIFICATIONS))
|
||||
proc setUseOSNotifications*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_USE_OS_NOTIFICATIONS, newQVariant(value)):
|
||||
self.useOSNotificationsChanged()
|
||||
|
||||
QtProperty[bool] useOSNotifications:
|
||||
read = getUseOSNotifications
|
||||
write = setUseOSNotifications
|
||||
notify = useOSNotificationsChanged
|
||||
|
||||
|
||||
proc notificationMessagePreviewSettingChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getNotificationMessagePreviewSetting*(self: LocalAccountSensitiveSettings): int {.slot.} =
|
||||
getSettingsProp[int](self, LSS_KEY_NOTIFICATION_MESSAGE_PREVIEW_SETTING, newQVariant(DEFAULT_NOTIFICATION_MESSAGE_PREVIEW_SETTING))
|
||||
proc setNotificationMessagePreviewSetting*(self: LocalAccountSensitiveSettings, value: int) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_NOTIFICATION_MESSAGE_PREVIEW_SETTING, newQVariant(value)):
|
||||
self.notificationMessagePreviewSettingChanged()
|
||||
|
||||
QtProperty[int] notificationMessagePreviewSetting:
|
||||
read = getNotificationMessagePreviewSetting
|
||||
write = setNotificationMessagePreviewSetting
|
||||
notify = notificationMessagePreviewSettingChanged
|
||||
|
||||
|
||||
proc notifyOnNewRequestsChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getNotifyOnNewRequests*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_NOTIFY_ON_NEW_REQUESTS, newQVariant(DEFAULT_NOTIFY_ON_NEW_REQUESTS))
|
||||
proc setNotifyOnNewRequests*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_NOTIFY_ON_NEW_REQUESTS, newQVariant(value)):
|
||||
self.notifyOnNewRequestsChanged()
|
||||
|
||||
QtProperty[bool] notifyOnNewRequests:
|
||||
read = getNotifyOnNewRequests
|
||||
write = setNotifyOnNewRequests
|
||||
notify = notifyOnNewRequestsChanged
|
||||
|
||||
|
||||
proc whitelistedUnfurlingSitesChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getWhitelistedUnfurlingSites*(self: LocalAccountSensitiveSettings): QVariant {.slot.} =
|
||||
getSettingsPropQVariant(self, LSS_KEY_WITHLISTED_UNFURLING_SITES, newQVariant())
|
||||
proc setWhitelistedUnfurlingSites*(self: LocalAccountSensitiveSettings, value: QVariant) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_WITHLISTED_UNFURLING_SITES, value):
|
||||
self.whitelistedUnfurlingSitesChanged()
|
||||
|
||||
QtProperty[QVariant] whitelistedUnfurlingSites:
|
||||
read = getWhitelistedUnfurlingSites
|
||||
write = setWhitelistedUnfurlingSites
|
||||
notify = whitelistedUnfurlingSitesChanged
|
||||
|
||||
|
||||
proc neverAskAboutUnfurlingAgainChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getNeverAskAboutUnfurlingAgain*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_NEVER_ASK_ABOUT_UNFURLING_AGAIN, newQVariant(DEFAULT_NEVER_ASK_ABOUT_UNFURLING_AGAIN))
|
||||
proc setNeverAskAboutUnfurlingAgain*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_NEVER_ASK_ABOUT_UNFURLING_AGAIN, newQVariant(value)):
|
||||
self.neverAskAboutUnfurlingAgainChanged()
|
||||
|
||||
QtProperty[bool] neverAskAboutUnfurlingAgain:
|
||||
read = getNeverAskAboutUnfurlingAgain
|
||||
write = setNeverAskAboutUnfurlingAgain
|
||||
notify = neverAskAboutUnfurlingAgainChanged
|
||||
|
||||
|
||||
proc hideChannelSuggestionsChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getHideChannelSuggestions*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_HIDE_CHANNEL_SUGGESTIONS, newQVariant(DEFAULT_HIDE_CHANNEL_SUGGESTIONS))
|
||||
proc setHideChannelSuggestions*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_HIDE_CHANNEL_SUGGESTIONS, newQVariant(value)):
|
||||
self.hideChannelSuggestionsChanged()
|
||||
|
||||
QtProperty[bool] hideChannelSuggestions:
|
||||
read = getHideChannelSuggestions
|
||||
write = setHideChannelSuggestions
|
||||
notify = hideChannelSuggestionsChanged
|
||||
|
||||
|
||||
proc fontSizeChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getfontSize*(self: LocalAccountSensitiveSettings): int {.slot.} =
|
||||
getSettingsProp[int](self, LSS_KEY_FONT_SIZE, newQVariant(DEFAULT_FONT_SIZE))
|
||||
proc setfontSize*(self: LocalAccountSensitiveSettings, value: int) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_FONT_SIZE, newQVariant(value)):
|
||||
self.fontSizeChanged()
|
||||
|
||||
QtProperty[int] fontSize:
|
||||
read = getfontSize
|
||||
write = setfontSize
|
||||
notify = fontSizeChanged
|
||||
|
||||
|
||||
proc hideSignPhraseModalChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getHideSignPhraseModal*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_HIDE_SIGN_PHRASE_MODAL, newQVariant(DEFAULT_HIDE_SIGN_PHRASE_MODAL))
|
||||
proc setHideSignPhraseModal*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_HIDE_SIGN_PHRASE_MODAL, newQVariant(value)):
|
||||
self.hideSignPhraseModalChanged()
|
||||
|
||||
QtProperty[bool] hideSignPhraseModal:
|
||||
read = getHideSignPhraseModal
|
||||
write = setHideSignPhraseModal
|
||||
notify = hideSignPhraseModalChanged
|
||||
|
||||
|
||||
proc onlyShowContactsProfilePicsChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getOnlyShowContactsProfilePics*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_ONLY_SHOW_CONTACTS_PICS, newQVariant(DEFAULT_ONLY_SHOW_CONTACTS_PICS))
|
||||
proc setOnlyShowContactsProfilePics*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_ONLY_SHOW_CONTACTS_PICS, newQVariant(value)):
|
||||
self.onlyShowContactsProfilePicsChanged()
|
||||
|
||||
QtProperty[bool] onlyShowContactsProfilePics:
|
||||
read = getOnlyShowContactsProfilePics
|
||||
write = setOnlyShowContactsProfilePics
|
||||
notify = onlyShowContactsProfilePicsChanged
|
||||
|
||||
|
||||
proc quitOnCloseChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getQuitOnClose*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_QUITE_ON_CLOSE, newQVariant(DEFAULT_QUITE_ON_CLOSE))
|
||||
proc setQuitOnClose*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_QUITE_ON_CLOSE, newQVariant(value)):
|
||||
self.quitOnCloseChanged()
|
||||
|
||||
QtProperty[bool] quitOnClose:
|
||||
read = getQuitOnClose
|
||||
write = setQuitOnClose
|
||||
notify = quitOnCloseChanged
|
||||
|
||||
|
||||
proc skinColorChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getSkinColor*(self: LocalAccountSensitiveSettings): string {.slot.} =
|
||||
getSettingsProp[string](self, LSS_KEY_SKIN_COLOR, newQVariant(DEFAULT_SKIN_COLOR))
|
||||
proc setSkinColor*(self: LocalAccountSensitiveSettings, value: string) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_SKIN_COLOR, newQVariant(value)):
|
||||
self.skinColorChanged()
|
||||
|
||||
QtProperty[string] skinColor:
|
||||
read = getSkinColor
|
||||
write = setSkinColor
|
||||
notify = skinColorChanged
|
||||
|
||||
|
||||
proc showDeleteMessageWarningChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getShowDeleteMessageWarning*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_SHOW_DELETE_MESSAGE_WARNING, newQVariant(DEFAULT_SHOW_DELETE_MESSAGE_WARNING))
|
||||
proc setShowDeleteMessageWarning*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_SHOW_DELETE_MESSAGE_WARNING, newQVariant(value)):
|
||||
self.showDeleteMessageWarningChanged()
|
||||
|
||||
QtProperty[bool] showDeleteMessageWarning:
|
||||
read = getShowDeleteMessageWarning
|
||||
write = setShowDeleteMessageWarning
|
||||
notify = showDeleteMessageWarningChanged
|
||||
|
||||
|
||||
proc downloadChannelMessagesEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getDownloadChannelMessagesEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_DOWNLOAD_CHANNEL_MESSAGES_ENABLED, newQVariant(DEFAULT_DOWNLOAD_CHANNEL_MESSAGES_ENABLED))
|
||||
proc setDownloadChannelMessagesEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_DOWNLOAD_CHANNEL_MESSAGES_ENABLED, newQVariant(value)):
|
||||
self.downloadChannelMessagesEnabledChanged()
|
||||
|
||||
QtProperty[bool] downloadChannelMessagesEnabled:
|
||||
read = getDownloadChannelMessagesEnabled
|
||||
write = setDownloadChannelMessagesEnabled
|
||||
notify = downloadChannelMessagesEnabledChanged
|
||||
|
||||
proc lastModeActiveTabChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getLastModeActiveTab*(self: LocalAccountSensitiveSettings): int {.slot.} =
|
||||
getSettingsProp[int](self, LSS_KEY_LAST_MODE_ACTIVE_TAB, newQVariant(DEFAULT_LAST_MODE_ACTIVE_TAB))
|
||||
proc setLastModeActiveTab*(self: LocalAccountSensitiveSettings, value: int) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_LAST_MODE_ACTIVE_TAB, newQVariant(value)):
|
||||
self.lastModeActiveTabChanged()
|
||||
|
||||
QtProperty[int] lastModeActiveTab:
|
||||
read = getLastModeActiveTab
|
||||
write = setLastModeActiveTab
|
||||
notify = lastModeActiveTabChanged
|
||||
|
||||
proc lastModeActiveCommunityChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getLastModeActiveCommunity*(self: LocalAccountSensitiveSettings): string {.slot.} =
|
||||
getSettingsProp[string](self, LSS_KEY_LAST_MODE_ACTIVE_COMMUNITY, newQVariant(DEFAULT_LAST_MODE_ACTIVE_COMMUNITY))
|
||||
proc setLastModeActiveCommunity*(self: LocalAccountSensitiveSettings, value: string) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_LAST_MODE_ACTIVE_COMMUNITY, newQVariant(value)):
|
||||
self.lastModeActiveCommunityChanged()
|
||||
|
||||
QtProperty[string] lastModeActiveCommunity:
|
||||
read = getLastModeActiveCommunity
|
||||
write = setLastModeActiveCommunity
|
||||
notify = lastModeActiveCommunityChanged
|
||||
|
||||
|
||||
proc showBrowserSelectorChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getShowBrowserSelector*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_SHOW_BROWSER_SELECTOR, newQVariant(DEFAULT_SHOW_BROWSER_SELECTOR))
|
||||
proc setShowBrowserSelector*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_SHOW_BROWSER_SELECTOR, newQVariant(value)):
|
||||
self.showBrowserSelectorChanged()
|
||||
|
||||
QtProperty[bool] showBrowserSelector:
|
||||
read = getShowBrowserSelector
|
||||
write = setShowBrowserSelector
|
||||
notify = showBrowserSelectorChanged
|
||||
|
||||
|
||||
proc openLinksInStatusChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getOpenLinksInStatus*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_OPEN_LINKS_IN_STATUS, newQVariant(DEFAULT_OPEN_LINKS_IN_STATUS))
|
||||
proc setOpenLinksInStatus*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_OPEN_LINKS_IN_STATUS, newQVariant(value)):
|
||||
self.openLinksInStatusChanged()
|
||||
|
||||
QtProperty[bool] openLinksInStatus:
|
||||
read = getOpenLinksInStatus
|
||||
write = setOpenLinksInStatus
|
||||
notify = openLinksInStatusChanged
|
||||
|
||||
|
||||
proc shouldShowFavoritesBarChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getShouldShowFavoritesBar*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_SHOULD_SHOW_FAVORITES_BAR, newQVariant(DEFAULT_SHOULD_SHOW_FAVORITES_BAR))
|
||||
proc setShouldShowFavoritesBar*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_SHOULD_SHOW_FAVORITES_BAR, newQVariant(value)):
|
||||
self.shouldShowFavoritesBarChanged()
|
||||
|
||||
QtProperty[bool] shouldShowFavoritesBar:
|
||||
read = getShouldShowFavoritesBar
|
||||
write = setShouldShowFavoritesBar
|
||||
notify = shouldShowFavoritesBarChanged
|
||||
|
||||
|
||||
proc browserHomepageChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getBrowserHomepage*(self: LocalAccountSensitiveSettings): string {.slot.} =
|
||||
getSettingsProp[string](self, LSS_KEY_BROWSER_HOMEPAGE, newQVariant(DEFAULT_BROWSER_HOMEPAGE))
|
||||
proc setBrowserHomepage*(self: LocalAccountSensitiveSettings, value: string) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_BROWSER_HOMEPAGE, newQVariant(value)):
|
||||
self.browserHomepageChanged()
|
||||
|
||||
QtProperty[string] browserHomepage:
|
||||
read = getBrowserHomepage
|
||||
write = setBrowserHomepage
|
||||
notify = browserHomepageChanged
|
||||
|
||||
|
||||
proc shouldShowBrowserSearchEngineChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getShouldShowBrowserSearchEngine*(self: LocalAccountSensitiveSettings): int {.slot.} =
|
||||
getSettingsProp[int](self, LSS_KEY_SHOULD_SHOW_BROWSER_SEARCH_ENGINE, newQVariant(DEFAULT_SHOULD_SHOW_BROWSER_SEARCH_ENGINE))
|
||||
proc setShouldShowBrowserSearchEngine*(self: LocalAccountSensitiveSettings, value: int) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_SHOULD_SHOW_BROWSER_SEARCH_ENGINE, newQVariant(value)):
|
||||
self.shouldShowBrowserSearchEngineChanged()
|
||||
|
||||
QtProperty[int] shouldShowBrowserSearchEngine:
|
||||
read = getShouldShowBrowserSearchEngine
|
||||
write = setShouldShowBrowserSearchEngine
|
||||
notify = shouldShowBrowserSearchEngineChanged
|
||||
|
||||
|
||||
proc useBrowserEthereumExplorerChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getUseBrowserEthereumExplorer*(self: LocalAccountSensitiveSettings): int {.slot.} =
|
||||
getSettingsProp[int](self, LSS_KEY_USE_BROWSER_ETHEREUM_EXPLORER, newQVariant(DEFAULT_USE_BROWSER_ETHEREUM_EXPLORER))
|
||||
proc setUseBrowserEthereumExplorer*(self: LocalAccountSensitiveSettings, value: int) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_USE_BROWSER_ETHEREUM_EXPLORER, newQVariant(value)):
|
||||
self.useBrowserEthereumExplorerChanged()
|
||||
|
||||
QtProperty[int] useBrowserEthereumExplorer:
|
||||
read = getUseBrowserEthereumExplorer
|
||||
write = setUseBrowserEthereumExplorer
|
||||
notify = useBrowserEthereumExplorerChanged
|
||||
|
||||
|
||||
proc autoLoadImagesChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getAutoLoadImages*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_AUTO_LOAD_IMAGES, newQVariant(DEFAULT_AUTO_LOAD_IMAGES))
|
||||
proc setAutoLoadImages*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_AUTO_LOAD_IMAGES, newQVariant(value)):
|
||||
self.autoLoadImagesChanged()
|
||||
|
||||
QtProperty[bool] autoLoadImages:
|
||||
read = getAutoLoadImages
|
||||
write = setAutoLoadImages
|
||||
notify = autoLoadImagesChanged
|
||||
|
||||
|
||||
proc javaScriptEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getJavaScriptEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_JAVA_SCRIPT_ENABLED, newQVariant(DEFAULT_JAVA_SCRIPT_ENABLED))
|
||||
proc setJavaScriptEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_JAVA_SCRIPT_ENABLED, newQVariant(value)):
|
||||
self.javaScriptEnabledChanged()
|
||||
|
||||
QtProperty[bool] javaScriptEnabled:
|
||||
read = getJavaScriptEnabled
|
||||
write = setJavaScriptEnabled
|
||||
notify = javaScriptEnabledChanged
|
||||
|
||||
|
||||
proc errorPageEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getErrorPageEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_ERROR_PAGE_ENABLED, newQVariant(DEFAULT_ERROR_PAGE_ENABLED))
|
||||
proc setErrorPageEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_ERROR_PAGE_ENABLED, newQVariant(value)):
|
||||
self.errorPageEnabledChanged()
|
||||
|
||||
QtProperty[bool] errorPageEnabled:
|
||||
read = getErrorPageEnabled
|
||||
write = setErrorPageEnabled
|
||||
notify = errorPageEnabledChanged
|
||||
|
||||
|
||||
proc pluginsEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getPluginsEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_PLUGINS_ENABLED, newQVariant(DEFAULT_PLUGINS_ENABLED))
|
||||
proc setPluginsEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_PLUGINS_ENABLED, newQVariant(value)):
|
||||
self.pluginsEnabledChanged()
|
||||
|
||||
QtProperty[bool] pluginsEnabled:
|
||||
read = getPluginsEnabled
|
||||
write = setPluginsEnabled
|
||||
notify = pluginsEnabledChanged
|
||||
|
||||
|
||||
proc autoLoadIconsForPageChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getAutoLoadIconsForPage*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_AUTO_LOAD_ICONS_FOR_PAGE, newQVariant(DEFAULT_AUTO_LOAD_ICONS_FOR_PAGE))
|
||||
proc setAutoLoadIconsForPage*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_AUTO_LOAD_ICONS_FOR_PAGE, newQVariant(value)):
|
||||
self.autoLoadIconsForPageChanged()
|
||||
|
||||
QtProperty[bool] autoLoadIconsForPage:
|
||||
read = getAutoLoadIconsForPage
|
||||
write = setAutoLoadIconsForPage
|
||||
notify = autoLoadIconsForPageChanged
|
||||
|
||||
|
||||
proc touchIconsEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getTouchIconsEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_TOUCH_ICONS_ENABLED, newQVariant(DEFAULT_TOUCH_ICONS_ENABLED))
|
||||
proc setTouchIconsEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_TOUCH_ICONS_ENABLED, newQVariant(value)):
|
||||
self.touchIconsEnabledChanged()
|
||||
|
||||
QtProperty[bool] touchIconsEnabled:
|
||||
read = getTouchIconsEnabled
|
||||
write = setTouchIconsEnabled
|
||||
notify = touchIconsEnabledChanged
|
||||
|
||||
|
||||
proc webRTCPublicInterfacesOnlyChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getWebRTCPublicInterfacesOnly*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_WEB_RTC_PUBLIC_INTERFACES_ONLY, newQVariant(DEFAULT_WEB_RTC_PUBLIC_INTERFACES_ONLY))
|
||||
proc setWebRTCPublicInterfacesOnly*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_WEB_RTC_PUBLIC_INTERFACES_ONLY, newQVariant(value)):
|
||||
self.webRTCPublicInterfacesOnlyChanged()
|
||||
|
||||
QtProperty[bool] webRTCPublicInterfacesOnly:
|
||||
read = getWebRTCPublicInterfacesOnly
|
||||
write = setWebRTCPublicInterfacesOnly
|
||||
notify = webRTCPublicInterfacesOnlyChanged
|
||||
|
||||
|
||||
proc devToolsEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getDevToolsEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_DEV_TOOLS_ENABLED, newQVariant(DEFAULT_DEV_TOOLS_ENABLED))
|
||||
proc setDevToolsEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_DEV_TOOLS_ENABLED, newQVariant(value)):
|
||||
self.devToolsEnabledChanged()
|
||||
|
||||
QtProperty[bool] devToolsEnabled:
|
||||
read = getDevToolsEnabled
|
||||
write = setDevToolsEnabled
|
||||
notify = devToolsEnabledChanged
|
||||
|
||||
|
||||
proc pdfViewerEnabledChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getPdfViewerEnabled*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_PDF_VIEWER_ENABLED, newQVariant(DEFAULT_PDF_VIEWER_ENABLED))
|
||||
proc setPdfViewerEnabled*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_PDF_VIEWER_ENABLED, newQVariant(value)):
|
||||
self.pdfViewerEnabledChanged()
|
||||
|
||||
QtProperty[bool] pdfViewerEnabled:
|
||||
read = getPdfViewerEnabled
|
||||
write = setPdfViewerEnabled
|
||||
notify = pdfViewerEnabledChanged
|
||||
|
||||
|
||||
proc compatibilityModeChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getCompatibilityMode*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_COMPATIBILITY_MODE, newQVariant(DEFAULT_COMPATIBILITY_MODE))
|
||||
proc setCompatibilityMode*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_COMPATIBILITY_MODE, newQVariant(value)):
|
||||
self.compatibilityModeChanged()
|
||||
|
||||
QtProperty[bool] compatibilityMode:
|
||||
read = getCompatibilityMode
|
||||
write = setCompatibilityMode
|
||||
notify = compatibilityModeChanged
|
||||
|
||||
|
||||
proc stickersEnsRopstenChanged*(self: LocalAccountSensitiveSettings) {.signal.}
|
||||
proc getStickersEnsRopsten*(self: LocalAccountSensitiveSettings): bool {.slot.} =
|
||||
getSettingsProp[bool](self, LSS_KEY_STICKERS_ENS_ROPSTEN, newQVariant(DEFAULT_STICKERS_ENS_ROPSTEN))
|
||||
proc setStickersEnsRopsten*(self: LocalAccountSensitiveSettings, value: bool) {.slot.} =
|
||||
setSettingsProp(self, LSS_KEY_STICKERS_ENS_ROPSTEN, newQVariant(value)):
|
||||
self.stickersEnsRopstenChanged()
|
||||
|
||||
QtProperty[bool] stickersEnsRopsten:
|
||||
read = getStickersEnsRopsten
|
||||
write = setStickersEnsRopsten
|
||||
notify = stickersEnsRopstenChanged
|
||||
|
||||
|
||||
proc removeKey*(self: LocalAccountSensitiveSettings, key: string) =
|
||||
if(self.settings.isNil):
|
||||
return
|
||||
|
||||
self.settings.remove(key)
|
||||
|
||||
case key:
|
||||
of LSS_KEY_CHAT_SPLIT_VIEW: self.chatSplitViewChanged()
|
||||
of LSS_KEY_WALLET_SPLIT_VIEW: self.walletSplitViewChanged()
|
||||
of LSS_KEY_PROFILE_SPLIT_VIEW: self.profileSplitViewChanged()
|
||||
of LSS_KEY_COMMUNITIES_ENABLED: self.communitiesEnabledChanged()
|
||||
of LSS_KEY_IS_WALLET_ENABLED: self.isWalletEnabledChanged()
|
||||
of LSS_KEY_IS_WALLET_V2_ENABLED: self.isWalletV2EnabledChanged()
|
||||
of LSS_KEY_NODE_MANAGEMENT_ENABLED: self.nodeManagementEnabledChanged()
|
||||
of LSS_KEY_IS_BROWSER_ENABLED: self.isBrowserEnabledChanged()
|
||||
of LSS_KEY_IS_ACTIVITY_CENTER_ENABLED: self.isActivityCenterEnabledChanged()
|
||||
of LSS_KEY_SHOW_ONLINE_USERS: self.showOnlineUsersChanged()
|
||||
of LSS_KEY_EXPAND_USERS_LIST: self.expandUsersListChanged()
|
||||
of LSS_KEY_IS_GIF_WIDGET_ENABLED: self.isGifWidgetEnabledChanged()
|
||||
of LSS_KEY_IS_KEYCARD_ENABLED: self.isKeycardEnabledChanged()
|
||||
of LSS_KEY_IS_TENOR_WARNING_ACCEPTED: self.isTenorWarningAcceptedChanged()
|
||||
of LSS_KEY_DISPLAY_CHAT_IMAGES: self.displayChatImagesChanged()
|
||||
of LSS_KEY_USE_COMPACT_MODE: self.useCompactModeChanged()
|
||||
of LSS_KEY_TIMELINE_ENABLED: self.timelineEnabledChanged()
|
||||
of LSS_KEY_RECENT_EMOJIS: self.recentEmojisChanged()
|
||||
of LSS_KEY_HIDDEN_COMMUNITY_WELCOME_BANNERS: self.hiddenCommunityWelcomeBannersChanged()
|
||||
of LSS_KEY_HIDDEN_COMMUNITY_BACKUP_BANNERS: self.hiddenCommunityBackUpBannersChanged()
|
||||
of LSS_KEY_VOLUME: self.volumeChanged()
|
||||
of LSS_KEY_NOTIFICATION_SETTING: self.notificationSettingChanged()
|
||||
of LSS_KEY_NOTIFICATION_SOUNDS_ENABLED: self.notificationSoundsEnabledChanged()
|
||||
of LSS_KEY_USE_OS_NOTIFICATIONS: self.useOSNotificationsChanged()
|
||||
of LSS_KEY_NOTIFICATION_MESSAGE_PREVIEW_SETTING: self.notificationMessagePreviewSettingChanged()
|
||||
of LSS_KEY_NOTIFY_ON_NEW_REQUESTS: self.notifyOnNewRequestsChanged()
|
||||
of LSS_KEY_WITHLISTED_UNFURLING_SITES: self.whitelistedUnfurlingSitesChanged()
|
||||
of LSS_KEY_NEVER_ASK_ABOUT_UNFURLING_AGAIN: self.neverAskAboutUnfurlingAgainChanged()
|
||||
of LSS_KEY_HIDE_CHANNEL_SUGGESTIONS: self.hideChannelSuggestionsChanged()
|
||||
of LSS_KEY_FONT_SIZE: self.fontSizeChanged()
|
||||
of LSS_KEY_HIDE_SIGN_PHRASE_MODAL: self.hideSignPhraseModalChanged()
|
||||
of LSS_KEY_ONLY_SHOW_CONTACTS_PICS: self.onlyShowContactsProfilePicsChanged()
|
||||
of LSS_KEY_QUITE_ON_CLOSE: self.quitOnCloseChanged()
|
||||
of LSS_KEY_SKIN_COLOR: self.skinColorChanged()
|
||||
of LSS_KEY_SHOW_DELETE_MESSAGE_WARNING: self.showDeleteMessageWarningChanged()
|
||||
of LSS_KEY_DOWNLOAD_CHANNEL_MESSAGES_ENABLED: self.downloadChannelMessagesEnabledChanged()
|
||||
of LSS_KEY_LAST_MODE_ACTIVE_TAB: self.lastModeActiveTabChanged()
|
||||
of LSS_KEY_LAST_MODE_ACTIVE_COMMUNITY: self.lastModeActiveCommunityChanged()
|
||||
of LSS_KEY_SHOW_BROWSER_SELECTOR: self.showBrowserSelectorChanged()
|
||||
of LSS_KEY_OPEN_LINKS_IN_STATUS: self.openLinksInStatusChanged()
|
||||
of LSS_KEY_SHOULD_SHOW_FAVORITES_BAR: self.shouldShowFavoritesBarChanged()
|
||||
of LSS_KEY_BROWSER_HOMEPAGE: self.browserHomepageChanged()
|
||||
of LSS_KEY_SHOULD_SHOW_BROWSER_SEARCH_ENGINE: self.shouldShowBrowserSearchEngineChanged()
|
||||
of LSS_KEY_USE_BROWSER_ETHEREUM_EXPLORER: self.useBrowserEthereumExplorerChanged()
|
||||
of LSS_KEY_AUTO_LOAD_IMAGES: self.autoLoadImagesChanged()
|
||||
of LSS_KEY_JAVA_SCRIPT_ENABLED: self.javaScriptEnabledChanged()
|
||||
of LSS_KEY_ERROR_PAGE_ENABLED: self.errorPageEnabledChanged()
|
||||
of LSS_KEY_PLUGINS_ENABLED: self.pluginsEnabledChanged()
|
||||
of LSS_KEY_AUTO_LOAD_ICONS_FOR_PAGE: self.autoLoadIconsForPageChanged()
|
||||
of LSS_KEY_TOUCH_ICONS_ENABLED: self.touchIconsEnabledChanged()
|
||||
of LSS_KEY_WEB_RTC_PUBLIC_INTERFACES_ONLY: self.webRTCPublicInterfacesOnlyChanged()
|
||||
of LSS_KEY_DEV_TOOLS_ENABLED: self.devToolsEnabledChanged()
|
||||
of LSS_KEY_PDF_VIEWER_ENABLED: self.pdfViewerEnabledChanged()
|
||||
of LSS_KEY_COMPATIBILITY_MODE: self.compatibilityModeChanged()
|
||||
of LSS_KEY_STICKERS_ENS_ROPSTEN: self.stickersEnsRopstenChanged()
|
|
@ -70,7 +70,7 @@ Rectangle {
|
|||
storageName: "Profile"
|
||||
offTheRecord: false
|
||||
httpUserAgent: {
|
||||
if (appSettings.compatibilityMode) {
|
||||
if (localAccountSensitiveSettings.compatibilityMode) {
|
||||
// Google doesn't let you connect if the user agent is Chrome-ish and doesn't satisfy some sort of hidden requirement
|
||||
return "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0"
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ Rectangle {
|
|||
|
||||
WebEngineView {
|
||||
id: devToolsView
|
||||
visible: appSettings.devToolsEnabled
|
||||
visible: localAccountSensitiveSettings.devToolsEnabled
|
||||
height: visible ? 400 : 0
|
||||
inspectedView: visible && tabs.currentIndex < tabs.count ? tabs.getTab(tabs.currentIndex).item : null
|
||||
anchors.left: parent.left
|
||||
|
|
|
@ -124,8 +124,8 @@ Rectangle {
|
|||
Keys.onPressed: {
|
||||
// TODO: disable browsing local files? file://
|
||||
if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
|
||||
if (appSettings.useBrowserEthereumExplorer !== Constants.browserEthereumExplorerNone && text.startsWith("0x")) {
|
||||
switch (appSettings.useBrowserEthereumExplorer) {
|
||||
if (localAccountSensitiveSettings.useBrowserEthereumExplorer !== Constants.browserEthereumExplorerNone && text.startsWith("0x")) {
|
||||
switch (localAccountSensitiveSettings.useBrowserEthereumExplorer) {
|
||||
case Constants.browserEthereumExplorerEtherscan:
|
||||
if (text.length > 42) {
|
||||
currentWebView.url = "https://etherscan.io/tx/" + text; break;
|
||||
|
@ -147,8 +147,8 @@ Rectangle {
|
|||
}
|
||||
return
|
||||
}
|
||||
if (appSettings.shouldShowBrowserSearchEngine !== Constants.browserSearchEngineNone && !Utils.isURL(text) && !Utils.isURLWithOptionalProtocol(text)) {
|
||||
switch (appSettings.shouldShowBrowserSearchEngine) {
|
||||
if (localAccountSensitiveSettings.shouldShowBrowserSearchEngine !== Constants.browserSearchEngineNone && !Utils.isURL(text) && !Utils.isURLWithOptionalProtocol(text)) {
|
||||
switch (localAccountSensitiveSettings.shouldShowBrowserSearchEngine) {
|
||||
case Constants.browserSearchEngineGoogle: currentWebView.url = "https://www.google.com/search?q=" + text; break;
|
||||
case Constants.browserSearchEngineYahoo: currentWebView.url = "https://search.yahoo.com/search?p=" + text; break;
|
||||
case Constants.browserSearchEngineDuckDuckGo: currentWebView.url = "https://duckduckgo.com/?q=" + text; break;
|
||||
|
@ -269,7 +269,7 @@ Rectangle {
|
|||
|
||||
Loader {
|
||||
id: favoritesBarLoader
|
||||
active: appSettings.shouldShowFavoritesBar
|
||||
active: localAccountSensitiveSettings.shouldShowFavoritesBar
|
||||
height: active ? item.height : 0
|
||||
anchors.top: barRow.bottom
|
||||
anchors.left: parent.left
|
||||
|
|
|
@ -33,8 +33,8 @@ QQC1.TabView {
|
|||
}
|
||||
|
||||
tab.item.profile = profile;
|
||||
if (appSettings.browserHomepage !== "") {
|
||||
tab.item.url = appSettings.browserHomepage
|
||||
if (localAccountSensitiveSettings.browserHomepage !== "") {
|
||||
tab.item.url = localAccountSensitiveSettings.browserHomepage
|
||||
}
|
||||
return tab;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ PopupMenu {
|
|||
tabs.getTab(i).item.stop(); // Stop all loading tabs
|
||||
}
|
||||
|
||||
appSettings.compatibilityMode = checked;
|
||||
localAccountSensitiveSettings.compatibilityMode = checked;
|
||||
|
||||
for (let i = 0; i < tabs.count; ++i){
|
||||
tabs.getTab(i).item.reload(); // Reload them with new user agent
|
||||
|
@ -106,7 +106,7 @@ PopupMenu {
|
|||
text: qsTrId("developer-tools")
|
||||
shortcut: "F12"
|
||||
onTriggered: {
|
||||
appSettings.devToolsEnabled = !appSettings.devToolsEnabled
|
||||
localAccountSensitiveSettings.devToolsEnabled = !localAccountSensitiveSettings.devToolsEnabled
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,14 +30,14 @@ WebEngineView {
|
|||
zoomFactor = newFactor
|
||||
}
|
||||
|
||||
settings.autoLoadImages: appSettings.autoLoadImages
|
||||
settings.javascriptEnabled: appSettings.javaScriptEnabled
|
||||
settings.errorPageEnabled: appSettings.errorPageEnabled
|
||||
settings.pluginsEnabled: appSettings.pluginsEnabled
|
||||
settings.autoLoadIconsForPage: appSettings.autoLoadIconsForPage
|
||||
settings.touchIconsEnabled: appSettings.touchIconsEnabled
|
||||
settings.webRTCPublicInterfacesOnly: appSettings.webRTCPublicInterfacesOnly
|
||||
settings.pdfViewerEnabled: appSettings.pdfViewerEnabled
|
||||
settings.autoLoadImages: localAccountSensitiveSettings.autoLoadImages
|
||||
settings.javascriptEnabled: localAccountSensitiveSettings.javaScriptEnabled
|
||||
settings.errorPageEnabled: localAccountSensitiveSettings.errorPageEnabled
|
||||
settings.pluginsEnabled: localAccountSensitiveSettings.pluginsEnabled
|
||||
settings.autoLoadIconsForPage: localAccountSensitiveSettings.autoLoadIconsForPage
|
||||
settings.touchIconsEnabled: localAccountSensitiveSettings.touchIconsEnabled
|
||||
settings.webRTCPublicInterfacesOnly: localAccountSensitiveSettings.webRTCPublicInterfacesOnly
|
||||
settings.pdfViewerEnabled: localAccountSensitiveSettings.pdfViewerEnabled
|
||||
settings.focusOnNavigationEnabled: true
|
||||
|
||||
onCertificateError: function(error) {
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
import QtQuick 2.13
|
||||
import QtGraphicalEffects 1.13
|
||||
|
||||
import utils 1.0
|
||||
import "../../../../../shared"
|
||||
import "../../../../../shared/panels"
|
||||
import "../../../../../shared/controls"
|
||||
import "../../../../../shared/status"
|
||||
import ".."
|
||||
import "../../components"
|
||||
|
||||
Rectangle {
|
||||
property string chatId: ""
|
||||
property string name: "channelName"
|
||||
property string identicon
|
||||
property string responseTo
|
||||
property string communityId
|
||||
property int notificationType
|
||||
property int chatType: chatsModel.channelView.chats.getChannelType(chatId)
|
||||
property int realChatType: {
|
||||
if (chatType === Constants.chatTypeCommunity) {
|
||||
// TODO add a check for private community chats once it is created
|
||||
return Constants.chatTypePublic
|
||||
}
|
||||
return chatType
|
||||
}
|
||||
|
||||
property string profileImage: realChatType === Constants.chatTypeOneToOne ? appMain.getProfileImage(chatId) || "" : ""
|
||||
|
||||
id: wrapper
|
||||
height: visible ? 24 : 0
|
||||
width: childrenRect.width + 12
|
||||
color: Style.current.transparent
|
||||
border.color: Style.current.borderSecondary
|
||||
border.width: 1
|
||||
radius: 11
|
||||
|
||||
Loader {
|
||||
active: true
|
||||
height: parent.height
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
sourceComponent: {
|
||||
switch (model.notificationType) {
|
||||
case Constants.activityCenterNotificationTypeMention: return communityOrChannelContentComponent
|
||||
case Constants.activityCenterNotificationTypeReply: return replyComponent
|
||||
default: return communityOrChannelContentComponent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: replyComponent
|
||||
|
||||
Item {
|
||||
property int replyMessageIndex: chatsModel.messageView.getMessageIndex(chatId, responseTo)
|
||||
property string repliedMessageContent: replyMessageIndex > -1 ? chatsModel.messageView.getMessageData(chatId, replyMessageIndex, "message") : "";
|
||||
|
||||
|
||||
onReplyMessageIndexChanged: {
|
||||
wrapper.visible = replyMessageIndex > -1
|
||||
}
|
||||
|
||||
width: childrenRect.width
|
||||
height: parent.height
|
||||
SVGImage {
|
||||
id: replyIcon
|
||||
width: 16
|
||||
height: 16
|
||||
source: Style.svg("reply-small-arrow")
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter:parent.verticalCenter
|
||||
}
|
||||
|
||||
StyledTextEdit {
|
||||
text: Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(repliedMessageContent), Emoji.size.small), false, localAccountSensitiveSettings.useCompactMode)
|
||||
textFormat: Text.RichText
|
||||
height: 18
|
||||
width: implicitWidth > 300 ? 300 : implicitWidth
|
||||
clip: true
|
||||
anchors.left: replyIcon.right
|
||||
anchors.leftMargin: 4
|
||||
color: Style.current.secondaryText
|
||||
font.weight: Font.Medium
|
||||
font.pixelSize: 13
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
selectByMouse: true
|
||||
readOnly: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: communityOrChannelContentComponent
|
||||
|
||||
BadgeContent {
|
||||
chatId: wrapper.chatId
|
||||
name: wrapper.name
|
||||
identicon: wrapper.identicon
|
||||
communityId: wrapper.communityId
|
||||
}
|
||||
}
|
||||
}
|
|
@ -161,7 +161,7 @@ StatusAppThreePanelLayout {
|
|||
|
||||
leftPanel: Loader {
|
||||
id: contactColumnLoader
|
||||
sourceComponent: appSettings.communitiesEnabled && root.rootStore.chatsModelInst.communities.activeCommunity.active ? communtiyColumnComponent : contactsColumnComponent
|
||||
sourceComponent: localAccountSensitiveSettings.communitiesEnabled && root.rootStore.chatsModelInst.communities.activeCommunity.active ? communtiyColumnComponent : contactsColumnComponent
|
||||
}
|
||||
|
||||
centerPanel: ChatColumn {
|
||||
|
@ -169,9 +169,9 @@ StatusAppThreePanelLayout {
|
|||
chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount
|
||||
}
|
||||
|
||||
showRightPanel: (appSettings.expandUsersList && (appSettings.showOnlineUsers || chatsModel.communities.activeCommunity.active)
|
||||
showRightPanel: (localAccountSensitiveSettings.expandUsersList && (localAccountSensitiveSettings.showOnlineUsers || chatsModel.communities.activeCommunity.active)
|
||||
&& (chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne))
|
||||
rightPanel: appSettings.communitiesEnabled && chatsModel.communities.activeCommunity.active ? communityUserListComponent : userListComponent
|
||||
rightPanel: localAccountSensitiveSettings.communitiesEnabled && chatsModel.communities.activeCommunity.active ? communityUserListComponent : userListComponent
|
||||
|
||||
Component {
|
||||
id: communityUserListComponent
|
||||
|
|
|
@ -27,7 +27,7 @@ Item {
|
|||
}
|
||||
|
||||
StyledTextEdit {
|
||||
text: Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(repliedMessageContent), Emoji.size.small), false, appSettings.useCompactMode)
|
||||
text: Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(repliedMessageContent), Emoji.size.small), false, localAccountSensitiveSettings.useCompactMode)
|
||||
textFormat: Text.RichText
|
||||
height: 18
|
||||
width: implicitWidth > 300 ? 300 : implicitWidth
|
||||
|
|
|
@ -42,7 +42,7 @@ Loader {
|
|||
property alias authorMetrics: txtAuthorMetrics
|
||||
property var messageEdited: function(id, content) {
|
||||
if (responseTo === id){
|
||||
lblReplyMessage.text = Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(content + Constants.editLabel), Emoji.size.small), isCurrentUser, appSettings.useCompactMode)
|
||||
lblReplyMessage.text = Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(content + Constants.editLabel), Emoji.size.small), isCurrentUser, localAccountSensitiveSettings.useCompactMode)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,9 +172,9 @@ Loader {
|
|||
text: {
|
||||
if (repliedMessageIsEdited){
|
||||
let index = repliedMessageContent.length - 4
|
||||
return Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(repliedMessageContent.slice(0, index) + Constants.editLabel + repliedMessageContent.slice(index)), Emoji.size.small), isCurrentUser, appSettings.useCompactMode)
|
||||
return Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(repliedMessageContent.slice(0, index) + Constants.editLabel + repliedMessageContent.slice(index)), Emoji.size.small), isCurrentUser, localAccountSensitiveSettings.useCompactMode)
|
||||
} else {
|
||||
return Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(repliedMessageContent), Emoji.size.small), isCurrentUser, appSettings.useCompactMode)
|
||||
return Utils.getReplyMessageStyle(Emoji.parse(Utils.linkifyAndXSS(repliedMessageContent), Emoji.size.small), isCurrentUser, localAccountSensitiveSettings.useCompactMode)
|
||||
}
|
||||
}
|
||||
textFormat: Text.RichText
|
||||
|
|
|
@ -55,9 +55,9 @@ Item {
|
|||
width: 10
|
||||
height: 10
|
||||
anchors.top: parent.top
|
||||
anchors.left: !isCurrentUser || appSettings.useCompactMode ? parent.left : undefined
|
||||
anchors.left: !isCurrentUser || localAccountSensitiveSettings.useCompactMode ? parent.left : undefined
|
||||
anchors.leftMargin: 0
|
||||
anchors.right: !isCurrentUser || appSettings.useCompactMode ? undefined : parent.right
|
||||
anchors.right: !isCurrentUser || localAccountSensitiveSettings.useCompactMode ? undefined : parent.right
|
||||
anchors.rightMargin: 0
|
||||
radius: 2
|
||||
z: -1
|
||||
|
@ -84,9 +84,9 @@ Item {
|
|||
width: 10
|
||||
height: 10
|
||||
anchors.top: parent.top
|
||||
anchors.left: !isCurrentUser || appSettings.useCompactMode ? parent.left : undefined
|
||||
anchors.left: !isCurrentUser || localAccountSensitiveSettings.useCompactMode ? parent.left : undefined
|
||||
anchors.leftMargin: 0
|
||||
anchors.right: !isCurrentUser || appSettings.useCompactMode ? undefined : parent.right
|
||||
anchors.right: !isCurrentUser || localAccountSensitiveSettings.useCompactMode ? undefined : parent.right
|
||||
anchors.rightMargin: 0
|
||||
radius: 2
|
||||
z: -1
|
||||
|
|
|
@ -64,8 +64,9 @@ Rectangle {
|
|||
icon.width: 20
|
||||
icon.name: "close-circle"
|
||||
type: StatusQControls.StatusFlatRoundButton.Type.Tertiary
|
||||
onClicked: appSettings.hideChannelSuggestions = true
|
||||
|
||||
onClicked: {
|
||||
localAccountSensitiveSettings.hideChannelSuggestions = true
|
||||
}
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
|
|
@ -71,9 +71,9 @@ Rectangle {
|
|||
TransferOwnershipPopup {
|
||||
anchors.centerIn: parent
|
||||
onClosed: {
|
||||
let hiddenBannerIds = appSettings.hiddenCommunityBackUpBanners
|
||||
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityBackUpBanners
|
||||
hiddenBannerIds.push(chatsModel.communities.activeCommunity.id)
|
||||
appSettings.hiddenCommunityBackUpBanners = hiddenBannerIds
|
||||
localAccountSensitiveSettings.hiddenCommunityBackUpBanners = hiddenBannerIds
|
||||
destroy()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,9 +55,9 @@ Rectangle {
|
|||
icon.name: "close-circle"
|
||||
type: StatusQControls.StatusFlatRoundButton.Type.Tertiary
|
||||
onClicked: {
|
||||
let hiddenBannerIds = appSettings.hiddenCommunityWelcomeBanners
|
||||
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityWelcomeBanners
|
||||
hiddenBannerIds.push(root.activeCommunity.id)
|
||||
appSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds
|
||||
localAccountSensitiveSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds
|
||||
root.visible = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,9 +32,9 @@ StatusModal {
|
|||
text: qsTrId("browsing-open-in-status")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: {
|
||||
appSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
|
||||
localAccountSensitiveSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
|
||||
if (rememberChoiceCheckBox.checked) {
|
||||
appSettings.openLinksInStatus = true
|
||||
localAccountSensitiveSettings.openLinksInStatus = true
|
||||
}
|
||||
changeAppSection(Constants.browser)
|
||||
browserLayoutContainer.item.openUrlInNewTab(popup.link)
|
||||
|
@ -47,9 +47,9 @@ StatusModal {
|
|||
text: qsTrId("open-in-my-default-browser")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: {
|
||||
appSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
|
||||
localAccountSensitiveSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
|
||||
if (rememberChoiceCheckBox.checked) {
|
||||
appSettings.openLinksInStatus = false
|
||||
localAccountSensitiveSettings.openLinksInStatus = false
|
||||
}
|
||||
Qt.openUrlExternally(popup.link)
|
||||
popup.close()
|
||||
|
|
|
@ -198,16 +198,16 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
membersButton.visible: (appSettings.showOnlineUsers || root.rootStore.chatsModelInst.communities.activeCommunity.active)
|
||||
membersButton.visible: (localAccountSensitiveSettings.showOnlineUsers || root.rootStore.chatsModelInst.communities.activeCommunity.active)
|
||||
&& root.rootStore.chatsModelInst.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne
|
||||
membersButton.highlighted: appSettings.expandUsersList
|
||||
notificationButton.visible: appSettings.isActivityCenterEnabled
|
||||
notificationButton.tooltip.offset: appSettings.expandUsersList ? 0 : 14
|
||||
membersButton.highlighted: localAccountSensitiveSettings.expandUsersList
|
||||
notificationButton.visible: localAccountSensitiveSettings.isActivityCenterEnabled
|
||||
notificationButton.tooltip.offset: localAccountSensitiveSettings.expandUsersList ? 0 : 14
|
||||
notificationCount: root.rootStore.chatsModelInst.activityNotificationList.unreadCount
|
||||
|
||||
onSearchButtonClicked: searchPopup.open()
|
||||
|
||||
onMembersButtonClicked: appSettings.expandUsersList = !appSettings.expandUsersList
|
||||
onMembersButtonClicked: localAccountSensitiveSettings.expandUsersList = !localAccountSensitiveSettings.expandUsersList
|
||||
onNotificationButtonClicked: activityCenter.open()
|
||||
|
||||
popupMenu: ChatContextMenuView {
|
||||
|
@ -575,8 +575,8 @@ Item {
|
|||
}
|
||||
|
||||
onMessageNotificationPushed: function(messageId, communityId, chatId, msg, contentType, chatType, timestamp, identicon, username, hasMention, isAddedContact, channelName) {
|
||||
if (appSettings.notificationSetting == Constants.notifyAllMessages ||
|
||||
(appSettings.notificationSetting == Constants.notifyJustMentions && hasMention)) {
|
||||
if (localAccountSensitiveSettings.notificationSetting == Constants.notifyAllMessages ||
|
||||
(localAccountSensitiveSettings.notificationSetting == Constants.notifyJustMentions && hasMention)) {
|
||||
if (chatId === root.rootStore.chatsModelInst.channelView.activeChannel.id && applicationWindow.active === true) {
|
||||
// Do not show the notif if we are in the channel already and the window is active and focused
|
||||
return
|
||||
|
@ -586,7 +586,7 @@ Item {
|
|||
root.currentNotificationCommunityId = null
|
||||
|
||||
let name;
|
||||
if (appSettings.notificationMessagePreviewSetting === Constants.notificationPreviewAnonymous) {
|
||||
if (localAccountSensitiveSettings.notificationMessagePreviewSetting === Constants.notificationPreviewAnonymous) {
|
||||
name = "Status"
|
||||
} else if (chatType === Constants.chatTypePublic) {
|
||||
name = chatId
|
||||
|
@ -595,7 +595,7 @@ Item {
|
|||
}
|
||||
|
||||
let message;
|
||||
if (appSettings.notificationMessagePreviewSetting > Constants.notificationPreviewNameOnly) {
|
||||
if (localAccountSensitiveSettings.notificationMessagePreviewSetting > Constants.notificationPreviewNameOnly) {
|
||||
switch(contentType){
|
||||
//% "Image"
|
||||
case Constants.imageType: message = qsTrId("image"); break
|
||||
|
@ -619,7 +619,7 @@ Item {
|
|||
communityId,
|
||||
chatId,
|
||||
messageId,
|
||||
appSettings.useOSNotifications)
|
||||
localAccountSensitiveSettings.useOSNotifications)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ StatusPopupMenu {
|
|||
|
||||
StatusMenuItem {
|
||||
text: qsTr("Download")
|
||||
enabled: appSettings.downloadChannelMessagesEnabled
|
||||
enabled: localAccountSensitiveSettings.downloadChannelMessagesEnabled
|
||||
icon.name: "download"
|
||||
onTriggered: downdloadDialog.open()
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ Item {
|
|||
ListView {
|
||||
id: chatLogView
|
||||
anchors.fill: parent
|
||||
spacing: appSettings.useCompactMode ? 0 : 4
|
||||
spacing: localAccountSensitiveSettings.useCompactMode ? 0 : 4
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
clip: true
|
||||
verticalLayoutDirection: ListView.BottomToTop
|
||||
|
@ -78,7 +78,7 @@ Item {
|
|||
item = messageListDelegate.items.get(i);
|
||||
if (item.model.messageId === msgId) {
|
||||
chatLogView.positionViewAtIndex(i, ListView.Beginning);
|
||||
if (appSettings.useCompactMode && isSearch) {
|
||||
if (localAccountSensitiveSettings.useCompactMode && isSearch) {
|
||||
chatLogView.itemAtIndex(i).startMessageFoundAnimation();
|
||||
}
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ Item {
|
|||
communityId,
|
||||
"",
|
||||
"",
|
||||
appSettings.useOSNotifications)
|
||||
localAccountSensitiveSettings.useOSNotifications)
|
||||
}
|
||||
|
||||
onMembershipRequestPushed: function (communityId, communityName, pubKey) {
|
||||
|
@ -244,7 +244,7 @@ Item {
|
|||
communityId,
|
||||
"",
|
||||
"",
|
||||
appSettings.useOSNotifications)
|
||||
localAccountSensitiveSettings.useOSNotifications)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Item {
|
|||
property var messageStore
|
||||
property bool longChatText: true
|
||||
property bool veryLongChatText: !!root.store ? root.store.chatsModelInst.plainText(message).length >
|
||||
(appSettings.useCompactMode ? Constants.limitLongChatTextCompactMode : Constants.limitLongChatText) : false
|
||||
(localAccountSensitiveSettings.useCompactMode ? Constants.limitLongChatTextCompactMode : Constants.limitLongChatText) : false
|
||||
property bool readMore: false
|
||||
property alias textField: chatText
|
||||
|
||||
|
@ -118,9 +118,9 @@ Item {
|
|||
} else {
|
||||
if(isEdited){
|
||||
let index = msg.endsWith("code>") ? msg.length : msg.length - 4
|
||||
return Utils.getMessageWithStyle(Emoji.parse(msg.slice(0, index) + Constants.editLabel + msg.slice(index)), appSettings.useCompactMode, isCurrentUser, hoveredLink)
|
||||
return Utils.getMessageWithStyle(Emoji.parse(msg.slice(0, index) + Constants.editLabel + msg.slice(index)), localAccountSensitiveSettings.useCompactMode, isCurrentUser, hoveredLink)
|
||||
}
|
||||
return Utils.getMessageWithStyle(Emoji.parse(msg), appSettings.useCompactMode, isCurrentUser, hoveredLink)
|
||||
return Utils.getMessageWithStyle(Emoji.parse(msg), localAccountSensitiveSettings.useCompactMode, isCurrentUser, hoveredLink)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ Item {
|
|||
|
||||
Loader {
|
||||
id: emptyViewAndSuggestionsLoader
|
||||
active: root.store.chatsModelInst.communities.activeCommunity.admin && !appSettings.hiddenCommunityWelcomeBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id)
|
||||
active: root.store.chatsModelInst.communities.activeCommunity.admin && !localAccountSensitiveSettings.hiddenCommunityWelcomeBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id)
|
||||
width: parent.width
|
||||
height: active ? item.height : 0
|
||||
anchors.top: communityChatListAndCategories.bottom
|
||||
|
@ -250,7 +250,7 @@ Item {
|
|||
|
||||
Loader {
|
||||
id: backUpBannerLoader
|
||||
active: root.store.chatsModelInst.communities.activeCommunity.admin && !appSettings.hiddenCommunityBackUpBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id)
|
||||
active: root.store.chatsModelInst.communities.activeCommunity.admin && !localAccountSensitiveSettings.hiddenCommunityBackUpBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id)
|
||||
width: parent.width
|
||||
height: active ? item.height : 0
|
||||
anchors.top: emptyViewAndSuggestionsLoader.bottom
|
||||
|
|
|
@ -353,7 +353,7 @@ Item {
|
|||
sourceText = sourceText.replace(new RegExp(key, 'g'), value)
|
||||
}
|
||||
sourceText = sourceText.replace(/\n/g, "<br />")
|
||||
sourceText = Utils.getMessageWithStyle(sourceText, appSettings.useCompactMode, isCurrentUser)
|
||||
sourceText = Utils.getMessageWithStyle(sourceText, localAccountSensitiveSettings.useCompactMode, isCurrentUser)
|
||||
}
|
||||
|
||||
sourceComponent: Item {
|
||||
|
@ -437,7 +437,7 @@ Item {
|
|||
readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + root.chatHorizontalPadding
|
||||
visible: {
|
||||
const urls = root.linkUrls.split(" ")
|
||||
if (urls.length === 1 && Utils.hasImageExtension(urls[0]) && appSettings.displayChatImages) {
|
||||
if (urls.length === 1 && Utils.hasImageExtension(urls[0]) && localAccountSensitiveSettings.displayChatImages) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ Item {
|
|||
text: qsTrId("communities")
|
||||
icon.name: "communities"
|
||||
onTriggered: openPopup(communitiesPopupComponent)
|
||||
enabled: appSettings.communitiesEnabled
|
||||
enabled: localAccountSensitiveSettings.communitiesEnabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ Item {
|
|||
|
||||
EmptyViewPanel {
|
||||
id: emptyViewAndSuggestions
|
||||
visible: !appSettings.hideChannelSuggestions
|
||||
visible: !localAccountSensitiveSettings.hideChannelSuggestions
|
||||
width: parent.width
|
||||
anchors.top: channelList.bottom
|
||||
anchors.topMargin: Style.current.padding
|
||||
|
|
|
@ -65,7 +65,7 @@ Item {
|
|||
//% "I understand"
|
||||
confirmButtonLabel: qsTrId("i-understand")
|
||||
onConfirmButtonClicked: {
|
||||
appSettings.communitiesEnabled = true
|
||||
localAccountSensitiveSettings.communitiesEnabled = true
|
||||
onConfirmed()
|
||||
close()
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
if (appSettings.communitiesEnabled) {
|
||||
if (localAccountSensitiveSettings.communitiesEnabled) {
|
||||
onBtnClick();
|
||||
} else {
|
||||
openPopup(confirmationPopupComponent, { onConfirmed: onBtnClick });
|
||||
|
|
|
@ -48,7 +48,7 @@ Column {
|
|||
active: true
|
||||
|
||||
Connections {
|
||||
target: appSettings
|
||||
target: localAccountSensitiveSettings
|
||||
onWhitelistedUnfurlingSitesChanged: {
|
||||
fetched = false
|
||||
linkMessageLoader.sourceComponent = undefined
|
||||
|
@ -125,7 +125,7 @@ Column {
|
|||
// for more information
|
||||
this.height = undefined
|
||||
if (Utils.hasImageExtension(link)) {
|
||||
if (appSettings.displayChatImages) {
|
||||
if (localAccountSensitiveSettings.displayChatImages) {
|
||||
linkData = {
|
||||
thumbnailUrl: link
|
||||
}
|
||||
|
@ -142,14 +142,14 @@ Column {
|
|||
|
||||
let linkWhiteListed = false
|
||||
const linkHostname = Utils.getHostname(link)
|
||||
const linkExists = Object.keys(appSettings.whitelistedUnfurlingSites).some(function(whitelistedHostname) {
|
||||
const linkExists = Object.keys(localAccountSensitiveSettings.whitelistedUnfurlingSites).some(function(whitelistedHostname) {
|
||||
const exists = linkHostname.endsWith(whitelistedHostname)
|
||||
if (exists) {
|
||||
linkWhiteListed = appSettings.whitelistedUnfurlingSites[whitelistedHostname] === true
|
||||
linkWhiteListed = localAccountSensitiveSettings.whitelistedUnfurlingSites[whitelistedHostname] === true
|
||||
}
|
||||
return exists
|
||||
})
|
||||
if (!linkWhiteListed && linkExists && !appSettings.neverAskAboutUnfurlingAgain) {
|
||||
if (!linkWhiteListed && linkExists && !localAccountSensitiveSettings.neverAskAboutUnfurlingAgain) {
|
||||
return enableLinkComponent
|
||||
}
|
||||
if (linkWhiteListed) {
|
||||
|
@ -176,7 +176,7 @@ Column {
|
|||
return root.store.chatsModelInst.getLinkPreviewData(link, root.uuid)
|
||||
}
|
||||
// setting the height to 0 allows the "enable link" dialog to
|
||||
// disappear correctly when appSettings.neverAskAboutUnfurlingAgain
|
||||
// disappear correctly when localAccountSensitiveSettings.neverAskAboutUnfurlingAgain
|
||||
// is true. The height is reset at the top of this method.
|
||||
this.height = 0
|
||||
return undefined
|
||||
|
@ -372,7 +372,7 @@ Column {
|
|||
//% "Don't ask me again"
|
||||
text: qsTrId("dont-ask")
|
||||
onClicked: {
|
||||
appSettings.neverAskAboutUnfurlingAgain = true
|
||||
localAccountSensitiveSettings.neverAskAboutUnfurlingAgain = true
|
||||
}
|
||||
width: parent.width
|
||||
anchors.top: sep2.bottom
|
||||
|
|
|
@ -332,7 +332,7 @@ StatusPopupMenu {
|
|||
//% "Delete message"
|
||||
text: qsTrId("delete-message")
|
||||
onTriggered: {
|
||||
if (!appSettings.showDeleteMessageWarning) {
|
||||
if (!localAccountSensitiveSettings.showDeleteMessageWarning) {
|
||||
return root.store.chatsModelInst.messageView.deleteMessage(messageId)
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ StatusPopupMenu {
|
|||
"checkbox.visible": true,
|
||||
executeConfirm: function () {
|
||||
if (confirmationDialog.checkbox.checked) {
|
||||
appSettings.showDeleteMessageWarning = false
|
||||
localAccountSensitiveSettings.showDeleteMessageWarning = false
|
||||
}
|
||||
|
||||
confirmationDialog.close()
|
||||
|
|
|
@ -243,7 +243,7 @@ Column {
|
|||
return gapComponent
|
||||
default:
|
||||
return isStatusUpdate ? statusUpdateComponent :
|
||||
(appSettings.useCompactMode ? compactMessageComponent : messageComponent)
|
||||
(localAccountSensitiveSettings.useCompactMode ? compactMessageComponent : messageComponent)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ Item {
|
|||
messageStore: root.store.messageStore
|
||||
textField.color: !root.isCurrentUser ? Style.current.textColor : Style.current.currentUserTextColor
|
||||
Connections {
|
||||
target: appSettings.useCompactMode ? null : chatBox
|
||||
target: localAccountSensitiveSettings.useCompactMode ? null : chatBox
|
||||
onLongChatTextChanged: {
|
||||
chatText.setWidths()
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ Page {
|
|||
anchors.top: btnExistingKey.bottom
|
||||
anchors.topMargin: Style.current.padding
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: isExperimental === "1" || appSettings.isKeycardEnabled
|
||||
visible: isExperimental === "1" || localAccountSensitiveSettings.isKeycardEnabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ ModalPopup {
|
|||
function populatePreviewableSites() {
|
||||
let whitelist = JSON.parse(profileModel.getLinkPreviewWhitelist())
|
||||
whitelist.forEach(entry => {
|
||||
entry.isWhitelisted = appSettings.whitelistedUnfurlingSites[entry.address] || false
|
||||
entry.isWhitelisted = localAccountSensitiveSettings.whitelistedUnfurlingSites[entry.address] || false
|
||||
previewableSites.append(entry)
|
||||
})
|
||||
}
|
||||
|
@ -172,13 +172,13 @@ ModalPopup {
|
|||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
onCheckedChanged: function () {
|
||||
if (appSettings.whitelistedUnfurlingSites[address] === this.checked) {
|
||||
if (localAccountSensitiveSettings.whitelistedUnfurlingSites[address] === this.checked) {
|
||||
return
|
||||
}
|
||||
|
||||
const settings = appSettings.whitelistedUnfurlingSites
|
||||
const settings = localAccountSensitiveSettings.whitelistedUnfurlingSites
|
||||
settings[address] = this.checked
|
||||
appSettings.whitelistedUnfurlingSites = settings
|
||||
localAccountSensitiveSettings.whitelistedUnfurlingSites = settings
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ ModalPopup {
|
|||
//% "None"
|
||||
title: qsTrId("none")
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerNone
|
||||
checked: localAccountSensitiveSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerNone
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerNone
|
||||
localAccountSensitiveSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerNone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,10 @@ ModalPopup {
|
|||
RadioButtonSelector {
|
||||
title: "etherscan.io"
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEtherscan
|
||||
checked: localAccountSensitiveSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEtherscan
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEtherscan
|
||||
localAccountSensitiveSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEtherscan
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,10 +55,10 @@ ModalPopup {
|
|||
RadioButtonSelector {
|
||||
title: "ethplorer.io"
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEthplorer
|
||||
checked: localAccountSensitiveSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEthplorer
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEthplorer
|
||||
localAccountSensitiveSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEthplorer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,10 +66,10 @@ ModalPopup {
|
|||
RadioButtonSelector {
|
||||
title: "blockchair.com"
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerBlockchair
|
||||
checked: localAccountSensitiveSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerBlockchair
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerBlockchair
|
||||
localAccountSensitiveSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerBlockchair
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,10 +35,10 @@ ModalPopup {
|
|||
//% "Default"
|
||||
title: qsTrId("default")
|
||||
buttonGroup: homepageGroup
|
||||
checked: appSettings.browserHomepage === ""
|
||||
checked: localAccountSensitiveSettings.browserHomepage === ""
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserHomepage = ""
|
||||
localAccountSensitiveSettings.browserHomepage = ""
|
||||
customUrl.visible = false
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ ModalPopup {
|
|||
//% "Custom..."
|
||||
title: qsTrId("custom---")
|
||||
buttonGroup: homepageGroup
|
||||
checked: appSettings.browserHomepage !== "" || customUrl.visible
|
||||
checked: localAccountSensitiveSettings.browserHomepage !== "" || customUrl.visible
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
customUrl.visible = true
|
||||
|
@ -58,13 +58,13 @@ ModalPopup {
|
|||
|
||||
Input {
|
||||
id: customUrl
|
||||
visible: appSettings.browserHomepage !== ""
|
||||
visible: localAccountSensitiveSettings.browserHomepage !== ""
|
||||
//% "Paste URL"
|
||||
placeholderText: qsTrId("paste-url")
|
||||
text: appSettings.browserHomepage
|
||||
text: localAccountSensitiveSettings.browserHomepage
|
||||
pasteFromClipboard: true
|
||||
textField.onTextChanged: {
|
||||
appSettings.browserHomepage = customUrl.text
|
||||
localAccountSensitiveSettings.browserHomepage = customUrl.text
|
||||
}
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
|
|
|
@ -34,10 +34,10 @@ ModalPopup {
|
|||
RadioButtonSelector {
|
||||
title: "Status"
|
||||
buttonGroup: openLinksWithGroup
|
||||
checked: appSettings.openLinksInStatus
|
||||
checked: localAccountSensitiveSettings.openLinksInStatus
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.openLinksInStatus = true
|
||||
localAccountSensitiveSettings.openLinksInStatus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,10 +45,10 @@ ModalPopup {
|
|||
//% "My default browser"
|
||||
title: qsTrId("my-default-browser")
|
||||
buttonGroup: openLinksWithGroup
|
||||
checked: !appSettings.openLinksInStatus
|
||||
checked: !localAccountSensitiveSettings.openLinksInStatus
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.openLinksInStatus = false
|
||||
localAccountSensitiveSettings.openLinksInStatus = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,10 +32,10 @@ ModalPopup {
|
|||
//% "None"
|
||||
title: qsTrId("none")
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineNone
|
||||
checked: localAccountSensitiveSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineNone
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineNone
|
||||
localAccountSensitiveSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineNone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,10 +43,10 @@ ModalPopup {
|
|||
RadioButtonSelector {
|
||||
title: "Google"
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineGoogle
|
||||
checked: localAccountSensitiveSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineGoogle
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineGoogle
|
||||
localAccountSensitiveSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineGoogle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,10 +54,10 @@ ModalPopup {
|
|||
RadioButtonSelector {
|
||||
title: "Yahoo!"
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineYahoo
|
||||
checked: localAccountSensitiveSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineYahoo
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineYahoo
|
||||
localAccountSensitiveSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineYahoo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,10 +65,10 @@ ModalPopup {
|
|||
RadioButtonSelector {
|
||||
title: "DuckDuckGo"
|
||||
buttonGroup: searchEnginGroup
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineDuckDuckGo
|
||||
checked: localAccountSensitiveSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineDuckDuckGo
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineDuckDuckGo
|
||||
localAccountSensitiveSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineDuckDuckGo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ QtObject {
|
|||
property int about_id: 13
|
||||
property int signout_id: 14
|
||||
|
||||
property bool browserMenuItemEnabled: appSettings.isBrowserEnabled
|
||||
property bool browserMenuItemEnabled: localAccountSensitiveSettings.isBrowserEnabled
|
||||
property int selectedMenuItem: 0
|
||||
|
||||
property ListModel mainMenuItems: ListModel {
|
||||
|
|
|
@ -57,9 +57,9 @@ ScrollView {
|
|||
//% "Minimize on close"
|
||||
text: qsTrId("minimize-on-close")
|
||||
isSwitch: true
|
||||
switchChecked: !appSettings.quitOnClose
|
||||
switchChecked: !localAccountSensitiveSettings.quitOnClose
|
||||
onClicked: function (checked) {
|
||||
appSettings.quitOnClose = !checked
|
||||
localAccountSensitiveSettings.quitOnClose = !checked
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,13 +109,13 @@ ScrollView {
|
|||
//% "Wallet"
|
||||
text: qsTrId("wallet")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.isWalletEnabled
|
||||
switchChecked: localAccountSensitiveSettings.isWalletEnabled
|
||||
onClicked: {
|
||||
if (!appSettings.isWalletEnabled) {
|
||||
if (!localAccountSensitiveSettings.isWalletEnabled) {
|
||||
confirmationPopup.settingsProp = "isWalletEnabled"
|
||||
confirmationPopup.open()
|
||||
} else {
|
||||
appSettings.isWalletEnabled = false
|
||||
localAccountSensitiveSettings.isWalletEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -124,13 +124,13 @@ ScrollView {
|
|||
StatusSettingsLineButton {
|
||||
text: qsTr("Wallet v2 - do not use, under active development")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.isWalletV2Enabled
|
||||
switchChecked: localAccountSensitiveSettings.isWalletV2Enabled
|
||||
onClicked: {
|
||||
if (!appSettings.isWalletV2Enabled) {
|
||||
if (!localAccountSensitiveSettings.isWalletV2Enabled) {
|
||||
confirmationPopup.settingsProp = "isWalletV2Enabled"
|
||||
confirmationPopup.open()
|
||||
} else {
|
||||
appSettings.isWalletV2Enabled = false
|
||||
localAccountSensitiveSettings.isWalletV2Enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -140,13 +140,13 @@ ScrollView {
|
|||
//% "Dapp Browser"
|
||||
text: qsTrId("dapp-browser")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.isBrowserEnabled
|
||||
switchChecked: localAccountSensitiveSettings.isBrowserEnabled
|
||||
onClicked: {
|
||||
if (!appSettings.isBrowserEnabled) {
|
||||
if (!localAccountSensitiveSettings.isBrowserEnabled) {
|
||||
confirmationPopup.settingsProp = "isBrowserEnabled"
|
||||
confirmationPopup.open()
|
||||
} else {
|
||||
appSettings.isBrowserEnabled = false
|
||||
localAccountSensitiveSettings.isBrowserEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,13 +156,13 @@ ScrollView {
|
|||
//% "Communities"
|
||||
text: qsTrId("communities")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.communitiesEnabled
|
||||
switchChecked: localAccountSensitiveSettings.communitiesEnabled
|
||||
onClicked: {
|
||||
if (!appSettings.communitiesEnabled) {
|
||||
if (!localAccountSensitiveSettings.communitiesEnabled) {
|
||||
confirmationPopup.settingsProp = "communitiesEnabled"
|
||||
confirmationPopup.open()
|
||||
} else {
|
||||
appSettings.communitiesEnabled = false
|
||||
localAccountSensitiveSettings.communitiesEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,13 +172,13 @@ ScrollView {
|
|||
//% "Activity Center"
|
||||
text: qsTrId("activity-center")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.isActivityCenterEnabled
|
||||
switchChecked: localAccountSensitiveSettings.isActivityCenterEnabled
|
||||
onClicked: {
|
||||
if (!appSettings.isActivityCenterEnabled) {
|
||||
if (!localAccountSensitiveSettings.isActivityCenterEnabled) {
|
||||
confirmationPopup.settingsProp = "isActivityCenterEnabled"
|
||||
confirmationPopup.open()
|
||||
} else {
|
||||
appSettings.isActivityCenterEnabled = false
|
||||
localAccountSensitiveSettings.isActivityCenterEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -188,13 +188,13 @@ ScrollView {
|
|||
//% "Node Management"
|
||||
text: qsTrId("node-management")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.nodeManagementEnabled
|
||||
switchChecked: localAccountSensitiveSettings.nodeManagementEnabled
|
||||
onClicked: {
|
||||
if (!appSettings.nodeManagementEnabled) {
|
||||
if (!localAccountSensitiveSettings.nodeManagementEnabled) {
|
||||
confirmationPopup.settingsProp = "nodeManagementEnabled"
|
||||
confirmationPopup.open()
|
||||
} else {
|
||||
appSettings.nodeManagementEnabled = false
|
||||
localAccountSensitiveSettings.nodeManagementEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -205,9 +205,9 @@ ScrollView {
|
|||
//% "Online users"
|
||||
text: qsTrId("online-users")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.showOnlineUsers
|
||||
switchChecked: localAccountSensitiveSettings.showOnlineUsers
|
||||
onClicked: {
|
||||
appSettings.showOnlineUsers = !appSettings.showOnlineUsers
|
||||
localAccountSensitiveSettings.showOnlineUsers = !localAccountSensitiveSettings.showOnlineUsers
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,9 +216,9 @@ ScrollView {
|
|||
//% "GIF Widget"
|
||||
text: qsTrId("gif-widget")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.isGifWidgetEnabled
|
||||
switchChecked: localAccountSensitiveSettings.isGifWidgetEnabled
|
||||
onClicked: {
|
||||
appSettings.isGifWidgetEnabled = !appSettings.isGifWidgetEnabled
|
||||
localAccountSensitiveSettings.isGifWidgetEnabled = !localAccountSensitiveSettings.isGifWidgetEnabled
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,9 +227,9 @@ ScrollView {
|
|||
//% "Keycard"
|
||||
text: qsTr("Keycard")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.isKeycardEnabled
|
||||
switchChecked: localAccountSensitiveSettings.isKeycardEnabled
|
||||
onClicked: {
|
||||
appSettings.isKeycardEnabled = !appSettings.isKeycardEnabled
|
||||
localAccountSensitiveSettings.isKeycardEnabled = !localAccountSensitiveSettings.isKeycardEnabled
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -390,9 +390,9 @@ ScrollView {
|
|||
StatusSettingsLineButton {
|
||||
text: qsTr("Download messages")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.downloadChannelMessagesEnabled
|
||||
switchChecked: localAccountSensitiveSettings.downloadChannelMessagesEnabled
|
||||
onClicked: {
|
||||
appSettings.downloadChannelMessagesEnabled = !appSettings.downloadChannelMessagesEnabled
|
||||
localAccountSensitiveSettings.downloadChannelMessagesEnabled = !localAccountSensitiveSettings.downloadChannelMessagesEnabled
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -401,9 +401,9 @@ ScrollView {
|
|||
text: qsTr("Stickers/ENS on ropsten")
|
||||
visible: root.store.currentNetwork === Constants.networkRopsten
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.stickersEnsRopsten
|
||||
switchChecked: localAccountSensitiveSettings.stickersEnsRopsten
|
||||
onClicked: {
|
||||
appSettings.stickersEnsRopsten = !appSettings.stickersEnsRopsten
|
||||
localAccountSensitiveSettings.stickersEnsRopsten = !localAccountSensitiveSettings.stickersEnsRopsten
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ ScrollView {
|
|||
//% "I understand"
|
||||
confirmButtonLabel: qsTrId("i-understand")
|
||||
onConfirmButtonClicked: {
|
||||
appSettings[settingsProp] = true
|
||||
localAccountSensitiveSettings[settingsProp] = true
|
||||
settingsProp = ""
|
||||
close()
|
||||
}
|
||||
|
|
|
@ -130,9 +130,9 @@ ScrollView {
|
|||
from: 0
|
||||
to: 5
|
||||
stepSize: 1
|
||||
value: appSettings.fontSize
|
||||
value: localAccountSensitiveSettings.fontSize
|
||||
onValueChanged: {
|
||||
appSettings.fontSize = value
|
||||
localAccountSensitiveSettings.fontSize = value
|
||||
root.updateFontSize(value)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ Item {
|
|||
//% "Homepage"
|
||||
text: qsTrId("homepage")
|
||||
//% "Default"
|
||||
currentValue: appSettings.browserHomepage === "" ? qsTrId("default") : appSettings.browserHomepage
|
||||
currentValue: localAccountSensitiveSettings.browserHomepage === "" ? qsTrId("default") : localAccountSensitiveSettings.browserHomepage
|
||||
onClicked: homePagePopup.createObject(root).open()
|
||||
}
|
||||
|
||||
|
@ -61,9 +61,9 @@ Item {
|
|||
//% "Show favorites bar"
|
||||
text: qsTrId("show-favorites-bar")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.shouldShowFavoritesBar
|
||||
switchChecked: localAccountSensitiveSettings.shouldShowFavoritesBar
|
||||
onClicked: function (checked) {
|
||||
appSettings.shouldShowFavoritesBar = checked
|
||||
localAccountSensitiveSettings.shouldShowFavoritesBar = checked
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ Item {
|
|||
//% "Search engine used in the address bar"
|
||||
text: qsTrId("search-engine-used-in-the-address-bar")
|
||||
currentValue: {
|
||||
switch (appSettings.shouldShowBrowserSearchEngine) {
|
||||
switch (localAccountSensitiveSettings.shouldShowBrowserSearchEngine) {
|
||||
case Constants.browserSearchEngineGoogle: return "Google"
|
||||
case Constants.browserSearchEngineYahoo: return "Yahoo!"
|
||||
case Constants.browserSearchEngineDuckDuckGo: return "DuckDuckGo"
|
||||
|
@ -90,7 +90,7 @@ Item {
|
|||
//% "Ethereum explorer used in the address bar"
|
||||
text: qsTrId("ethereum-explorer-used-in-the-address-bar")
|
||||
currentValue: {
|
||||
switch (appSettings.useBrowserEthereumExplorer) {
|
||||
switch (localAccountSensitiveSettings.useBrowserEthereumExplorer) {
|
||||
case Constants.browserEthereumExplorerEtherscan: return "etherscan.io"
|
||||
case Constants.browserEthereumExplorerEthplorer: return "ethplorer.io"
|
||||
case Constants.browserEthereumExplorerBlockchair: return "blockchair.com"
|
||||
|
|
|
@ -365,7 +365,7 @@ Item {
|
|||
//% "Register"
|
||||
qsTrId("ens-register")
|
||||
enabled: parseFloat(root.store.getSntBalance()) >= 10 && termsAndConditionsCheckbox.checked
|
||||
onClicked: appSettings.isWalletEnabled ? transactionDialog.open() : confirmationPopup.open()
|
||||
onClicked: localAccountSensitiveSettings.isWalletEnabled ? transactionDialog.open() : confirmationPopup.open()
|
||||
}
|
||||
|
||||
ConfirmationDialog {
|
||||
|
@ -374,7 +374,7 @@ Item {
|
|||
confirmationText: qsTr("This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk.")
|
||||
confirmButtonLabel: qsTr("I understand")
|
||||
onConfirmButtonClicked: {
|
||||
appSettings.isWalletEnabled = true
|
||||
localAccountSensitiveSettings.isWalletEnabled = true
|
||||
close()
|
||||
transactionDialog.open()
|
||||
}
|
||||
|
|
|
@ -66,10 +66,10 @@ ScrollView {
|
|||
//% "All messages"
|
||||
title: qsTrId("all-messages")
|
||||
buttonGroup: notificationSetting
|
||||
checked: appSettings.notificationSetting === Constants.notifyAllMessages
|
||||
checked: localAccountSensitiveSettings.notificationSetting === Constants.notifyAllMessages
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.notificationSetting = Constants.notifyAllMessages
|
||||
localAccountSensitiveSettings.notificationSetting = Constants.notifyAllMessages
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,10 +78,10 @@ ScrollView {
|
|||
//% "Just @mentions"
|
||||
title: qsTrId("just--mentions")
|
||||
buttonGroup: notificationSetting
|
||||
checked: appSettings.notificationSetting === Constants.notifyJustMentions
|
||||
checked: localAccountSensitiveSettings.notificationSetting === Constants.notifyJustMentions
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.notificationSetting = Constants.notifyJustMentions
|
||||
localAccountSensitiveSettings.notificationSetting = Constants.notifyJustMentions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,10 +90,10 @@ ScrollView {
|
|||
//% "Nothing"
|
||||
title: qsTrId("nothing")
|
||||
buttonGroup: notificationSetting
|
||||
checked: appSettings.notificationSetting === Constants.notifyNone
|
||||
checked: localAccountSensitiveSettings.notificationSetting === Constants.notifyNone
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.notificationSetting = Constants.notifyNone
|
||||
localAccountSensitiveSettings.notificationSetting = Constants.notifyNone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,9 +131,9 @@ ScrollView {
|
|||
//% "Play a sound when receiving a notification"
|
||||
text: qsTrId("play-a-sound-when-receiving-a-notification")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.notificationSoundsEnabled
|
||||
switchChecked: localAccountSensitiveSettings.notificationSoundsEnabled
|
||||
onClicked: {
|
||||
appSettings.notificationSoundsEnabled = checked
|
||||
localAccountSensitiveSettings.notificationSoundsEnabled = checked
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,9 +142,9 @@ ScrollView {
|
|||
//% "Use your operating system's notifications"
|
||||
text: qsTrId("use-your-operating-system-s-notifications")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.useOSNotifications
|
||||
switchChecked: localAccountSensitiveSettings.useOSNotifications
|
||||
onClicked: {
|
||||
appSettings.useOSNotifications = checked
|
||||
localAccountSensitiveSettings.useOSNotifications = checked
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -192,10 +192,10 @@ ScrollView {
|
|||
//% "You have a new message"
|
||||
notificationMessage: qsTrId("you-have-a-new-message")
|
||||
buttonGroup: messageSetting
|
||||
checked: appSettings.notificationMessagePreviewSetting === Constants.notificationPreviewAnonymous
|
||||
checked: localAccountSensitiveSettings.notificationMessagePreviewSetting === Constants.notificationPreviewAnonymous
|
||||
onRadioCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.notificationMessagePreviewSetting = Constants.notificationPreviewAnonymous
|
||||
localAccountSensitiveSettings.notificationMessagePreviewSetting = Constants.notificationPreviewAnonymous
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -207,10 +207,10 @@ ScrollView {
|
|||
//% "You have a new message"
|
||||
notificationMessage: qsTrId("you-have-a-new-message")
|
||||
buttonGroup: messageSetting
|
||||
checked: appSettings.notificationMessagePreviewSetting === Constants.notificationPreviewNameOnly
|
||||
checked: localAccountSensitiveSettings.notificationMessagePreviewSetting === Constants.notificationPreviewNameOnly
|
||||
onRadioCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.notificationMessagePreviewSetting = Constants.notificationPreviewNameOnly
|
||||
localAccountSensitiveSettings.notificationMessagePreviewSetting = Constants.notificationPreviewNameOnly
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -222,10 +222,10 @@ ScrollView {
|
|||
//% "Hi there! Yes, no problem, let me know if I can help."
|
||||
notificationMessage: qsTrId("hi-there--yes--no-problem--let-me-know-if-i-can-help-")
|
||||
buttonGroup: messageSetting
|
||||
checked: appSettings.notificationMessagePreviewSetting === Constants.notificationPreviewNameAndMessage
|
||||
checked: localAccountSensitiveSettings.notificationMessagePreviewSetting === Constants.notificationPreviewNameAndMessage
|
||||
onRadioCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.notificationMessagePreviewSetting = Constants.notificationPreviewNameAndMessage
|
||||
localAccountSensitiveSettings.notificationMessagePreviewSetting = Constants.notificationPreviewNameAndMessage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -271,9 +271,9 @@ ScrollView {
|
|||
//% "Notify on new requests"
|
||||
text: qsTrId("notify-on-new-requests")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.notifyOnNewRequests
|
||||
switchChecked: localAccountSensitiveSettings.notifyOnNewRequests
|
||||
onClicked: {
|
||||
appSettings.notifyOnNewRequests = checked
|
||||
localAccountSensitiveSettings.notifyOnNewRequests = checked
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -364,10 +364,10 @@ ScrollView {
|
|||
parent.font.underline = false
|
||||
}
|
||||
onClicked: {
|
||||
appSettings.notificationSetting = Constants.notifyAllMessages
|
||||
appSettings.notificationSoundsEnabled = true
|
||||
appSettings.notificationMessagePreviewSetting = Constants.notificationPreviewNameAndMessage
|
||||
appSettings.allowNotificationsFromNonContacts = false
|
||||
localAccountSensitiveSettings.notificationSetting = Constants.notifyAllMessages
|
||||
localAccountSensitiveSettings.notificationSoundsEnabled = true
|
||||
localAccountSensitiveSettings.notificationMessagePreviewSetting = Constants.notificationPreviewNameAndMessage
|
||||
localAccountSensitiveSettings.allowNotificationsFromNonContacts = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,11 +164,11 @@ Item {
|
|||
components: [
|
||||
StatusQControls.StatusSwitch {
|
||||
id: switch1
|
||||
checked: !appSettings.onlyShowContactsProfilePics
|
||||
checked: !localAccountSensitiveSettings.onlyShowContactsProfilePics
|
||||
}
|
||||
]
|
||||
sensor.onClicked: {
|
||||
switch1.checked = appSettings.onlyShowContactsProfilePics = !switch1.checked
|
||||
switch1.checked = localAccountSensitiveSettings.onlyShowContactsProfilePics = !switch1.checked
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,11 +183,11 @@ Item {
|
|||
components: [
|
||||
StatusQControls.StatusSwitch {
|
||||
id: switch2
|
||||
checked: appSettings.displayChatImages
|
||||
checked: localAccountSensitiveSettings.displayChatImages
|
||||
}
|
||||
]
|
||||
sensor.onClicked: {
|
||||
switch2.checked = appSettings.displayChatImages = !switch2.checked
|
||||
switch2.checked = localAccountSensitiveSettings.displayChatImages = !switch2.checked
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ Item {
|
|||
title: qsTrId("open-links-with---")
|
||||
implicitHeight: 52
|
||||
//% "My default browser"
|
||||
label: appSettings.openLinksInStatus ? "Status" : qsTrId("my-default-browser")
|
||||
label: localAccountSensitiveSettings.openLinksInStatus ? "Status" : qsTrId("my-default-browser")
|
||||
components: [
|
||||
StatusIcon {
|
||||
icon: "chevron-down"
|
||||
|
|
|
@ -37,10 +37,10 @@ Item {
|
|||
anchors.leftMargin: 24
|
||||
from: 0.0
|
||||
to: 1.0
|
||||
value: appSettings.volume
|
||||
value: localAccountSensitiveSettings.volume
|
||||
stepSize: 0.1
|
||||
onValueChanged: {
|
||||
appSettings.volume = volume.value
|
||||
localAccountSensitiveSettings.volume = volume.value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ Item {
|
|||
property bool hideSignPhraseModal: false
|
||||
|
||||
function showSigningPhrasePopup(){
|
||||
if(!hideSignPhraseModal && !appSettings.hideSignPhraseModal){
|
||||
if(!hideSignPhraseModal && !localAccountSensitiveSettings.hideSignPhraseModal){
|
||||
signPhrasePopup.open();
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ Item {
|
|||
SignPhraseModal {
|
||||
id: signPhrasePopup
|
||||
onRemindLaterClicked: hideSignPhraseModal = true
|
||||
onAcceptClicked: appSettings.hideSignPhraseModal = true
|
||||
onAcceptClicked: localAccountSensitiveSettings.hideSignPhraseModal = true
|
||||
}
|
||||
|
||||
SeedPhraseBackupWarning {
|
||||
|
|
|
@ -26,7 +26,7 @@ Item {
|
|||
|
||||
function showSigningPhrasePopup() {
|
||||
//TODO improve this to not use dynamic scoping
|
||||
if(!hideSignPhraseModal && !appSettings.hideSignPhraseModal){
|
||||
if(!hideSignPhraseModal && !localAccountSensitiveSettings.hideSignPhraseModal){
|
||||
signPhrasePopup.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ StatusModal {
|
|||
text: qsTrId("ens-got-it")
|
||||
onClicked: {
|
||||
//TOOD improve this to not use dynamic scoping
|
||||
appSettings.hideSignPhraseModal = true;
|
||||
localAccountSensitiveSettings.hideSignPhraseModal = true;
|
||||
close();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -35,13 +35,14 @@ Item {
|
|||
property alias appLayout: appLayout
|
||||
property var newVersionJSON: JSON.parse(utilsModel.newVersion)
|
||||
property bool profilePopupOpened: false
|
||||
property bool networkGuarded: profileModel.network.current === Constants.networkMainnet || (profileModel.network.current === Constants.networkRopsten && appSettings.stickersEnsRopsten)
|
||||
property bool networkGuarded: profileModel.network.current === Constants.networkMainnet || (profileModel.network.current === Constants.networkRopsten && localAccountSensitiveSettings.stickersEnsRopsten)
|
||||
property RootStore rootStore: RootStore { }
|
||||
|
||||
signal settingsLoaded()
|
||||
signal openContactsPopup()
|
||||
|
||||
function changeAppSection(section) {
|
||||
appSettings.lastModeActiveCommunity = ""
|
||||
localAccountSensitiveSettings.lastModeActiveCommunity = ""
|
||||
chatsModel.communities.activeCommunity.active = false
|
||||
appView.currentIndex = Utils.getAppSectionIndex(section)
|
||||
}
|
||||
|
@ -56,7 +57,7 @@ Item {
|
|||
return
|
||||
}
|
||||
|
||||
if (appSettings.onlyShowContactsProfilePics) {
|
||||
if (localAccountSensitiveSettings.onlyShowContactsProfilePics) {
|
||||
const isContact = profileModel.contacts.list.rowData(index, "isContact")
|
||||
if (isContact === "false") {
|
||||
return
|
||||
|
@ -113,10 +114,10 @@ Item {
|
|||
}
|
||||
|
||||
function openLink(link) {
|
||||
if (appSettings.showBrowserSelector) {
|
||||
if (localAccountSensitiveSettings.showBrowserSelector) {
|
||||
appMain.openPopup(chooseBrowserPopupComponent, {link: link})
|
||||
} else {
|
||||
if (appSettings.openLinksInStatus) {
|
||||
if (localAccountSensitiveSettings.openLinksInStatus) {
|
||||
appMain.changeAppSection(Constants.browser)
|
||||
browserLayoutContainer.item.openUrlInNewTab(link)
|
||||
} else {
|
||||
|
@ -213,12 +214,12 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
navBarCommunityTabButtons.model: appSettings.communitiesEnabled && mainModule.sectionsModel
|
||||
navBarCommunityTabButtons.model: localAccountSensitiveSettings.communitiesEnabled && mainModule.sectionsModel
|
||||
navBarCommunityTabButtons.delegate: StatusNavBarTabButton {
|
||||
onClicked: {
|
||||
appMain.changeAppSection(Constants.chat)
|
||||
chatsModel.communities.setActiveCommunity(model.id)
|
||||
appSettings.lastModeActiveCommunity = model.id
|
||||
localAccountSensitiveSettings.lastModeActiveCommunity = model.id
|
||||
}
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
@ -291,7 +292,7 @@ Item {
|
|||
//% "Wallet"
|
||||
tooltip.text: qsTrId("wallet")
|
||||
visible: enabled
|
||||
enabled: isExperimental === "1" || appSettings.isWalletEnabled
|
||||
enabled: isExperimental === "1" || localAccountSensitiveSettings.isWalletEnabled
|
||||
checked: appView.currentIndex == Utils.getAppSectionIndex(Constants.wallet)
|
||||
onClicked: appMain.changeAppSection(Constants.wallet)
|
||||
},
|
||||
|
@ -301,13 +302,13 @@ Item {
|
|||
icon.name: "cancel"
|
||||
tooltip.text: qsTr("Wallet v2 - do not use, under active development")
|
||||
visible: enabled
|
||||
enabled: isExperimental === "1" || appSettings.isWalletV2Enabled
|
||||
enabled: isExperimental === "1" || localAccountSensitiveSettings.isWalletV2Enabled
|
||||
checked: appView.currentIndex == Utils.getAppSectionIndex(Constants.walletv2)
|
||||
onClicked: appMain.changeAppSection(Constants.walletv2)
|
||||
},
|
||||
|
||||
StatusNavBarTabButton {
|
||||
enabled: isExperimental === "1" || appSettings.isBrowserEnabled
|
||||
enabled: isExperimental === "1" || localAccountSensitiveSettings.isBrowserEnabled
|
||||
visible: enabled
|
||||
//% "Browser"
|
||||
tooltip.text: qsTrId("browser")
|
||||
|
@ -317,7 +318,7 @@ Item {
|
|||
},
|
||||
|
||||
StatusNavBarTabButton {
|
||||
enabled: isExperimental === "1" || appSettings.timelineEnabled
|
||||
enabled: isExperimental === "1" || localAccountSensitiveSettings.timelineEnabled
|
||||
visible: enabled
|
||||
//% "Timeline"
|
||||
tooltip.text: qsTrId("timeline")
|
||||
|
@ -327,7 +328,7 @@ Item {
|
|||
},
|
||||
|
||||
StatusNavBarTabButton {
|
||||
enabled: isExperimental === "1" || appSettings.nodeManagementEnabled
|
||||
enabled: isExperimental === "1" || localAccountSensitiveSettings.nodeManagementEnabled
|
||||
visible: enabled
|
||||
tooltip.text: qsTr("Node Management")
|
||||
icon.name: "node"
|
||||
|
@ -414,7 +415,7 @@ Item {
|
|||
if(obj === walletV2LayoutContainer){
|
||||
walletV2LayoutContainer.showSigningPhrasePopup();
|
||||
}
|
||||
appSettings.lastModeActiveTab = (currentIndex === Utils.getAppSectionIndex(Constants.timeline)) ? 0 : currentIndex
|
||||
localAccountSensitiveSettings.lastModeActiveTab = (currentIndex === Utils.getAppSectionIndex(Constants.timeline)) ? 0 : currentIndex
|
||||
}
|
||||
|
||||
ChatLayout {
|
||||
|
@ -513,8 +514,8 @@ Item {
|
|||
// Prior to this change, most likely many users are still using the
|
||||
// normal mode configuration, so we have to enforce compact mode for
|
||||
// those.
|
||||
if (!appSettings.useCompactMode) {
|
||||
appSettings.useCompactMode = true
|
||||
if (!localAccountSensitiveSettings.useCompactMode) {
|
||||
localAccountSensitiveSettings.useCompactMode = true
|
||||
}
|
||||
|
||||
const whitelist = profileModel.getLinkPreviewWhitelist()
|
||||
|
@ -525,7 +526,7 @@ Item {
|
|||
// Add Status links to whitelist
|
||||
whiteListedSites.push({title: "Status", address: Constants.deepLinkPrefix, imageSite: false})
|
||||
whiteListedSites.push({title: "Status", address: Constants.joinStatusLink, imageSite: false})
|
||||
const settings = appSettings.whitelistedUnfurlingSites
|
||||
const settings = localAccountSensitiveSettings.whitelistedUnfurlingSites
|
||||
|
||||
// Set Status links as true. We intercept thoseURLs so it is privacy-safe
|
||||
if (!settings[Constants.deepLinkPrefix] || !settings[Constants.joinStatusLink]) {
|
||||
|
@ -553,7 +554,7 @@ Item {
|
|||
}
|
||||
})
|
||||
if (settingsUpdated) {
|
||||
appSettings.whitelistedUnfurlingSites = settings
|
||||
localAccountSensitiveSettings.whitelistedUnfurlingSites = settings
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Could not parse the whitelist for sites', e)
|
||||
|
@ -599,7 +600,7 @@ Item {
|
|||
Connections {
|
||||
target: profileModel.contacts
|
||||
onContactRequestAdded: {
|
||||
if (!appSettings.notifyOnNewRequests) {
|
||||
if (!localAccountSensitiveSettings.notifyOnNewRequests) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -619,7 +620,7 @@ Item {
|
|||
qsTrId("-1-requests-to-become-contacts").arg(Utils.removeStatusEns(name)),
|
||||
isContact? Constants.osNotificationType.acceptedContactRequest :
|
||||
Constants.osNotificationType.newContactRequest,
|
||||
appSettings.useOSNotifications)
|
||||
localAccountSensitiveSettings.useOSNotifications)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -788,9 +789,9 @@ Item {
|
|||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
appView.currentIndex = appSettings.lastModeActiveTab
|
||||
if(!!appSettings.lastModeActiveCommunity)
|
||||
chatsModel.communities.setActiveCommunity(appSettings.lastModeActiveCommunity)
|
||||
appView.currentIndex = localAccountSensitiveSettings.lastModeActiveTab
|
||||
if(!!localAccountSensitiveSettings.lastModeActiveCommunity)
|
||||
chatsModel.communities.setActiveCommunity(localAccountSensitiveSettings.lastModeActiveCommunity)
|
||||
}
|
||||
}
|
||||
/*##^##
|
||||
|
|
|
@ -47,7 +47,7 @@ Popup {
|
|||
text: qsTrId("send-transaction")
|
||||
icon.color: Style.current.purple
|
||||
icon.name: "send"
|
||||
onClicked: appSettings.isWalletEnabled ? root.sendTransactionCommandButtonClicked() : confirmationPopup.open()
|
||||
onClicked: localAccountSensitiveSettings.isWalletEnabled ? root.sendTransactionCommandButtonClicked() : confirmationPopup.open()
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ Popup {
|
|||
icon.color: Style.current.orange
|
||||
icon.name: "send"
|
||||
icon.rotation: 180
|
||||
onClicked: appSettings.isWalletEnabled ? root.receiveTransactionCommandButtonClicked() : confirmationPopup.open()
|
||||
onClicked: localAccountSensitiveSettings.isWalletEnabled ? root.receiveTransactionCommandButtonClicked() : confirmationPopup.open()
|
||||
}
|
||||
|
||||
ConfirmationDialog {
|
||||
|
@ -66,7 +66,7 @@ Popup {
|
|||
confirmationText: qsTr("This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk.")
|
||||
confirmButtonLabel: qsTr("I understand")
|
||||
onConfirmButtonClicked: {
|
||||
appSettings.isWalletEnabled = true
|
||||
localAccountSensitiveSettings.isWalletEnabled = true
|
||||
close()
|
||||
root.sendTransactionCommandButtonClicked()
|
||||
}
|
||||
|
|
|
@ -1112,7 +1112,7 @@ Rectangle {
|
|||
anchors.right: emojiBtn.left
|
||||
anchors.rightMargin: 2
|
||||
anchors.bottom: parent.bottom
|
||||
visible: !isEdit && appSettings.isGifWidgetEnabled
|
||||
visible: !isEdit && localAccountSensitiveSettings.isGifWidgetEnabled
|
||||
icon.name: "gif"
|
||||
type: StatusQ.StatusFlatRoundButton.Type.Tertiary
|
||||
color: "transparent"
|
||||
|
|
|
@ -59,7 +59,7 @@ Rectangle {
|
|||
|
||||
StyledText {
|
||||
id: replyText
|
||||
text: Utils.getMessageWithStyle(Utils.linkifyAndXSS(Emoji.parse(message)), appSettings.useCompactMode, false)
|
||||
text: Utils.getMessageWithStyle(Utils.linkifyAndXSS(Emoji.parse(message)), localAccountSensitiveSettings.useCompactMode, false)
|
||||
anchors.fill: parent
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: 13
|
||||
|
|
|
@ -60,7 +60,7 @@ Popup {
|
|||
const encodedIcon = String.fromCodePoint(...codePointParts);
|
||||
|
||||
// Add at the start of the list
|
||||
let recentEmojis = appSettings.recentEmojis
|
||||
let recentEmojis = localAccountSensitiveSettings.recentEmojis
|
||||
recentEmojis.unshift(emoji)
|
||||
// Remove duplicates
|
||||
recentEmojis = recentEmojis.filter(function (e, index) {
|
||||
|
@ -73,7 +73,7 @@ Popup {
|
|||
recentEmojis.splice(MAX_EMOJI_NUMBER - 1)
|
||||
}
|
||||
emojiSectionsRepeater.itemAt(0).allEmojis = recentEmojis
|
||||
appSettings.recentEmojis = recentEmojis
|
||||
localAccountSensitiveSettings.recentEmojis = recentEmojis
|
||||
|
||||
popup.emojiSelected(Emoji.parse(encodedIcon) + ' ', true) // Adding a space because otherwise, some emojis would fuse since emoji is just a string
|
||||
popup.close()
|
||||
|
@ -158,8 +158,8 @@ Popup {
|
|||
]
|
||||
|
||||
|
||||
if (appSettings.skinColor !== "") {
|
||||
if (emoji.unicode.includes(appSettings.skinColor)) {
|
||||
if (localAccountSensitiveSettings.skinColor !== "") {
|
||||
if (emoji.unicode.includes(localAccountSensitiveSettings.skinColor)) {
|
||||
newCategories[categoryNames[emoji.category]].push(Object.assign({}, emoji, {filename: emoji.unicode}));
|
||||
} else {
|
||||
if (!emojisWithColors.includes(emoji.unicode) && !containsSkinColor(emoji.unicode)) {
|
||||
|
@ -186,11 +186,11 @@ Popup {
|
|||
onSettingsLoaded: {
|
||||
connectionSettings.enabled = false
|
||||
// Add recent
|
||||
if (!appSettings.recentEmojis || !appSettings.recentEmojis.length) {
|
||||
if (!localAccountSensitiveSettings.recentEmojis || !localAccountSensitiveSettings.recentEmojis.length) {
|
||||
return
|
||||
}
|
||||
categories[0] = appSettings.recentEmojis
|
||||
emojiSectionsRepeater.itemAt(0).allEmojis = appSettings.recentEmojis
|
||||
categories[0] = localAccountSensitiveSettings.recentEmojis
|
||||
emojiSectionsRepeater.itemAt(0).allEmojis = localAccountSensitiveSettings.recentEmojis
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ Popup {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
appSettings.skinColor = (index === 5) ? "" : modelData.split("-")[1];
|
||||
localAccountSensitiveSettings.skinColor = (index === 5) ? "" : modelData.split("-")[1];
|
||||
popup.populateCategories();
|
||||
skinToneEmoji.expandSkinColorOptions = false;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ Popup {
|
|||
anchors.right: parent.right
|
||||
anchors.rightMargin: emojiHeader.headerMargin
|
||||
visible: !skinToneEmoji.expandSkinColorOptions
|
||||
source: Style.emoji("72x72/1f590" + ((appSettings.skinColor !== "" && visible) ? ("-" + appSettings.skinColor) : ""))
|
||||
source: Style.emoji("72x72/1f590" + ((localAccountSensitiveSettings.skinColor !== "" && visible) ? ("-" + localAccountSensitiveSettings.skinColor) : ""))
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -64,7 +64,7 @@ Popup {
|
|||
onOpened: {
|
||||
searchBox.text = ""
|
||||
searchBox.forceActiveFocus(Qt.MouseFocusReason)
|
||||
if (appSettings.isTenorWarningAccepted) {
|
||||
if (localAccountSensitiveSettings.isTenorWarningAccepted) {
|
||||
chatsModel.gif.getTrendings()
|
||||
} else {
|
||||
confirmationPopup.open()
|
||||
|
@ -94,7 +94,7 @@ Popup {
|
|||
SearchBox {
|
||||
id: searchBox
|
||||
placeholderText: qsTr("Search Tenor")
|
||||
enabled: appSettings.isTenorWarningAccepted
|
||||
enabled: localAccountSensitiveSettings.isTenorWarningAccepted
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: gifHeader.headerMargin
|
||||
anchors.top: parent.top
|
||||
|
@ -176,7 +176,7 @@ Popup {
|
|||
onClicked: {
|
||||
toggleCategory(StatusGifPopup.Category.Trending)
|
||||
}
|
||||
enabled: appSettings.isTenorWarningAccepted
|
||||
enabled: localAccountSensitiveSettings.isTenorWarningAccepted
|
||||
}
|
||||
|
||||
StatusTabBarIconButton {
|
||||
|
@ -185,7 +185,7 @@ Popup {
|
|||
onClicked: {
|
||||
toggleCategory(StatusGifPopup.Category.Recent)
|
||||
}
|
||||
enabled: appSettings.isTenorWarningAccepted
|
||||
enabled: localAccountSensitiveSettings.isTenorWarningAccepted
|
||||
}
|
||||
|
||||
StatusTabBarIconButton {
|
||||
|
@ -194,7 +194,7 @@ Popup {
|
|||
onClicked: {
|
||||
toggleCategory(StatusGifPopup.Category.Favorite)
|
||||
}
|
||||
enabled: appSettings.isTenorWarningAccepted
|
||||
enabled: localAccountSensitiveSettings.isTenorWarningAccepted
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ Popup {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: qsTr("Enable")
|
||||
onClicked: {
|
||||
appSettings.isTenorWarningAccepted = true
|
||||
localAccountSensitiveSettings.isTenorWarningAccepted = true
|
||||
chatsModel.gif.getTrendings()
|
||||
confirmationPopup.close()
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ Rectangle {
|
|||
|
||||
Loader {
|
||||
id: identicon
|
||||
sourceComponent: root.identicon === "" || appSettings.notificationMessagePreviewSetting === Constants.notificationPreviewAnonymous ? statusIdenticon : userOrChannelIdenticon
|
||||
sourceComponent: root.identicon === "" || localAccountSensitiveSettings.notificationMessagePreviewSetting === Constants.notificationPreviewAnonymous ? statusIdenticon : userOrChannelIdenticon
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
|
@ -153,7 +153,7 @@ Item {
|
|||
onCancelClicked: root.cancelClicked(packId)
|
||||
onUpdateClicked: root.updateClicked(packId)
|
||||
onBuyClicked: {
|
||||
if (!appSettings.isWalletEnabled) {
|
||||
if (!localAccountSensitiveSettings.isWalletEnabled) {
|
||||
confirmationPopup.open()
|
||||
return
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ Item {
|
|||
confirmationText: qsTr("This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk.")
|
||||
confirmButtonLabel: qsTr("I understand")
|
||||
onConfirmButtonClicked: {
|
||||
appSettings.isWalletEnabled = true
|
||||
localAccountSensitiveSettings.isWalletEnabled = true
|
||||
close()
|
||||
root.stickerPurchasePopup = openPopup(stickerPackPurchaseModal)
|
||||
root.buyClicked(packId)
|
||||
|
|
|
@ -8,6 +8,6 @@ Audio {
|
|||
|
||||
source: Qt.resolvedUrl("./../assets/audio" + track)
|
||||
audioRole: Audio.NotificationRole
|
||||
volume: appSettings.volume
|
||||
muted: !appSettings.notificationSoundsEnabled
|
||||
}
|
||||
volume: localAccountSensitiveSettings.volume
|
||||
muted: !localAccountSensitiveSettings.notificationSoundsEnabled
|
||||
}
|
||||
|
|
67
ui/main.qml
67
ui/main.qml
|
@ -40,71 +40,6 @@ StatusWindow {
|
|||
}
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: appSettings
|
||||
fileName: profileModel.settingsFile
|
||||
|
||||
property var chatSplitView
|
||||
property var walletSplitView
|
||||
property var profileSplitView
|
||||
property bool communitiesEnabled: false
|
||||
property bool isWalletEnabled: false
|
||||
property bool isWalletV2Enabled: false
|
||||
property bool nodeManagementEnabled: false
|
||||
property bool isBrowserEnabled: false
|
||||
property bool isActivityCenterEnabled: false
|
||||
property bool showOnlineUsers: false
|
||||
property bool expandUsersList: false
|
||||
property bool isGifWidgetEnabled: false
|
||||
property bool isKeycardEnabled: false
|
||||
property bool isTenorWarningAccepted: false
|
||||
property bool displayChatImages: false
|
||||
property bool useCompactMode: true
|
||||
property bool timelineEnabled: true
|
||||
property var recentEmojis: []
|
||||
property var hiddenCommunityWelcomeBanners: []
|
||||
property var hiddenCommunityBackUpBanners: []
|
||||
property real volume: 0.2
|
||||
property int notificationSetting: Constants.notifyJustMentions
|
||||
property bool notificationSoundsEnabled: true
|
||||
property bool useOSNotifications: true
|
||||
property int notificationMessagePreviewSetting: Constants.notificationPreviewNameAndMessage
|
||||
property bool notifyOnNewRequests: true
|
||||
property var whitelistedUnfurlingSites: ({})
|
||||
property bool neverAskAboutUnfurlingAgain: false
|
||||
property bool hideChannelSuggestions: false
|
||||
property int fontSize: Constants.fontSizeM
|
||||
property bool hideSignPhraseModal: false
|
||||
property bool onlyShowContactsProfilePics: true
|
||||
property bool quitOnClose: false
|
||||
property string skinColor: ""
|
||||
property bool showDeleteMessageWarning: true
|
||||
property bool downloadChannelMessagesEnabled: false
|
||||
property int lastModeActiveTab: 0
|
||||
property string lastModeActiveCommunity: ""
|
||||
|
||||
// Browser settings
|
||||
property bool showBrowserSelector: true
|
||||
property bool openLinksInStatus: true
|
||||
property bool shouldShowFavoritesBar: true
|
||||
property string browserHomepage: ""
|
||||
property int shouldShowBrowserSearchEngine: Constants.browserSearchEngineDuckDuckGo
|
||||
property int useBrowserEthereumExplorer: Constants.browserEthereumExplorerEtherscan
|
||||
property bool autoLoadImages: true
|
||||
property bool javaScriptEnabled: true
|
||||
property bool errorPageEnabled: true
|
||||
property bool pluginsEnabled: true
|
||||
property bool autoLoadIconsForPage: true
|
||||
property bool touchIconsEnabled: true
|
||||
property bool webRTCPublicInterfacesOnly: false
|
||||
property bool devToolsEnabled: false
|
||||
property bool pdfViewerEnabled: true
|
||||
property bool compatibilityMode: true
|
||||
|
||||
// Ropsten settings
|
||||
property bool stickersEnsRopsten: false
|
||||
}
|
||||
|
||||
id: applicationWindow
|
||||
objectName: "mainWindow"
|
||||
minimumWidth: 900
|
||||
|
@ -613,7 +548,7 @@ StatusWindow {
|
|||
Qt.quit();
|
||||
}
|
||||
else if (loader.sourceComponent == app) {
|
||||
if (appSettings.quitOnClose) {
|
||||
if (localAccountSensitiveSettings.quitOnClose) {
|
||||
Qt.quit();
|
||||
} else {
|
||||
applicationWindow.visible = false;
|
||||
|
|
Loading…
Reference in New Issue