summaryrefslogtreecommitdiff
path: root/contents/ui
diff options
context:
space:
mode:
Diffstat (limited to 'contents/ui')
-rw-r--r--contents/ui/configCanvas.qml9
1 files changed, 4 insertions, 5 deletions
diff --git a/contents/ui/configCanvas.qml b/contents/ui/configCanvas.qml
index 0940c1a..aed1a3e 100644
--- a/contents/ui/configCanvas.qml
+++ b/contents/ui/configCanvas.qml
@@ -21,7 +21,6 @@ Kirigami.FormLayout {
}
function fetchCourses() {
- courses.clear()
fetchCoursesStatus.text = i18n("Fetching…")
let xhr = new XMLHttpRequest()
xhr.open("GET", `${canvasUrl.text.replace(/\/$/, "")}/api/v1/courses?per_page=100`)
@@ -29,19 +28,19 @@ Kirigami.FormLayout {
xhr.onload = () => {
if (xhr.status == 200) {
try {
+ courses.clear()
let json = JSON.parse(xhr.responseText)
for (let c of json) {
courses.append(`${c.id} ${c.course_code}`)
}
fetchCoursesStatus.text = i18n(
- "Done! You can remove courses you don't wish to see on your desktop from " +
- "the list.\nYou can also rename the course code, but leave the numeric " +
- "course ID at the beginning of each line intact."
+ "Done! To remove a course, just delete the line.\n" +
+ "You can also rename a course, but do not change the numeric ID."
)
} catch (e) {
if (e instanceof SyntaxError) {
console.error(`Cannot parse response for ${path} as JSON:\n${xhr.responseText}`)
- fetchgCoursesStatus.text = i18n("Cannot parse API response")
+ fetchCoursesStatus.text = i18n("Cannot parse API response")
} else { throw e }
}
} else {