|
| 1 | +import QtCore |
| 2 | +import QtQuick |
| 3 | +import QtQuick.Controls |
| 4 | +import QtQuick.Layouts |
| 5 | +import org.kde.kirigami as Kirigami |
| 6 | +import org.kde.plasma.plasma5support as P5Support |
| 7 | + |
| 8 | +RowLayout { |
| 9 | + id: root |
| 10 | + readonly property string ghUser: "luisbocanegra" |
| 11 | + readonly property string projectName: "kde-material-you-colors" |
| 12 | + readonly property string ghRepo: "https://github.com/"+ghUser+"/"+projectName |
| 13 | + readonly property string kofi: "https://ko-fi.com/luisbocanegra" |
| 14 | + readonly property string paypal: "https://www.paypal.com/donate/?hosted_button_id=Y5TMH3Z4YZRDA" |
| 15 | + readonly property string email : "mailto:[email protected]" |
| 16 | + readonly property string projects: "https://github.com/"+ghUser+"?tab=repositories&q=&type=source&language=&sort=stargazers" |
| 17 | + readonly property string kdeStore: "https://store.kde.org/p/2136963" |
| 18 | + |
| 19 | + Menu { |
| 20 | + id: menu |
| 21 | + y: linksButton.height |
| 22 | + x: linksButton.x |
| 23 | + Action { |
| 24 | + text: "Changelog" |
| 25 | + onTriggered: Qt.openUrlExternally(ghRepo+"/blob/main/CHANGELOG.md") |
| 26 | + icon.name: "view-calendar-list-symbolic" |
| 27 | + } |
| 28 | + Action { |
| 29 | + text: "Releases" |
| 30 | + onTriggered: Qt.openUrlExternally(ghRepo+"/releases") |
| 31 | + icon.name: "update-none-symbolic" |
| 32 | + } |
| 33 | + |
| 34 | + MenuSeparator { } |
| 35 | + |
| 36 | + Menu { |
| 37 | + title: "Project page" |
| 38 | + icon.name: "globe" |
| 39 | + Action { |
| 40 | + text: "GitHub" |
| 41 | + onTriggered: Qt.openUrlExternally(ghRepo) |
| 42 | + } |
| 43 | + Action { |
| 44 | + text: "KDE Store" |
| 45 | + onTriggered: Qt.openUrlExternally(kdeStore) |
| 46 | + } |
| 47 | + } |
| 48 | + |
| 49 | + Menu { |
| 50 | + title: "Issues" |
| 51 | + icon.name: "project-open-symbolic" |
| 52 | + Action { |
| 53 | + text: "Current issues" |
| 54 | + onTriggered: Qt.openUrlExternally(ghRepo+"/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen") |
| 55 | + } |
| 56 | + Action { |
| 57 | + text: "Report a bug" |
| 58 | + onTriggered: Qt.openUrlExternally(ghRepo+"/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=%5BBug%5D%3A+") |
| 59 | + } |
| 60 | + Action { |
| 61 | + text: "Request a feature" |
| 62 | + onTriggered: Qt.openUrlExternally(ghRepo+"/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=%5BFeature+Request%5D%3A+") |
| 63 | + } |
| 64 | + } |
| 65 | + |
| 66 | + Menu { |
| 67 | + title: "Help" |
| 68 | + icon.name: "question-symbolic" |
| 69 | + Action { |
| 70 | + text: "Discussions" |
| 71 | + onTriggered: Qt.openUrlExternally(ghRepo+"/discussions") |
| 72 | + } |
| 73 | + Action { |
| 74 | + text: "Send an email" |
| 75 | + onTriggered: Qt.openUrlExternally(email) |
| 76 | + } |
| 77 | + } |
| 78 | + |
| 79 | + Menu { |
| 80 | + title: "Donate" |
| 81 | + icon.name: "love" |
| 82 | + Action { |
| 83 | + text: "Ko-fi" |
| 84 | + onTriggered: Qt.openUrlExternally(kofi) |
| 85 | + } |
| 86 | + Action { |
| 87 | + text: "Paypal" |
| 88 | + onTriggered: Qt.openUrlExternally(paypal) |
| 89 | + } |
| 90 | + Action { |
| 91 | + text: "GitHub sponsors" |
| 92 | + onTriggered: Qt.openUrlExternally("https://github.com/sponsors/"+ghUser) |
| 93 | + } |
| 94 | + } |
| 95 | + |
| 96 | + MenuSeparator { } |
| 97 | + |
| 98 | + Action { |
| 99 | + text: "More projects" |
| 100 | + onTriggered: Qt.openUrlExternally(projects) |
| 101 | + icon.name: "starred-symbolic" |
| 102 | + } |
| 103 | + } |
| 104 | + ToolButton { |
| 105 | + icon.name: "application-menu" |
| 106 | + id: linksButton |
| 107 | + onClicked: { |
| 108 | + if (menu.opened) { |
| 109 | + menu.close() |
| 110 | + } else { |
| 111 | + menu.open() |
| 112 | + } |
| 113 | + } |
| 114 | + } |
| 115 | +} |
0 commit comments