diff options
author | rstular <rok@stular.eu> | 2020-05-17 20:25:10 +0200 |
---|---|---|
committer | rstular <rok@stular.eu> | 2020-05-17 21:02:04 +0200 |
commit | 730722259f6f079c930f6fcce1c2f1e715d3df63 (patch) | |
tree | 909908e9f3ca8b1ab472f1d4cbf01801e43ce9ad /assets/js | |
parent | Language changing bug fix (diff) | |
download | beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.gz beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.bz2 beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.lz beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.xz beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.zst beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.zip |
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/lib/themes.js | 35 | ||||
-rw-r--r-- | assets/js/teachers.js | 8 |
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"); |