Compare commits

...

17 Commits

Author SHA1 Message Date
Hykilpikonna 8dbef09ec9 [U] Release v0.4.2.912 2019-11-07 22:29:01 -05:00
Hykilpikonna 73b71f56a5 [S] Disable text selecting 2019-11-07 22:26:43 -05:00
Hykilpikonna ce702405d0 [S] Adjust no-grade font size 2019-11-07 22:26:33 -05:00
Hykilpikonna 21744a1bef [F] Fix gpa -1 when no grade issue 2019-11-07 22:26:13 -05:00
Hykilpikonna 82064f2f02 [O] Optimize graph max value 2019-11-07 22:14:46 -05:00
Hykilpikonna adfebc8c44 [F] Fix term 1 displaying term 2 grades issue 2019-11-07 22:00:08 -05:00
Hykilpikonna 2f30e67671 [F] Fix course grade displayed as 0.00 issue 2019-11-07 21:53:16 -05:00
Hykilpikonna 0a80d534eb [O] Optimize imports 2019-11-07 21:48:40 -05:00
Hykilpikonna a77c495843 [S] Further divide marklines 2019-11-07 21:45:34 -05:00
Hykilpikonna 5503aff6b1 [S] Dim marklines a little bit 2019-11-07 21:40:16 -05:00
Hykilpikonna 7cc4567245 [O] Optimize color representation 2019-11-07 21:39:09 -05:00
Hykilpikonna e7f29ad0bf [+] Add mark area below 70 2019-11-07 21:35:45 -05:00
Hykilpikonna cdbd101428 [+] Add mark area from 70 to 80 2019-11-07 21:33:22 -05:00
Hykilpikonna da650ef16b [+] Add mark area from 100 to 80 2019-11-07 21:31:51 -05:00
Hykilpikonna 8abfdd7f8e [+] Add mark area above 100 2019-11-07 21:31:36 -05:00
Hykilpikonna 3c66f99363 [F] Limit graph max value to 120 2019-11-07 20:57:35 -05:00
Hykilpikonna 251f87a072 [F] Fix assignment type update problem 2019-11-06 23:09:32 -05:00
9 changed files with 85 additions and 20 deletions
-3
View File
@@ -3,14 +3,11 @@ import Login from '@/components/login/login';
import Navigation from '@/components/navigation/navigation';
import Overall from '@/pages/overall/overall.vue';
import Constants from '@/constants';
import JsonUtils from '@/utils/json-utils';
import pWaitFor from 'p-wait-for';
import {HttpUtils} from '@/utils/http-utils';
import {CourseUtils} from '@/utils/course-utils';
import {GPAUtils} from '@/utils/gpa-utils';
import Loading from '@/components/loading/loading.vue';
import CoursePage from '@/pages/course/course-page.vue';
import {FormatUtils} from '@/utils/format-utils';
import Course from '@/logic/course';
+1 -1
View File
@@ -7,7 +7,7 @@ export default class Constants
public static API_URL: string = 'https://va.hydev.org/api';
/** Current version */
public static VERSION: string = '0.4.1.895';
public static VERSION: string = '0.4.2.912';
/** Minimum version that still supports the same cookies */
public static MIN_SUPPORTED_VERSION: string = '0.3.4.561';
+18 -4
View File
@@ -1,6 +1,5 @@
import App, {Assignment} from '@/components/app/app';
import {Assignment} from '@/components/app/app';
import JsonUtils from '@/utils/json-utils';
import Constants from '@/constants';
import {FormatUtils} from '@/utils/format-utils';
import {CourseUtils} from '@/utils/course-utils';
import Navigation from '@/components/navigation/navigation';
@@ -49,6 +48,13 @@ export default class Course
this.rawLetterGrade = courseJson.letterGrade;
this.rawNumericGrade = courseJson.numericGrade;
// Other api issue
if (this.rawLetterGrade == '')
{
this.rawNumericGrade = undefined;
this.rawLetterGrade = undefined;
}
// Level and scaleUp
let level = CourseUtils.detectLevel(this.name);
if (level != undefined)
@@ -124,14 +130,18 @@ export default class Course
return this.computed.termAssignments[timeCode];
}
// TODO: Optimize this
private letterGradeComputed = false;
/**
* Get letter grade
*/
get letterGrade(): string
{
// Cached
if (this.rawLetterGrade != undefined)
if (this.rawLetterGrade != undefined && this.letterGradeComputed)
return this.rawLetterGrade;
this.letterGradeComputed = true;
// Get scale
let scale = GPAUtils.findScale(this.numericGrade);
@@ -143,14 +153,17 @@ export default class Course
return this.rawLetterGrade = scale.letter;
}
private numericGradeComputed = false;
/**
* Get numeric grade
*/
get numericGrade(): number
{
// Cached
if (this.rawNumericGrade != undefined)
if (this.rawNumericGrade != undefined && this.numericGradeComputed)
return this.rawNumericGrade;
this.numericGradeComputed = true;
// Calculate
if (this.grading.method == 'PERCENT_TYPE')
@@ -162,6 +175,7 @@ export default class Course
return this.rawNumericGrade = GPAUtils.getTotalMeanAverage(this.assignments);
}
// Error
return -1;
}
}
@@ -27,15 +27,10 @@
@Prop({required: true}) typeName: string;
@Prop({required: true}) assignments: Assignment[];
filteredAssignments: Assignment[];
/**
* Called when this component is created
*/
created()
get filteredAssignments()
{
// Filter assignments to only this type
this.filteredAssignments = this.assignments.filter(a => a.type == this.typeName);
return this.assignments.filter(a => a.complete == 'Complete' && a.type == this.typeName);
}
get average()
+46 -2
View File
@@ -44,7 +44,51 @@ export default class OverallLine extends Vue
],
series:
{
smooth: true
smooth: true,
// Mark area
markArea:
{
silent: true,
data:
[
// Above 100
[
{
yAxis: 120,
itemStyle: {color: 'rgba(230,253,255,0.09)'}
}, {yAxis: 100}
],
// 90 to 100
[
{
yAxis: 100,
itemStyle: {color: 'rgba(241,255,237,0.09)'}
}, {yAxis: 90}
],
// 80 to 90
[
{
yAxis: 90,
itemStyle: {color: 'rgba(255,250,216,0.09)'}
}, {yAxis: 80}
],
// 70 to 80
[
{
yAxis: 80,
itemStyle: {color: 'rgba(255,225,199,0.1)'}
}, {yAxis: 70}
],
// Below 70 (Fail)
[
{
yAxis: 70,
itemStyle: {color: 'rgb(255,190,184, 0.09)'}
}, {yAxis: -100}
]
]
}
},
xAxis:
{
@@ -53,7 +97,7 @@ export default class OverallLine extends Vue
yAxis:
{
min: (value: any) => Math.floor(value.min),
max: (value: any) => value.max
max: (value: any) => Math.min(value.max, 110)
}
};
+11
View File
@@ -34,6 +34,17 @@
font-size: 11px;
}
.no-grade
{
font-size: 30px;
color: #b1b1b1;
// Disable selecting
display:block;
pointer-events: none;
user-select: none;
}
// Cards
.el-card.overall-bar-card
{
+7 -1
View File
@@ -1,6 +1,6 @@
<template>
<div id="overall">
<el-row>
<el-row v-if="getGPA().gpa !== -1">
<el-col :span="4">
<el-card class="large gpa-card vertical-center">
<div style="padding: 14px;">
@@ -25,6 +25,12 @@
</el-col>
</el-row>
<el-row v-if="getGPA().gpa === -1">
<el-card class="large gpa-card vertical-center">
<div class="no-grade">This quarter has no grades yet...</div>
</el-card>
</el-row>
<overall-course v-for="course in courses"
:course="course"
:key="course.id">
-1
View File
@@ -1,4 +1,3 @@
import {FormatUtils} from '@/utils/format-utils';
import Course from '@/logic/course';
const LEVEL_AP = {level: 'AP', scaleUp: 1};
-1
View File
@@ -1,4 +1,3 @@
import Course from '@/logic/course';
import {Assignment} from '@/components/app/app';