From a814ef4e939fe42c49955d920201eb34ba8ca3d0 Mon Sep 17 00:00:00 2001
From: sijanec
Date: Tue, 25 Aug 2020 23:24:12 +0200
Subject: added developer's note to the login screen
---
Makefile | 6 ++++--
assets/js/login.js | 21 +++++++++++++++++++--
assets/root/login.html | 3 +++
assets/root/server-message-at-login.html | 11 +++++++++++
bin/bvr-compose-html | Bin 31984 -> 31664 bytes
bin/bvr-compose-single | Bin 31840 -> 27416 bytes
bin/bvr-jsbundle | Bin 17576 -> 13296 bytes
bin/bvr-jsmin | Bin 17904 -> 13664 bytes
dist/.well-known/assetlinks.json | 0
dist/_config.yml | 0
dist/assetlinks.json | 0
dist/cache_name.txt | 2 +-
dist/css/bubbles.css | 0
dist/css/fontawesome.min.css | 0
dist/css/fullcalendar/core/main.min.css | 0
dist/css/fullcalendar/custom.css | 0
dist/css/fullcalendar/daygrid/main.min.css | 0
dist/css/fullcalendar/timegrid/main.min.css | 0
dist/css/materialicons.css | 0
dist/css/materialize.min.css | 0
dist/css/styles.css | 0
dist/directory.json | 0
dist/favicon.png | Bin
dist/fonts/fa-brands-400.eot | Bin
dist/fonts/fa-brands-400.woff2 | Bin
dist/fonts/fa-regular-400.eot | Bin
dist/fonts/fa-regular-400.woff2 | Bin
dist/fonts/fa-solid-900.eot | Bin
dist/fonts/fa-solid-900.woff2 | Bin
dist/fonts/materialicons.woff2 | Bin
dist/img/avatars/asijanec.png | Bin
dist/img/avatars/rstular.png | Bin
dist/img/flags/en.svg | 0
dist/img/flags/sl.svg | 0
dist/img/icons/icon_144.png | Bin
dist/img/icons/icon_192.png | Bin
dist/img/icons/icon_384.png | Bin
dist/img/icons/icon_48.png | Bin
dist/img/icons/icon_512.png | Bin
dist/img/icons/icon_72.png | Bin
dist/img/icons/icon_96.png | Bin
dist/index.html | 0
dist/js/about.js | 0
dist/js/absences.js | 0
dist/js/app.js | 2 +-
dist/js/changelog.js | 0
dist/js/chats.js | 0
dist/js/grades.js | 0
dist/js/gradings.js | 0
dist/js/gsec.js | 0
dist/js/initialize.js | 0
dist/js/jitsi.js | 0
dist/js/lang/bundle.js | 0
dist/js/lib/fullcalendar/core/main.min.js | 0
dist/js/lib/fullcalendar/daygrid/main.min.js | 0
dist/js/lib/fullcalendar/timegrid/main.min.js | 0
dist/js/lib/he.js | 0
dist/js/lib/jquery.min.js | 0
dist/js/lib/localforage.min.js | 0
dist/js/lib/materialize.min.js | 0
dist/js/lib/mergedeep.js | 0
dist/js/lib/sjcl.js | 0
dist/js/lib/themes.js | 0
dist/js/lib/xss.js | 0
dist/js/login.js | 2 +-
dist/js/logout.js | 0
dist/js/meals.js | 0
dist/js/messaging.js | 0
dist/js/privacypolicy.js | 0
dist/js/settings.js | 0
dist/js/setup-storage.js | 0
dist/js/teachers.js | 0
dist/js/timetable.js | 0
dist/js/tos.js | 0
dist/login.html | 3 +++
dist/logout.html | 0
dist/manifest.json | 0
dist/pages/about.html | 2 +-
dist/pages/absences.html | 0
dist/pages/changelog.html | 0
dist/pages/chats.html | 0
dist/pages/grades.html | 0
dist/pages/gradings.html | 0
dist/pages/jitsi.html | 0
dist/pages/meals.html | 0
dist/pages/messaging.html | 0
dist/pages/privacypolicy.html | 0
dist/pages/settings.html | 0
dist/pages/teachers.html | 0
dist/pages/timetable.html | 0
dist/pages/tos.html | 0
dist/server-message-at-login.html | 11 +++++++++++
dist/sw.js | 4 ++--
93 files changed, 57 insertions(+), 10 deletions(-)
create mode 100644 assets/root/server-message-at-login.html
mode change 100644 => 100755 dist/.well-known/assetlinks.json
mode change 100644 => 100755 dist/_config.yml
mode change 100644 => 100755 dist/assetlinks.json
mode change 100644 => 100755 dist/cache_name.txt
mode change 100644 => 100755 dist/css/bubbles.css
mode change 100644 => 100755 dist/css/fontawesome.min.css
mode change 100644 => 100755 dist/css/fullcalendar/core/main.min.css
mode change 100644 => 100755 dist/css/fullcalendar/custom.css
mode change 100644 => 100755 dist/css/fullcalendar/daygrid/main.min.css
mode change 100644 => 100755 dist/css/fullcalendar/timegrid/main.min.css
mode change 100644 => 100755 dist/css/materialicons.css
mode change 100644 => 100755 dist/css/materialize.min.css
mode change 100644 => 100755 dist/css/styles.css
mode change 100644 => 100755 dist/directory.json
mode change 100644 => 100755 dist/favicon.png
mode change 100644 => 100755 dist/fonts/fa-brands-400.eot
mode change 100644 => 100755 dist/fonts/fa-brands-400.woff2
mode change 100644 => 100755 dist/fonts/fa-regular-400.eot
mode change 100644 => 100755 dist/fonts/fa-regular-400.woff2
mode change 100644 => 100755 dist/fonts/fa-solid-900.eot
mode change 100644 => 100755 dist/fonts/fa-solid-900.woff2
mode change 100644 => 100755 dist/fonts/materialicons.woff2
mode change 100644 => 100755 dist/img/avatars/asijanec.png
mode change 100644 => 100755 dist/img/avatars/rstular.png
mode change 100644 => 100755 dist/img/flags/en.svg
mode change 100644 => 100755 dist/img/flags/sl.svg
mode change 100644 => 100755 dist/img/icons/icon_144.png
mode change 100644 => 100755 dist/img/icons/icon_192.png
mode change 100644 => 100755 dist/img/icons/icon_384.png
mode change 100644 => 100755 dist/img/icons/icon_48.png
mode change 100644 => 100755 dist/img/icons/icon_512.png
mode change 100644 => 100755 dist/img/icons/icon_72.png
mode change 100644 => 100755 dist/img/icons/icon_96.png
mode change 100644 => 100755 dist/index.html
mode change 100644 => 100755 dist/js/about.js
mode change 100644 => 100755 dist/js/absences.js
mode change 100644 => 100755 dist/js/app.js
mode change 100644 => 100755 dist/js/changelog.js
mode change 100644 => 100755 dist/js/chats.js
mode change 100644 => 100755 dist/js/grades.js
mode change 100644 => 100755 dist/js/gradings.js
mode change 100644 => 100755 dist/js/gsec.js
mode change 100644 => 100755 dist/js/initialize.js
mode change 100644 => 100755 dist/js/jitsi.js
mode change 100644 => 100755 dist/js/lang/bundle.js
mode change 100644 => 100755 dist/js/lib/fullcalendar/core/main.min.js
mode change 100644 => 100755 dist/js/lib/fullcalendar/daygrid/main.min.js
mode change 100644 => 100755 dist/js/lib/fullcalendar/timegrid/main.min.js
mode change 100644 => 100755 dist/js/lib/he.js
mode change 100644 => 100755 dist/js/lib/jquery.min.js
mode change 100644 => 100755 dist/js/lib/localforage.min.js
mode change 100644 => 100755 dist/js/lib/materialize.min.js
mode change 100644 => 100755 dist/js/lib/mergedeep.js
mode change 100644 => 100755 dist/js/lib/sjcl.js
mode change 100644 => 100755 dist/js/lib/themes.js
mode change 100644 => 100755 dist/js/lib/xss.js
mode change 100644 => 100755 dist/js/login.js
mode change 100644 => 100755 dist/js/logout.js
mode change 100644 => 100755 dist/js/meals.js
mode change 100644 => 100755 dist/js/messaging.js
mode change 100644 => 100755 dist/js/privacypolicy.js
mode change 100644 => 100755 dist/js/settings.js
mode change 100644 => 100755 dist/js/setup-storage.js
mode change 100644 => 100755 dist/js/teachers.js
mode change 100644 => 100755 dist/js/timetable.js
mode change 100644 => 100755 dist/js/tos.js
mode change 100644 => 100755 dist/login.html
mode change 100644 => 100755 dist/logout.html
mode change 100644 => 100755 dist/manifest.json
mode change 100644 => 100755 dist/pages/about.html
mode change 100644 => 100755 dist/pages/absences.html
mode change 100644 => 100755 dist/pages/changelog.html
mode change 100644 => 100755 dist/pages/chats.html
mode change 100644 => 100755 dist/pages/grades.html
mode change 100644 => 100755 dist/pages/gradings.html
mode change 100644 => 100755 dist/pages/jitsi.html
mode change 100644 => 100755 dist/pages/meals.html
mode change 100644 => 100755 dist/pages/messaging.html
mode change 100644 => 100755 dist/pages/privacypolicy.html
mode change 100644 => 100755 dist/pages/settings.html
mode change 100644 => 100755 dist/pages/teachers.html
mode change 100644 => 100755 dist/pages/timetable.html
mode change 100644 => 100755 dist/pages/tos.html
create mode 100755 dist/server-message-at-login.html
mode change 100644 => 100755 dist/sw.js
diff --git a/Makefile b/Makefile
index 911ebc9..611336b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
default:
@echo "*** BežiApp Makefile ***"
@echo "targets:"
- @echo " make prepare installs dependencies, cleans after itself, requires sudo permissions and debian/ubuntu for apt"
+ @echo " make prepare installs dependencies, uses \`sudo apt\`."
@echo " make generate installs BežiApp to dist/"
+ @echo "notes and hacks:"
+ @echo " \`cp /bin/cp bin/bvr-jsmin\` if you don't want jsmin (before generate)"
@echo "no target specified, exiting ..."
prepare:
@@ -29,4 +31,4 @@ generate:
-find assets/js/ -name "*.bvr" -printf "%f\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/js/\$${FILE/.bvr/}"; ./bin/bvr-compose-single \"assets/js/\$$FILE\" \"\$$FILE_DST\""
-find assets/js/ -name "*.js" -printf "%P\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/js/\$${FILE/.bvr/}"; ./bin/bvr-jsmin assets/js/\"\$$FILE\" \"\$$FILE_DST\""
cp -r assets/root/.well-known dist/
-
+ chmod 0775 dist -R
diff --git a/assets/js/login.js b/assets/js/login.js
index cdecf38..88bf501 100644
--- a/assets/js/login.js
+++ b/assets/js/login.js
@@ -1,7 +1,24 @@
// const API_ENDPOINT = "https://gimb.tk/test.php"; // deprecated
document.addEventListener("DOMContentLoaded", () => {
- setupEventListeners();
-})
+ setupEventListeners();
+ try {
+ load_server_message_at_login();
+ } catch (e) {
+ console.log("login.js: load_server-message-at-login: silently failed.");
+ }
+});
+
+function load_server_message_at_login() {
+ $.ajax({
+ url: "/server-message-at-login.html",
+ success: (data) => {
+ $("#server-message-at-login").html(data);
+ },
+ error: () => {
+ $("#server-message-at-login").html("");
+ }
+ });
+}
function setupEventListeners() {
// Setup login button listener
diff --git a/assets/root/login.html b/assets/root/login.html
index 542b157..95bcc2e 100644
--- a/assets/root/login.html
+++ b/assets/root/login.html
@@ -60,6 +60,9 @@
thePrivacyPolicy
+
+
+