fix contextMnu
This commit is contained in:
parent
d53d5c7af3
commit
e9c1c38141
8 changed files with 92 additions and 91 deletions
|
@ -35,8 +35,8 @@ import "./lib/API.js" as Logic
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: appWindow
|
id: appWindow
|
||||||
cover: Qt.resolvedUrl("cover/CoverPage.qml")
|
|
||||||
allowedOrientations: defaultAllowedOrientations
|
allowedOrientations: defaultAllowedOrientations
|
||||||
|
cover: Qt.resolvedUrl("cover/CoverPage.qml")
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var obj = {}
|
var obj = {}
|
||||||
Logic.mediator.installTo(obj)
|
Logic.mediator.installTo(obj)
|
||||||
|
@ -73,6 +73,7 @@ ApplicationWindow {
|
||||||
//Logic.conf.notificationLastID = 0;
|
//Logic.conf.notificationLastID = 0;
|
||||||
Logic.saveData()
|
Logic.saveData()
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Dbus
|
target: Dbus
|
||||||
onViewtoot: {
|
onViewtoot: {
|
||||||
|
|
|
@ -47,6 +47,27 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PullDownMenu {
|
||||||
|
id: pulleyConversation
|
||||||
|
visible: type === "reply"
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Copy Link to Clipboard")
|
||||||
|
onClicked: if (toot_url === "") {
|
||||||
|
|
||||||
|
var test = toot_uri.split("/")
|
||||||
|
console.log(toot_uri)
|
||||||
|
console.log(JSON.stringify(test))
|
||||||
|
console.log(JSON.stringify(test.length))
|
||||||
|
if (test.length === 8 && (test[7] === "activity")) {
|
||||||
|
var urialt = toot_uri.replace("activity", "")
|
||||||
|
Clipboard.text = urialt
|
||||||
|
}
|
||||||
|
else Clipboard.text = toot_uri
|
||||||
|
|
||||||
|
} else onClicked: Clipboard.text = toot_url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
id: mediaModel
|
id: mediaModel
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
|
@ -100,27 +121,6 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PullDownMenu {
|
|
||||||
id: pulleyConversation
|
|
||||||
visible: type === "reply"
|
|
||||||
MenuItem {
|
|
||||||
text: qsTr("Copy Link to Clipboard")
|
|
||||||
onClicked: if (toot_url === "") {
|
|
||||||
|
|
||||||
var test = toot_uri.split("/")
|
|
||||||
console.log(toot_uri)
|
|
||||||
console.log(JSON.stringify(test))
|
|
||||||
console.log(JSON.stringify(test.length))
|
|
||||||
if (test.length === 8 && (test[7] === "activity")) {
|
|
||||||
var urialt = toot_uri.replace("activity", "")
|
|
||||||
Clipboard.text = urialt
|
|
||||||
}
|
|
||||||
else Clipboard.text = toot_uri
|
|
||||||
|
|
||||||
} else onClicked: Clipboard.text = toot_url
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
@ -304,7 +304,7 @@ BackgroundItem {
|
||||||
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
id: mnuFavourite
|
id: mnuFavourite
|
||||||
visible: model.type !== "follow" || model.status_visibility !== "direct"
|
visible: model.type !== "follow"
|
||||||
text: typeof model.favourited !== "undefined" && model.favourited ? qsTr("Unfavorite") : qsTr("Favorite")
|
text: typeof model.favourited !== "undefined" && model.favourited ? qsTr("Unfavorite") : qsTr("Favorite")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var status = typeof model.favourited !== "undefined" && model.favourited
|
var status = typeof model.favourited !== "undefined" && model.favourited
|
||||||
|
|
Loading…
Reference in a new issue