2020-10-29 20:07:52 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.3
|
|
|
|
import QtWebEngine 1.9
|
|
|
|
import "../../../shared"
|
|
|
|
import "../../../shared/status"
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-10-29 20:07:52 +00:00
|
|
|
import "../Chat/ChatColumn/ChatComponents"
|
|
|
|
import "../Profile/LeftTab/constants.js" as ProfileConstants
|
|
|
|
|
|
|
|
PopupMenu {
|
|
|
|
property var openInNewTab: function () {}
|
|
|
|
property string url
|
|
|
|
property var currentFavorite: getCurrentFavorite(url)
|
|
|
|
|
|
|
|
id: root
|
|
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
|
|
|
|
|
|
|
Action {
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Open in new Tab"
|
|
|
|
text: qsTrId("open-in-new-tab")
|
2021-09-28 15:04:06 +00:00
|
|
|
icon.source: Style.svg("generate_account")
|
2020-11-27 20:31:50 +00:00
|
|
|
icon.width: 16
|
|
|
|
icon.height: 16
|
2020-10-29 20:07:52 +00:00
|
|
|
onTriggered: {
|
|
|
|
openInNewTab(root.url)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Separator {}
|
|
|
|
|
|
|
|
Action {
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Edit"
|
|
|
|
text: qsTrId("edit")
|
2021-09-28 15:04:06 +00:00
|
|
|
icon.source: Style.svg("edit")
|
2020-10-29 20:07:52 +00:00
|
|
|
icon.width: 16
|
|
|
|
icon.height: 16
|
|
|
|
onTriggered: {
|
|
|
|
addFavoriteModal.modifiyModal = true
|
|
|
|
addFavoriteModal.ogUrl = root.currentFavorite ? root.currentFavorite.url : currentWebView.url
|
|
|
|
addFavoriteModal.ogName = root.currentFavorite ? root.currentFavorite.name : currentWebView.title
|
|
|
|
addFavoriteModal.open()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Remove"
|
|
|
|
text: qsTrId("remove")
|
2021-09-28 15:04:06 +00:00
|
|
|
icon.source: Style.svg("remove")
|
2020-10-29 20:07:52 +00:00
|
|
|
icon.color: Style.current.danger
|
|
|
|
icon.width: 16
|
|
|
|
icon.height: 16
|
|
|
|
onTriggered: {
|
|
|
|
browserModel.removeBookmark(root.url)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|