2021-01-04 20:34:46 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import "../../../../../imports"
|
|
|
|
import "../../../../../shared"
|
|
|
|
import "../../../../../shared/status"
|
|
|
|
|
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
|
|
|
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Homepage"
|
|
|
|
title: qsTrId("homepage")
|
2021-01-04 20:34:46 +00:00
|
|
|
|
|
|
|
onClosed: {
|
|
|
|
destroy()
|
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
|
|
spacing: Style.current.bigPadding
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
ButtonGroup {
|
|
|
|
id: homepageGroup
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Default"
|
|
|
|
text: qsTrId("default")
|
2021-01-04 20:34:46 +00:00
|
|
|
ButtonGroup.group: homepageGroup
|
|
|
|
checked: appSettings.browserHomepage === ""
|
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
|
|
|
appSettings.browserHomepage = ""
|
|
|
|
customUrl.visible = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Custom..."
|
|
|
|
text: qsTrId("custom---")
|
2021-01-04 20:34:46 +00:00
|
|
|
ButtonGroup.group: homepageGroup
|
|
|
|
checked: appSettings.browserHomepage !== "" || customUrl.visible
|
|
|
|
onClicked: {
|
|
|
|
customUrl.visible = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Input {
|
|
|
|
id: customUrl
|
|
|
|
visible: appSettings.browserHomepage !== ""
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Paste URL"
|
|
|
|
placeholderText: qsTrId("paste-url")
|
2021-01-04 21:05:41 +00:00
|
|
|
text: appSettings.browserHomepage
|
2021-01-04 20:34:46 +00:00
|
|
|
pasteFromClipboard: true
|
|
|
|
textField.onTextChanged: {
|
|
|
|
appSettings.browserHomepage = customUrl.text
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|