summaryrefslogtreecommitdiff
path: root/contents/ui/main.qml
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-04-06 22:46:46 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-04-06 22:46:46 +0800
commitc634f964ebc19e98a0a521ad13e244e712c25b7f (patch)
tree5770806581cb9af91e6b25c59bb8d771529e0f86 /contents/ui/main.qml
parent3441620a2ef7f1de8ad3f1339b5063bf8789a9a0 (diff)
Add button to open announcement in browser
Diffstat (limited to 'contents/ui/main.qml')
-rw-r--r--contents/ui/main.qml7
1 files changed, 6 insertions, 1 deletions
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"
}
}