status-desktop/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml

178 lines
5.3 KiB
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
2020-05-27 21:28:25 +00:00
import "../../../../imports"
import "../../../../shared"
2020-09-17 16:42:59 +00:00
import "../../../../shared/status"
import "../../../../onboarding/" as OnboardingComponents
2020-05-27 21:28:25 +00:00
Item {
id: privacyContainer
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
2020-05-27 21:28:25 +00:00
Column {
id: containerColumn
2020-05-27 21:28:25 +00:00
anchors.top: parent.top
anchors.topMargin: topMargin
width: profileContainer.profileContentWidth
anchors.horizontalCenter: parent.horizontalCenter
StatusSectionHeadline {
id: labelSecurity
//% "Security"
text: qsTrId("security")
2021-08-11 09:55:59 +00:00
bottomPadding: Style.current.halfPadding
}
StatusSettingsLineButton {
2021-01-15 20:02:24 +00:00
id: backupSeedPhrase
//% "Backup Seed Phrase"
text: qsTrId("backup-seed-phrase")
isBadge: !profileModel.mnemonic.isBackedUp
isEnabled: !profileModel.mnemonic.isBackedUp
onClicked: {
backupSeedModal.open()
}
}
2021-08-11 09:55:59 +00:00
StatusSettingsLineButton {
text: qsTr("Change password")
onClicked: {
changePasswordModal.open()
}
}
StatusSettingsLineButton {
text: qsTr("Store pass to Keychain")
visible: Qt.platform.os == "osx" // For now, this is available only on MacOS
currentValue: {
let value = appSettings.storeToKeychain
if(value == Constants.storeToKeychainValueStore)
return qsTr("Store")
if(value == Constants.storeToKeychainValueNever)
return qsTr("Never")
return qsTr("Not now")
}
onClicked: openPopup(storeToKeychainSelectionModal)
Component {
id: storePasswordModal
OnboardingComponents.CreatePasswordModal {
storingPasswordModal: true
height: 350
}
}
Component {
id: storeToKeychainSelectionModal
StoreToKeychainSelectionModal {}
}
}
BackupSeedModal {
id: backupSeedModal
}
2021-08-11 09:55:59 +00:00
ChangePasswordModal {
id: changePasswordModal
anchors.centerIn: parent
successPopup: successPopup
}
ChangePasswordSuccessModal {
id: successPopup
anchors.centerIn: parent
2021-08-11 09:55:59 +00:00
}
Item {
id: spacer1
height: Style.current.bigPadding
width: parent.width
}
Separator {
id: separator
2020-10-04 23:03:37 +00:00
}
StatusSectionHeadline {
id: labelPrivacy
2020-08-26 15:52:26 +00:00
//% "Privacy"
text: qsTrId("privacy")
topPadding: Style.current.padding
2021-08-11 09:55:59 +00:00
bottomPadding: Style.current.halfPadding
}
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Display all profile pictures (not only contacts)"
text: qsTrId("display-all-profile-pictures--not-only-contacts-")
isSwitch: true
switchChecked: !appSettings.onlyShowContactsProfilePics
onClicked: appSettings.onlyShowContactsProfilePics = !checked
}
StatusSettingsLineButton {
//% "Display images in chat automatically"
text: qsTrId("display-images-in-chat-automatically")
isSwitch: true
switchChecked: appSettings.displayChatImages
onClicked: appSettings.displayChatImages = checked
}
StyledText {
feat: whitelist gifs (no url extension needed) Fixes #1377. Fixes #1479. Two sites have been added to the whitelist: giphy.com and tenor.com. `imageUrls` in its entirety has been removed and instead all links are being handle through the message `linkUrls`. This prevents double-handling of urls that may or may not be images. The logic to automatically show links previews works like this: 1. If the setting "display chat images" is enabled, all links that *contain* ".png", ".jpg", ".jpeg", ".svg", ".gif" will be automatically shown. If the URL doesn't contain the extension, we are not downloading it. This was meant to be somewhat of a security compromise as we do not want to download each and every link posted in a message just to find out its true content type. 2. If the above setting is *disabled*, then we follow the whitelist settings for tenor and giphy. This allows us to preview gifs that do not have a file extension in their url. feat: bump status-go to the commit that supports the new whitelist (https://github.com/status-im/status-go/pull/2094), and also lets us get link preview data from urls in the whitelist. NOTE: this commit was branched off status-go `develop`, so once it is merged, and we update this PR to the new commit, we will effectively be getting status-go develop changes. We *could* base that status-go PR off of master if it makes things easier. fix: height on settings update issue feat: move date/time of message below links fix: layout issues when changing setting `neverAskAboutUnfurlingAgain` feat: Add MessageBorder component to aid in showing rounded corners with different radius
2020-12-11 00:53:44 +00:00
width: parent.width
2021-02-18 16:36:05 +00:00
//% "All images (links that contain an image extension) will be downloaded and displayed, regardless of the whitelist settings below"
text: qsTrId("all-images--links-that-contain-an-image-extension--will-be-downloaded-and-displayed--regardless-of-the-whitelist-settings-below")
font.pixelSize: 15
font.weight: Font.Thin
color: Style.current.secondaryText
wrapMode: Text.WordWrap
bottomPadding: Style.current.smallPadding
}
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Chat link previews"
text: qsTrId("chat-link-previews")
onClicked: openPopup(chatLinksPreviewModal)
}
Component {
id: chatLinksPreviewModal
ChatLinksPreviewModal {}
}
Component {
id: openLinksWithModal
OpenLinksWithModal {}
}
StatusSettingsLineButton {
2021-02-18 16:36:05 +00:00
//% "Open links with..."
text: qsTrId("open-links-with---")
//% "My default browser"
currentValue: appSettings.openLinksInStatus ? "Status" : qsTrId("my-default-browser")
onClicked: openPopup(openLinksWithModal)
}
StatusSettingsLineButton {
//% "Allow new contact requests"
text: qsTrId("allow-new-contact-requests")
isSwitch: true
switchChecked: !profileModel.profile.messagesFromContactsOnly
onClicked: function (checked) {
profileModel.setMessagesFromContactsOnly(!checked)
}
}
}
2020-05-27 21:28:25 +00:00
}
/*##^##
Designer {
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:480;width:640}
}
##^##*/