feat: add setting to change the browser to open links with

This commit is contained in:
Jonathan Rainville 2020-12-29 15:34:53 -05:00 committed by Iuri Matias
parent 89da5dd923
commit 9007e6d5c3
3 changed files with 63 additions and 0 deletions

View File

@ -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}
}
##^##*/

View File

@ -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")

View File

@ -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 \