summaryrefslogtreecommitdiffstats
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--assets/js/lib/themes.js35
-rw-r--r--assets/js/teachers.js8
2 files changed, 37 insertions, 6 deletions
diff --git a/assets/js/lib/themes.js b/assets/js/lib/themes.js
index d8a7ca1..5eaec7d 100644
--- a/assets/js/lib/themes.js
+++ b/assets/js/lib/themes.js
@@ -5,8 +5,24 @@ const THEME_COLOR_SCHEMES = {
"color-accent": "rgba(0, 156, 101, 1)",
"color-primary-light": "rgba(230, 250, 231, 1)",
"color-invalid": "rgba(192, 0, 0, 1)",
+
"background-color": "rgba(255, 255, 255, 1)",
- "background-accent": "rgba(0, 156, 101, 0.2)"
+ "background-accent": "rgba(0, 156, 101, 0.2)",
+
+ "color-header-bold": "rgba(255, 255, 255, 1)",
+ "color-header-span": "rgba(255, 255, 255, 1)",
+
+ "color-text": "rgba(0, 0, 0, 1)",
+ "color-table-hover": "rgba(242, 242, 242, 0.5)",
+
+ "color-sidenav-background": "rgba(255, 255, 255, 1)",
+ "color-sidenav-text": "rgba(0, 0, 0, 0.87)",
+ "color-sidenav-header": "rgba(0, 0, 0, 0.54)",
+ "color-divider": "rgba(224, 224, 224, 1)",
+
+ "color-btn-flat": "rgba(52, 52, 52, 1)",
+ "color-btn-flat-disabled": "rgba(178, 178, 178, 1)",
+
},
dark: {
"color-primary": "rgba(0, 128, 83, 1)",
@@ -14,8 +30,23 @@ const THEME_COLOR_SCHEMES = {
"color-accent": "rgba(20, 117, 83, 1)",
"color-primary-light": "rgba(230, 250, 231, 1)",
"color-invalid": "rgba(192, 0, 0, 1)",
+
"background-color": "rgba(31, 31, 31, 1)",
- "background-accent": "rgba(0, 92, 44, 0.2)"
+ "background-accent": "rgba(0, 92, 44, 0.2)",
+
+ "color-header-bold": "rgba(255, 255, 255, 1)",
+ "color-header-span": "rgba(255, 255, 255, 1)",
+
+ "color-text": "rgba(255, 255, 255, 1)",
+ "color-table-hover": "rgba(70, 70, 70, 0.5)",
+
+ "color-sidenav-background": "rgba(31, 31, 31, 1)",
+ "color-sidenav-text": "rgba(255, 255, 255, 1)",
+ "color-sidenav-header": "rgba(255, 255, 255, 0.54)",
+ "color-divider": "rgba(80, 80, 80, 1)",
+
+ "color-btn-flat": "rgba(178, 178, 178, 1)",
+ "color-btn-flat-disabled": "rgba(52, 52, 52, 1)",
}
}
diff --git a/assets/js/teachers.js b/assets/js/teachers.js
index da69e96..da0a62d 100644
--- a/assets/js/teachers.js
+++ b/assets/js/teachers.js
@@ -35,8 +35,8 @@ async function loadTeachers(force_refresh = false) {
await gsecInstance.login(username, password);
gsecInstance.fetchTeachers().then( (value) => {
teachers = value;
- localforage.setItem("teachers", value).then(() => {
- displayData();
+ localforage.setItem("teachers", value).then((saved_teachers) => {
+ displayData(saved_teachers);
setLoading(false);
});
setLoading(false);
@@ -49,13 +49,13 @@ async function loadTeachers(force_refresh = false) {
setLoading(false);
}
} else {
- displayData();
+ displayData(teachers);
setLoading(false);
}
}
// Function for displaying data
-function displayData() {
+function displayData(teachers) {
for(const teacher of Object.keys(teachers)) {
// Create row
let row = document.createElement("tr");