mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-08 04:34:01 +00:00
Introduced Style.svg() Style.png() Style.emoji() and Style.icon() in Style.qml. Those should be used to set the source in Images instead of using relative paths. Usage: Image { source: Style.svg("check) .... Also moved all Singletons inside a new "utils" folder and made it a QML module, to use import utils 1.0 instead of relative paths Closes #3678
69 lines
1.9 KiB
QML
69 lines
1.9 KiB
QML
import QtQuick 2.12
|
|
import QtQuick.Controls 2.3
|
|
|
|
import utils 1.0
|
|
import "../../../../shared"
|
|
import "../../../../shared/status"
|
|
|
|
ModalPopup {
|
|
property string link
|
|
|
|
id: popup
|
|
|
|
//% "Choose browser"
|
|
title: qsTrId("choose-browser")
|
|
width: 440
|
|
height: 425
|
|
|
|
Column {
|
|
anchors.fill: parent
|
|
spacing: 20
|
|
|
|
Image {
|
|
source: Style.png("chooseBrowserImage")
|
|
width: 240
|
|
height: 148
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
}
|
|
|
|
StatusButton {
|
|
//% "Open in Status"
|
|
text: qsTrId("browsing-open-in-status")
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
onClicked: {
|
|
appSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
|
|
if (rememberChoiceCheckBox.checked) {
|
|
appSettings.openLinksInStatus = true
|
|
}
|
|
changeAppSection(Constants.browser)
|
|
browserLayoutContainer.item.openUrlInNewTab(popup.link)
|
|
popup.close()
|
|
}
|
|
}
|
|
|
|
StatusButton {
|
|
//% "Open in my default browser"
|
|
text: qsTrId("open-in-my-default-browser")
|
|
type: "secondary"
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
onClicked: {
|
|
appSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
|
|
if (rememberChoiceCheckBox.checked) {
|
|
appSettings.openLinksInStatus = false
|
|
}
|
|
Qt.openUrlExternally(popup.link)
|
|
popup.close()
|
|
}
|
|
}
|
|
|
|
|
|
StatusCheckBox {
|
|
id: rememberChoiceCheckBox
|
|
//% "Remember my choice. To override it, go to settings."
|
|
text: qsTrId("remember-my-choice--to-override-it--go-to-settings-")
|
|
width: parent.width
|
|
}
|
|
}
|
|
}
|
|
|