diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0f60c1e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# [Changelog v0.1.0](https://github.com/digas99/schedule-ua/releases/tag/v1.0.0) +Released on 05/09/2022 + +## Content +- Download and Upload buttons in the interface of the student's schedule at [https://paco.ua.pt/secvirtual/horarios/c_horario_aluno.asp](https://paco.ua.pt/secvirtual/horarios/c_horario_aluno.asp) to easily upload/download the schedule configuration + +## Popup +- "Login" page to load the schedule configuration, either through the PACO API or by droping the configuration file directly +- Page with the interface of the schedule. +- Possibility to navigate through the schedule by clicking in the classes and the week days. +- Highlight of the cell corresponding to the current hour of the day +- Detailed information on the classes of the day when viewing the schedule on a single day mode +- Expand or trim the schedule size, based on the the first and last hours of classes of the day +- Download schedule configuration file +- Take a picture and download the schedule +- Customize your experience on the Settings page \ No newline at end of file diff --git a/README.md b/README.md index af7e09c..db192ac 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ ## SchedUA - Schedule for Universidade de Aveiro +![Latest Release](https://img.shields.io/github/v/release/digas99/schedule-ua?label=Latest%20Version) + Browser Extension for easy access to your Schedule from Universidade de Aveiro. This extension uses the [PACO-UA API](https://github.com/digas99/paco-ua-api) to fetch the data from the schedule and present it in the Extension Popup. logo @@ -20,6 +22,29 @@ Browser Extension for easy access to your Schedule from Universidade de Aveiro. 1. [Settings](#settings) 1. [Pictures](#pictures) +## Latest Features +### [Changelog v0.1.0](https://github.com/digas99/schedule-ua/releases/tag/v1.0.0) +Released on 05/09/2022 + +#### Content +- Download and Upload buttons in the interface of the student's schedule at [https://paco.ua.pt/secvirtual/horarios/c_horario_aluno.asp](https://paco.ua.pt/secvirtual/horarios/c_horario_aluno.asp) to easily upload/download the schedule configuration + +#### Popup +- "Login" page to load the schedule configuration, either through the PACO API or by droping the configuration file directly +- Page with the interface of the schedule. +- Possibility to navigate through the schedule by clicking in the classes and the week days. +- Highlight of the cell corresponding to the current hour of the day +- Detailed information on the classes of the day when viewing the schedule on a single day mode +- Expand or trim the schedule size, based on the the first and last hours of classes of the day +- Download schedule configuration file +- Take a picture and download the schedule +- Customize your experience on the Settings page + + +[(All changelogs)](CHANGELOG.md) + +--- + ## Usage Guide This is a simple browser extension that takes a json containing information on a schedule and shows it using HTML Tables. Because it is a browser extension, you can check your schedule anytime, anywhere while browsing the web. @@ -94,6 +119,8 @@ There is a page that provides ways of customizing your experience with the app. - **PACO** - **Download and Upload buttons:** extra buttons above the schedule in the schedule page in PACO - Secretaria Virtual. +--- + ## Pictures ##### 1 - Some pages within the extension popup. diff --git a/scripts/schedule.js b/scripts/schedule.js index cc89404..a5d2e57 100644 --- a/scripts/schedule.js +++ b/scripts/schedule.js @@ -9,9 +9,6 @@ const Schedule = function(container, config) { } this.schedule = config["schedule"]; - if (this.schedule) - this.subjects = [...new Set(Object.entries(this.schedule).map(([key, value]) => value.map(obj => obj["subject"]["abbrev"])).flat(1))]; - this.subjectColors = config["colors"]; this.trimmed = config["trimmed"]; this.limitTrimming = config["limitTrimming"]; @@ -22,6 +19,9 @@ const Schedule = function(container, config) { if (Object.values(this.schedule)[0] == undefined || Object.values(this.schedule).flat(1).length == 0) this.empty = true; this.matrix = scheduleMatrix(this.hours, this.days.length); + + if (!this.empty && this.schedule) + this.subjects = [...new Set(Object.entries(this.schedule).map(([key, value]) => value.map(obj => obj["subject"]["abbrev"])).flat(1))]; } Schedule.prototype = { diff --git a/zip-version.sh b/zip-version.sh index cb03701..b5ecb7f 100755 --- a/zip-version.sh +++ b/zip-version.sh @@ -25,7 +25,7 @@ if [ -f "$FILENAME" ]; then ZIPNAME="schedua_$formated.zip" # pick files and folders to zip - zip -r "$ZIPNAME" manifest.json popup.html home.html settings.html about.html images scripts styles lib + zip -r "$ZIPNAME" manifest.json login.html home.html settings.html about.html load_paco.html images scripts styles lib break fi