summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contents/ui/AnnouncementView.qml4
-rw-r--r--contents/ui/main.qml7
2 files changed, 10 insertions, 1 deletions
diff --git a/contents/ui/AnnouncementView.qml b/contents/ui/AnnouncementView.qml
index 8453b90..5ce4d64 100644
--- a/contents/ui/AnnouncementView.qml
+++ b/contents/ui/AnnouncementView.qml
@@ -30,8 +30,12 @@ RowLayout {
RowLayout {
Layout.alignment: Qt.AlignRight
+
PlasmaComponents3.ToolButton {
icon.name: "view-visible"
+ onClicked: () => {
+ Qt.openUrlExternally(url)
+ }
}
PlasmaComponents3.ToolButton {
diff --git a/contents/ui/main.qml b/contents/ui/main.qml
index 1d73bd4..7241373 100644
--- a/contents/ui/main.qml
+++ b/contents/ui/main.qml
@@ -51,7 +51,11 @@ Item {
// Get activity stream for each course
for (let activity of activityStream) {
if (activity.type == "Announcement") {
- announcementsModel.append({course: course[1], title: activity.title})
+ announcementsModel.append({
+ course: course[1],
+ title: activity.title,
+ url: activity.html_url
+ })
}
}
})
@@ -84,6 +88,7 @@ Item {
ListElement {
course: "CS101"
title: "Title of the announcement"
+ url: "https://xkcd.com"
}
}