2020-12-29 12:10:22 -05:00
|
|
|
import QtQuick 2.13
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared 1.0
|
|
|
|
import shared.status 1.0
|
2021-09-30 11:43:29 +02:00
|
|
|
import "../controls"
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-12-29 12:10:22 -05:00
|
|
|
|
2021-08-17 19:03:03 +02:00
|
|
|
GridView {
|
|
|
|
id: bookmarkGrid
|
|
|
|
cellWidth: 100
|
|
|
|
cellHeight: 100
|
|
|
|
delegate: BookmarkButton {
|
|
|
|
id: bookmarkBtn
|
|
|
|
text: name
|
|
|
|
source: imageUrl
|
|
|
|
webUrl: determineRealURL(url)
|
|
|
|
onClicked: {
|
|
|
|
if (!webUrl.toString()) {
|
|
|
|
addFavoriteModal.open()
|
|
|
|
} else {
|
|
|
|
currentWebView.url = webUrl
|
2020-12-29 12:10:22 -05:00
|
|
|
}
|
|
|
|
}
|
2021-08-17 19:03:03 +02:00
|
|
|
onRightClicked: {
|
|
|
|
favoriteMenu.url = url
|
|
|
|
favoriteMenu.x = bookmarkGrid.x + bookmarkBtn.x + mouse.x
|
|
|
|
favoriteMenu.y = Qt.binding(function () {return bookmarkGrid.y + mouse.y + favoriteMenu.height})
|
|
|
|
favoriteMenu.open()
|
|
|
|
}
|
2020-12-29 12:10:22 -05:00
|
|
|
}
|
|
|
|
}
|