diff --git a/ui/app/AppLayouts/Profile/Sections/OpenLinksWithModal.qml b/ui/app/AppLayouts/Profile/Sections/OpenLinksWithModal.qml new file mode 100644 index 0000000000..34912790d1 --- /dev/null +++ b/ui/app/AppLayouts/Profile/Sections/OpenLinksWithModal.qml @@ -0,0 +1,51 @@ +import QtQuick 2.13 +import QtQuick.Controls 2.13 +import "../../../../imports" +import "../../../../shared" +import "../../../../shared/status" + +ModalPopup { + id: popup + + title: qsTr("Open links with...") + + onClosed: { + destroy() + } + + Column { + anchors.fill: parent + spacing: Style.current.bigPadding + + ButtonGroup { + id: openLinksWithGroup + } + + StatusRadioButton { + text: "Status" + ButtonGroup.group: openLinksWithGroup + checked: appSettings.openLinksInStatus + onCheckedChanged: { + if (checked) { + appSettings.openLinksInStatus = true + } + } + } + StatusRadioButton { + text: qsTr("My default browser") + ButtonGroup.group: openLinksWithGroup + checked: !appSettings.openLinksInStatus + onCheckedChanged: { + if (checked) { + appSettings.openLinksInStatus = false + } + } + } + } +} + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml b/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml index c595d337c2..be7fd598ba 100644 --- a/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/PrivacyContainer.qml @@ -131,6 +131,17 @@ Item { } } + Component { + id: openLinksWithModal + OpenLinksWithModal {} + } + + StatusSettingsLineButton { + text: qsTr("Open links with...") + currentValue: appSettings.openLinksInStatus ? "Status" : qsTr("My default browser") + onClicked: openPopup(openLinksWithModal) + } + StatusSectionHeadline { id: labelURLUnfurling text: qsTr("Chat link previews") diff --git a/ui/nim-status-client.pro b/ui/nim-status-client.pro index 47e7508256..7b22ae1e73 100644 --- a/ui/nim-status-client.pro +++ b/ui/nim-status-client.pro @@ -187,6 +187,7 @@ DISTFILES += \ app/AppLayouts/Profile/Sections/BrowserContainer.qml \ app/AppLayouts/Profile/Sections/ChangeProfilePicModal.qml \ app/AppLayouts/Profile/Sections/MyProfileContainer.qml \ + app/AppLayouts/Profile/Sections/OpenLinksWithModal.qml \ app/AppLayouts/Profile/Sections/SoundsContainer.qml \ app/AppLayouts/UIComponents/UIComponents.qml \ app/AppLayouts/Wallet/ReceiveModal.qml \