Skip to content

Commit 682f7e9

Browse files
committed
feat: add project urls to about section
1 parent c9f8393 commit 682f7e9

File tree

2 files changed

+117
-18
lines changed

2 files changed

+117
-18
lines changed

src/plasmoid/package/contents/ui/FullRepresentation.qml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,6 +2058,7 @@ ColumnLayout {
20582058
ColumnLayout {
20592059
spacing: Kirigami.Units.mediumSpacing
20602060
opacity: 0.9
2061+
Layout.alignment: Qt.AlignHCenter
20612062
PlasmaExtras.Heading {
20622063
level: 2
20632064
text: "About " + Plasmoid.metaData.name
@@ -2076,25 +2077,8 @@ ColumnLayout {
20762077
Layout.alignment: Qt.AlignHCenter
20772078
}
20782079

2079-
TextEdit {
2080-
text: "If you like the project you can leave a review in <a href='https://store.kde.org/p/2136963'>KDE Store</a> or give it a star on <a href='https://github.com/luisbocanegra/kde-material-you-colors'>Github</a>. For bugs and feature requests please go to the <a href='https://github.com/luisbocanegra/kde-material-you-colors/issues'>issues page</a>."
2081-
wrapMode: Text.WordWrap
2082-
readOnly: true
2083-
textFormat: TextEdit.RichText
2080+
Components.About {
20842081
Layout.alignment: Qt.AlignHCenter
2085-
Layout.preferredWidth: mainLayout.width
2086-
horizontalAlignment: Text.AlignHCenter
2087-
2088-
color: Kirigami.Theme.textColor
2089-
selectedTextColor: Kirigami.Theme.highlightedTextColor
2090-
selectionColor: Kirigami.Theme.highlightColor
2091-
2092-
onLinkActivated: (url) => Qt.openUrlExternally(url)
2093-
2094-
HoverHandler {
2095-
acceptedButtons: Qt.NoButton
2096-
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
2097-
}
20982082
}
20992083
}
21002084

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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

Comments
 (0)