From 473486647475ee26470fc33f5eb95f51b00fdcc5 Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 30 Sep 2020 10:24:05 +0200 Subject: 24 urni format --- assets/js/timetable.js | 2 +- dist/cache_name.txt | 2 +- dist/js/app.js | 2 +- dist/js/timetable.js | 2 +- dist/pages/about.html | 2 +- dist/sw.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/js/timetable.js b/assets/js/timetable.js index 290b748..85c555a 100644 --- a/assets/js/timetable.js +++ b/assets/js/timetable.js @@ -274,7 +274,7 @@ document.addEventListener("DOMContentLoaded", () => { nowIndicator: true, firstDay: 1, weekends: false, - + timeFormat: 'H(:mm)', // 24 urni urnik - evropa style minTime: "07:10:00", maxTime: "19:10:00" }); diff --git a/dist/cache_name.txt b/dist/cache_name.txt index 5d3eada..54c7951 100755 --- a/dist/cache_name.txt +++ b/dist/cache_name.txt @@ -2,4 +2,4 @@ -///site-static-1.0.16.0-beta-f54120a||| +///site-static-1.0.16.0-beta-8fe006a||| diff --git a/dist/js/app.js b/dist/js/app.js index fe857c9..e9c4a8b 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -4,7 +4,7 @@ // @begin=html@ const app_version = "1.0.16.0-beta"; -const previous_commit = "f54120aa036215dee0f02ff2c1a9ce20def75006"; +const previous_commit = "8fe006a36a0c5dddd8b0d3c5ad590d57039a4aae"; const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund if ("serviceWorker" in navigator) { diff --git a/dist/js/timetable.js b/dist/js/timetable.js index 79539f6..aa73a9a 100755 --- a/dist/js/timetable.js +++ b/dist/js/timetable.js @@ -18,4 +18,4 @@ function displayTimetable(weekly_timetable,date_object){let transformed_timetabl let lesson_object={id:JSON.stringify(lesson_metadata),title:lesson["acronym"],start:date_string+" "+lesson_times[0],end:date_string+" "+lesson_times[1],backgroundColor:bg_color,textColor:fg_color};transformed_timetable.push(lesson_object);});} calendar_obj.removeAllEvents();calendar_obj.addEventSource(transformed_timetable);} function eventClickHandler(eventClickInfo){let lesson_metadata=JSON.parse(eventClickInfo.event.id);let lesson_subject=lesson_metadata["subject"];let lesson_teacher=lesson_metadata["teacher"];let lesson_classroom=lesson_metadata["classroom"];let lesson_class=lesson_metadata["class"];let lesson_duration=lesson_metadata["start"]+" - "+lesson_metadata["end"];$("#lesson-subject").text(lesson_subject);$("#lesson-teacher").text(lesson_teacher);$("#lesson-class").text(lesson_class);$("#lesson-classroom").text(lesson_classroom);$("#lesson-duration").text(lesson_duration);const modal=document.querySelectorAll(".side-modal")[0];M.Sidenav.getInstance(modal).open();} -document.addEventListener("DOMContentLoaded",()=>{checkLogin();let calendarEl=document.getElementById("calendar");calendar_obj=new FullCalendar.Calendar(calendarEl,{plugins:["timeGrid"],eventClick:eventClickHandler,defaultView:"timeGridWeek",contentHeight:"auto",height:"auto",width:"auto",timeGridEventMinHeight:35,nowIndicator:true,firstDay:1,weekends:false,minTime:"07:10:00",maxTime:"19:10:00"});calendar_obj.render();loadTimetable(new Date());$(".fc-today-button, .fc-prev-button, .fc-next-button").click(()=>{loadTimetable(calendar_obj.getDate());});$("#refresh-icon").click(()=>{loadTimetable(calendar_obj.getDate(),true);});const menus=document.querySelectorAll(".side-menu");M.Sidenav.init(menus,{edge:"right",draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});}); \ No newline at end of file +document.addEventListener("DOMContentLoaded",()=>{checkLogin();let calendarEl=document.getElementById("calendar");calendar_obj=new FullCalendar.Calendar(calendarEl,{plugins:["timeGrid"],eventClick:eventClickHandler,defaultView:"timeGridWeek",contentHeight:"auto",height:"auto",width:"auto",timeGridEventMinHeight:35,nowIndicator:true,firstDay:1,weekends:false,timeFormat:'H(:mm)',minTime:"07:10:00",maxTime:"19:10:00"});calendar_obj.render();loadTimetable(new Date());$(".fc-today-button, .fc-prev-button, .fc-next-button").click(()=>{loadTimetable(calendar_obj.getDate());});$("#refresh-icon").click(()=>{loadTimetable(calendar_obj.getDate(),true);});const menus=document.querySelectorAll(".side-menu");M.Sidenav.init(menus,{edge:"right",draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});}); \ No newline at end of file diff --git a/dist/pages/about.html b/dist/pages/about.html index 2959511..9e26117 100755 --- a/dist/pages/about.html +++ b/dist/pages/about.html @@ -162,7 +162,7 @@

- ^HEAD f54120aa036215dee0f02ff2c1a9ce20def75006 + ^HEAD 8fe006a36a0c5dddd8b0d3c5ad590d57039a4aae

diff --git a/dist/sw.js b/dist/sw.js index 1b83714..dd7d5b7 100755 --- a/dist/sw.js +++ b/dist/sw.js @@ -4,8 +4,8 @@ // @begin=js@ // Change version to cause cache refresh -const static_cache_name = "site-static-1.0.16.0-beta-f54120a"; -// commit before the latest is f54120aa036215dee0f02ff2c1a9ce20def75006 +const static_cache_name = "site-static-1.0.16.0-beta-8fe006a"; +// commit before the latest is 8fe006a36a0c5dddd8b0d3c5ad590d57039a4aae // Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js // sw.js NE SME BITI CACHAN, ker vsebuje verzijo! -- cgit v1.2.3 From 90dfb784cc11a8cc52e3cfb063273f44849f62a1 Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 30 Sep 2020 10:26:23 +0200 Subject: 24 urni format in verzija --- dist/cache_name.txt | 2 +- dist/js/app.js | 4 ++-- dist/pages/about.html | 4 ++-- dist/sw.js | 4 ++-- global.bvr | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/cache_name.txt b/dist/cache_name.txt index 54c7951..c25c4f4 100755 --- a/dist/cache_name.txt +++ b/dist/cache_name.txt @@ -2,4 +2,4 @@ -///site-static-1.0.16.0-beta-8fe006a||| +///site-static-1.0.16.1-beta-4734866||| diff --git a/dist/js/app.js b/dist/js/app.js index e9c4a8b..db89d67 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -3,8 +3,8 @@ // @begin=html@ -const app_version = "1.0.16.0-beta"; -const previous_commit = "8fe006a36a0c5dddd8b0d3c5ad590d57039a4aae"; +const app_version = "1.0.16.1-beta"; +const previous_commit = "473486647475ee26470fc33f5eb95f51b00fdcc5"; const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund if ("serviceWorker" in navigator) { diff --git a/dist/pages/about.html b/dist/pages/about.html index 9e26117..79ff2d5 100755 --- a/dist/pages/about.html +++ b/dist/pages/about.html @@ -78,7 +78,7 @@
version - 1.0.16.0-beta + 1.0.16.1-beta
@@ -162,7 +162,7 @@

- ^HEAD 8fe006a36a0c5dddd8b0d3c5ad590d57039a4aae + ^HEAD 473486647475ee26470fc33f5eb95f51b00fdcc5

diff --git a/dist/sw.js b/dist/sw.js index dd7d5b7..0348f79 100755 --- a/dist/sw.js +++ b/dist/sw.js @@ -4,8 +4,8 @@ // @begin=js@ // Change version to cause cache refresh -const static_cache_name = "site-static-1.0.16.0-beta-8fe006a"; -// commit before the latest is 8fe006a36a0c5dddd8b0d3c5ad590d57039a4aae +const static_cache_name = "site-static-1.0.16.1-beta-4734866"; +// commit before the latest is 473486647475ee26470fc33f5eb95f51b00fdcc5 // Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js // sw.js NE SME BITI CACHAN, ker vsebuje verzijo! diff --git a/global.bvr b/global.bvr index 8001baa..4d0e032 100644 --- a/global.bvr +++ b/global.bvr @@ -1,3 +1,3 @@ <@?s bvr_include_path assets/pages-src/ assets/pages-src/misc/@> <@?s latest_commit ?u 0 -1 ?i .git/refs/heads/dev@> -<@?s app_version 1.0.16.0-beta@> +<@?s app_version 1.0.16.1-beta@> -- cgit v1.2.3 From 796e614c642b2dd998bb1e997741f472abecdb3a Mon Sep 17 00:00:00 2001 From: sijanec Date: Sun, 4 Oct 2020 20:28:36 +0200 Subject: =?UTF-8?q?def.lang=3Dsl&update=20ne=20zbri=C5=A1e=20lang,theme,er?= =?UTF-8?q?rorrep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 5 +- assets/js/app.js.bvr | 2 +- assets/js/lang/bundle.js | 534 --------------------------------------- assets/js/lang/bundle.js.bvr | 538 +++++++++++++++++++++++++++++++++++++++ assets/js/setup-storage.js | 43 ---- assets/js/setup-storage.js.bvr | 45 ++++ assets/root/login.html | 2 +- dist/cache_name.txt | 3 +- dist/js/app.js | 7 +- dist/js/lang/bundle.js | 552 ++++++++++++++++++++++++++++++++++++++++- dist/js/setup-storage.js | 49 +++- dist/login.html | 2 +- dist/pages/about.html | 5 +- dist/pages/absences.html | 1 + dist/pages/changelog.html | 1 + dist/pages/chats.html | 1 + dist/pages/grades.html | 1 + dist/pages/gradings.html | 1 + dist/pages/jitsi.html | 1 + dist/pages/meals.html | 1 + dist/pages/messaging.html | 1 + dist/pages/privacypolicy.html | 1 + dist/pages/settings.html | 1 + dist/pages/teachers.html | 1 + dist/pages/timetable.html | 1 + dist/pages/tos.html | 1 + dist/sw.js | 5 +- global.bvr | 3 +- server/nadomescanja/output.pdf | Bin 1404099 -> 0 bytes server/nadomescanja/script.sh | 21 -- 30 files changed, 1205 insertions(+), 624 deletions(-) delete mode 100644 assets/js/lang/bundle.js create mode 100644 assets/js/lang/bundle.js.bvr delete mode 100644 assets/js/setup-storage.js create mode 100644 assets/js/setup-storage.js.bvr delete mode 100644 server/nadomescanja/output.pdf delete mode 100755 server/nadomescanja/script.sh diff --git a/Makefile b/Makefile index 90fe3e1..e415395 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,10 @@ generate: find assets/root/ -type f \( ! -name "*.bvr" \) -exec cp -r "{}" dist/ \; -find assets/root/ -name "*.bvr" -printf "%f\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/\$${FILE/.bvr/}"; ./bin/bvr-compose-single \"assets/root/\$$FILE\" \"\$$FILE_DST\"" # js bvr fajli - mkdir -p dist/js + mkdir -p dist/js/lang # js ne znam te magije - -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/lang/ -maxdepth 1 -name "*.bvr" -printf "%f\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/js/lang/\$${FILE/.bvr/}"; ./bin/bvr-compose-single \"assets/js/lang/\$$FILE\" \"\$$FILE_DST\"" + -find assets/js/ -maxdepth 1 -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 "test -z "\$${jsminpath}" && jsminpath=./bin/bvr-jsmin; FILE='%'; FILE_DST="dist/js/\$${FILE/.bvr/}"; \$$jsminpath assets/js/\"\$$FILE\" \"\$$FILE_DST\"" cp -r assets/root/.well-known dist/ chmod 0775 dist -R diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr index a96ea88..c99124b 100644 --- a/assets/js/app.js.bvr +++ b/assets/js/app.js.bvr @@ -1,5 +1,5 @@ <@?i global@> -// @begin=html@ +// @begin=js@ const app_version = "<@?g app_version@>"; const previous_commit = "<@?g latest_commit@>"; const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund diff --git a/assets/js/lang/bundle.js b/assets/js/lang/bundle.js deleted file mode 100644 index bd0335c..0000000 --- a/assets/js/lang/bundle.js +++ /dev/null @@ -1,534 +0,0 @@ -// there's an DoS backdoor in BežiApp because of this (-:< -var chosenLang; -var dateString = { - day: (danv) => { - let dnevitedna = [S("sunday"), S("monday"), S("tuesday"), S("wednesday"), S("thursday"), S("friday"), S("saturday")]; - return dnevitedna[danv]; - }, - month: (mesl) => { - let mesecileta = [S("january"), S("february"), S("march"), S("april"), S("may"), S("june"), S("july"), S("august"), S("september"), S("october"), S("november"), S("december")]; - return mesecileta[mesl]; - }, - longFormatted: (dateObject) => { - return `${dateString.day(dateObject.getDay())}, ${(dateObject.getDate())}. ${dateString.month(dateObject.getMonth())} ${dateObject.getFullYear()}`; - } -}; -async function refreshLangDOM() { - let promises_to_runn = [ - localforage.getItem("chosenLang").then( (value) => { - chosenLang = value; - }) - ]; - await Promise.all(promises_to_runn); - // this could be done nicer. p. s.: lahko bi se uporablil x-s in x-S za razločitev med capitalize in !capitalize queryselectorall ni case sensitive za imena elementov - let stringContainerss = document.querySelectorAll("x-sl:not(.langFinished)"); - for (i = 0; i < stringContainerss.length; i++) { - stringContainerss[i].innerHTML = s(stringContainerss[i].innerHTML); - stringContainerss[i].classList.add("langFinished"); - stringContainerss[i].hidden = false; - } - let stringContainersd = document.querySelectorAll("x-dl:not(.langFinished)"); - for (i = 0; i < stringContainersd.length; i++) { - stringContainersd[i].innerHTML = d(stringContainersd[i].innerHTML); - stringContainersd[i].classList.add("langFinished"); - stringContainersd[i].hidden = false; - } - let stringContainersS = document.querySelectorAll("x-su:not(.langFinished)"); - for (i = 0; i < stringContainersS.length; i++) { - stringContainersS[i].innerHTML = S(stringContainersS[i].innerHTML); - stringContainersS[i].classList.add("langFinished"); - stringContainersS[i].hidden = false; - } - let stringContainersD = document.querySelectorAll("x-du:not(.langFinished)"); - for (i = 0; i < stringContainersD.length; i++) { - stringContainersD[i].innerHTML = D(stringContainersD[i].innerHTML); - stringContainersD[i].classList.add("langFinished"); - stringContainersD[i].hidden = false; - } -} -async function setLangConfigAndReload() { - let promises_to_run = [ - /* localforage.setItem("chosenCapitalize", true), */ // F for unused code - localforage.setItem("chosenLang", "en") - ]; - await Promise.all(promises_to_run); - window.location.reload(); -} -window.addEventListener("DOMContentLoaded", () => { - find_chosen_lang(); -}); - -async function find_chosen_lang() { - let value = await localforage.getItem("chosenLang"); - if(value == null) { - setLangConfigAndReload(); - } else { - chosenLang = value; - } - refreshLangDOM(); -} - -const capitalize = (s) => { - if (typeof s !== 'string') return '' - return s.charAt(0).toUpperCase() + s.slice(1) -} -var s = function(whatString) { - return getLang.s(whatString); -}; -var d = function(whatString) { - return getLang.d(whatString); -}; -var S = function(whatString) { - return getLang.S(whatString); -}; -var D = function(whatString) { - return getLang.D(whatString); -}; -var getLang = { // language object - s: function(whatString) { // get string - return langstrings[chosenLang][whatString]; - }, - S: function(whatString) { // get capitalized string - return capitalize(langstrings[chosenLang][whatString]); - }, - d: function(whatString) { // add a dot and get string - if(langstrings[chosenLang][whatString].slice(-1) != ".") { - return langstrings[chosenLang][whatString]+"."; - } else { - return langstrings[chosenLang][whatString]; - } - }, - D: function(whatString) { // add a dot and get capitalized string - if(langstrings[chosenLang][whatString].slice(-1) != ".") { - return capitalize(langstrings[chosenLang][whatString]+"."); - } else { - return capitalize(langstrings[chosenLang][whatString]); - } - }, -} -var langstrings = { - en: { - miscTranslationLanguage: "English", - miscTranslationAuthors: "Rok Štular", - "": "", - // date - monday: "monday", - tuesday: "tuesday", - wednesday: "wednesday", - thursday: "thursday", - friday: "friday", - saturday: "saturday", - sunday: "sunday", - am: "am", - pm: "pm", - january: "january", - february: "february", - march: "march", - april: "april", - may: "may", - june: "june", - july: "july", - august: "august", - september: "september", - october: "october", - november: "november", - december: "december", - // login - username: "username", - password: "password", - signIn: "sign in", - bySigningInYouAgreeTo: "by signing in, you agree to", - theToS: "the terms and conditions", - and: "and", - thePrivacyPolicy: "the privacy policy", - loginFailed: "login failed", - browserNotSupported: "bežiapp won't work on your device, unless you update your Internet browser", - // index - timetable: "timetable", - gradings: "gradings", - grades: "grades", - teachers: "teachers", - absences: "absences", - messaging: "messaging", - meals: "meals", - about: "about", - logout: "logout", - settings: "settings", - // timetable - noPeriods: "no periods in selected week", - // gradings - date: "date", - description: "description", - add: "add", - requestFailed: "request failed", - addGrading: "add grading", - noInternetConnection: "no internet connection", - // grades - temporary: "temporary", - useOnlyPermanentGrades: "use only permanent grades", - useOnlyPermanentGradesNote1: "if checked, only permanent grades will be used in the average grade calculation", - useOnlyPermanentGradesNote2: "if left unchecked, the calculation will include every available grade", - type: "type", - term: "term", - teacher: "teacher", - zakljucneGradess: "grades in red are final grades that appear on your end-of-year certificate and are decided by your teacher. They are not averages like grades in black. Should you have any questions or complaints about them, contact your teacher", - // teachers - name: "name", - schoolSubject: "subject", - tpMeetings: "TP meetings", - // absences - from: "from", - to: "to", - cancel: "cancel", - ok: "ok", - noAbsences: "no absences in the chosen time period", - lesson: "lesson", - notProcessed: "not processed", - authorizedAbsence: "authorized", - unauthorizedAbsence: "unauthorized", - doesNotCount: "does not count", - // messaging - loadingMessages: "Loading messages...", - sendAMessage: "send a message", - send: "send", - recipient: "recipient", - messageSubject: "subject", - messageBody: "message body", - removeImages: "remove images", - note: "note", - largeImagesNote: "GimB servers don't like large messages, so only very small images may be attached or your message will not be delivered", - attachedImages: "attached images", - encryptMessage: "Encrypt message", - passwordForE2EE: "password for encrypting the message", - messages: "messages", - received: "received", - sent: "sent", - deleted: "deleted", - messageStorageUsed: "message storage used in this folder", - maxMessagesNote: "you can only have 120 messages per message folder, older messages will not be shown. Remember to delete read and sent messages regulary to avoid any issues.", - loadMessageBody: "load message body", - thisMessageWasEncrypted: "this message was encrypted", - enterPassword: "enter password", - decrypt: "decrypt", - nameDirectoryNotSet: "name directory not set, sending unavailable", - errorFetchingMessages: "error fetching messages", - unableToReceiveTheMessage: "unable to receive the message", - unableToDeleteTheMessage: "unable to delete the message", - messageWasProbablySent: "message was probably sent, check the Sent folder to be sure", - errorSendingMessage: "error sending message", - imageAddedAsAnAttachment: "image added as an attachment", - unableToReadDirectory: "unable to read directory of people", - messageCouldNotBeSent: "message could to be sent", - incorrectPassword: "incorrect password", - // chats - chat: "chat", - chattingWith: "chatting with", - noMessages: "no messages", - stillLoading: "loading is still in progress", - directory: "directory", - select: "select", - mustSelectRecipient: "you have to select a recipient before chatting. Open directory on the left side by clicking on the top left addressbook button and select a recipient in order to start chatting with them", - recipientNotInDirectory: "recipient is not in directory.", - chatExternalInfo: "you have just received a chat. Chats are not supported by GimSIS, so you must reply by changing the subject to something else. Chat body: ", - // meals - loginError: "login error", - loginToLopolis: "login to Lopolis", - loginToLopolisNote: "it seems like you're not currently logged in to eRestavracija, so this form has been presented to you. You have a different username and password combination used for applying and opting out of of menus. In order to use this feature, you have to log in with your Lopolis account.", - logInToLopolis: "log in to Lopolis", - logOutFromLopolis: "log out from Lopolis", - readOnly: "read only", - usage: "usage", - mealsUsageNote: "click on a date to open the collapsible menu with choices and click on a specific meal to select it. Reload the meals when you're done and check the entries.", - lunchesNote: "app was not tested with lunches in mind. Meals probably won't work with lunches and having a lunch subscription may even break its functionality.", - mealNotShownNote: "editable meals are highlighted in gold, read-only meals are highlighted in grey and cannot be changed. Meals that provide no options for menus are not shown for clarity, same applies for days where there are no meals", - mealsContributeNote: "you are welcome to contribute to the LopolisAPI project and add features, such as checkouts.", - authenticationError: "authentication error", - lopolisAPIConnectionError: "LopolisAPI server connection error", - errorGettingMenus: "error getting menus", - errorUnexpectedResponse: "error: unexpected response", - requestForAuthenticationFailed: "request for authentication failed", - credentialsMatch: "credentials match", - errorSettingMeals: "error setting meals", - mealSet: "meal set! Reload meals to be sure", - selected: "selected", - meal: "meal", - checkedOut: "checked out", - checkedIn: "checked in", - successfulCheckingInOut: "successfully checked in/out", - errorCheckingInOut: "failed to check in/out", - // about - version: "version", - authors: "authors", - translatorsForThisLanguage: "translators for this language", - whatIsNew: "what's new", - whatsNew: "what's new", - reportABug: "report a bug", - sendASuggestion: "send a suggestion", - instagram: "instagram", - // changelog - changelog: "changelog", - // terms and conditions - termsOfUse: "terms of use", - termsOfUseDescription: "as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App", - termsOfUseHarass: "to abuse, harass, threaten, impersonate or intimidate any person", - termsOfUsePost: "to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person", - termsOfUseCommunicate: "to communicate with the App developers or other users in abusive or offensive manner", - termsOfUsePurpose: "for any purpose that is not permitted under the laws of the jurisdiction where you use the App", - termsOfUseExploit: "to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user", - termsOfUseSpam: "to create or transmit unwanted “spam” to any person or any URL", - termsOfUseModify: "you may also not reverse engineer, modify or redistribute the app without written consent from the developers", - terminationOfServices: "termination of services", - terminationOfServicesDescriptions: "the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons", - terminationOfServicesBreaching: "breaching the Terms of Service", - terminationOfServicesRequest: "receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App", - limitationOfLiability: "limitation of Liability", - limitationOfLiabilityContent: "the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.", - tosAreEffectiveAsOf: "the Terms of Service are effective as of", - // privacy policy - privacyImportant: "your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.", - privacyOnlyAskedWhen: "we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.", - privacyDataCollection: "we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.", - privacySharingData: "we don’t share any personally identifying information publicly or with third-parties, except when required to by law", - privacyExternalSites: "our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.", - privacyRefuse: "you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.", - privacyAcceptWithUse: "your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.", - privacyEffectiveAsOf: "this policy is effective as of", - // settings - language: "language", - selectLanguage: "select desired language", - languageSet: "language set, open another page for the changes to take effect", - theme: "theme", - themeLight: "light theme (default)", - themeDark: "dark theme", - themeNight: "night theme", - selectTheme: "select a theme", - triggerWarning: "the following switch enables additional settings, which some people may: disagree with, find annoying, be offended by them. By enabling the switch, you agree that you won't be triggered by any of the additional options and will not asociate any of the authors and/or their personal beliefs and opinions with additional options.", - triggerAgreement: "i agree with terms and conditions stated above", - triggerWarningSet: "additional settings toggled", - additionalOptions: "additional settings", - themeSet: "theme set, open another page for the changes to take effect", - errorReportingSet: "error reporting preference set", - errorReporting: "error reporting", - on: "on", - off: "off", - selectErrorReporting: "should error reports be submitted to the developers?", - // gsec - gsecErrNet: "GimSIS connection error", - gsecErrLogin: "GimSIS login error (bad password?), try logging out", - gsecErrOther: "GimSIS unknown error, try logging out", - // videoconferences - videoconferences: "GimB meet" - }, - sl: { - miscTranslationLanguage: "slovenščina", - miscTranslationAuthors: "Anton Luka Šijanec", - "": "", - // date - monday: "ponedeljek", - tuesday: "torek", - wednesday: "sreda", - thursday: "četrtek", - friday: "petek", - saturday: "sobota", - sunday: "nedelja", - am: "dop.", - pm: "pop.", - january: "januar", - february: "februar", - march: "marec", - april: "april", - may: "maj", - june: "junij", - july: "julij", - august: "avgust", - september: "september", - october: "oktober", - november: "november", - december: "december", - // login - username: "uporabniško ime", - password: "geslo", - signIn: "prijava", - bySigningInYouAgreeTo: "s prijavo se strinjate s", - theToS: "pogoji uporabe (v angleščini)", - and: "in", - thePrivacyPolicy: "politika zasebnosti (v angleščini)", - loginFailed: "prijava je spodletela", - browserNotSupported: "BežiApp ne bo deloval na vaši napravi, če ne posodobite vašega Internetnega brskalnika", - // timetable - noPeriods: "ni ur v izbranem tednu", - // index - timetable: "urnik", - gradings: "ocenjevanja", - grades: "ocene", - teachers: "profesorji", - absences: "izostanki", - messaging: "sporočanje", - meals: "obroki", - about: "o", - logout: "odjava", - settings: "nastavitve", - // gradings - date: "datum", - description: "opis", - add: "dodaj", - requestFailed: "zahteva spodletela", - addGrading: "dodaj ocenjevanje", - noInternetConnection: "ni povezave s spletom", - // grades - temporary: "začasno", - useOnlyPermanentGrades: "uporabi le stalne ocene", - useOnlyPermanentGradesNote1: "če je označeno, bodo za izračun povprečja uporabljene le stalne ocene", - useOnlyPermanentGradesNote2: "če pa je polje neoznačeno, pa se ob izračunu povprečne ocene upoštevajo vse ocene", - type: "tip", - term: "rok", - teacher: "profesor", - zakljucneGradess: "zaključne ocene, ki bodo na spričevalu, so označene z rdečo, povprečja ocen pa so v črni barvi. V kolikor imate kakršnekoli pritožbe ali vprašanja glede zaključnih ocen, povprašajte profesorja", - // teachers - name: "ime", - schoolSubject: "predmet", - tpMeetings: "govorilne ure", - // absences - from: "od", - to: "do", - cancel: "prekliči", - ok: "v redu", - noAbsences: "ni izostankov v izbranem časovnem obdobju", - lesson: "ura", - notProcessed: "ni obdelano", - authorizedAbsence: "opravičeno", - unauthorizedAbsence: "neopravičeno", - doesNotCount: "ne šteje", - // messaging - loadingMessages: "Nalagam sporočila...", - sendAMessage: "pošlji sporočilo", - send: "pošlji", - recipient: "prejemnik", - messageSubject: "zadeva", - messageBody: "telo", - removeImages: "odstrani slike", - note: "opomba", - largeImagesNote: "GimB strežniki ne marajo velikih sporočil, zato lahko pošiljate le zelo majhne slike, v nasprotnem primeru sporočilo ne bo dostavljeno", - attachedImages: "pripete slike", - encryptMessage: "Šifriraj sporočilo", - passwordForE2EE: "geslo za šifriranje sporočila", - messages: "sporočila", - received: "prejeta", - sent: "poslana", - deleted: "izbrisana", - messageStorageUsed: "zasedenost shrambe sporočil v tej mapi", - maxMessagesNote: "v vsaki mapi imate lahko največ 120 sporočil. Starejša sporočila ne bodo prikazana. Redno brišite sporočila, da se izognete morebitnim težavam.", - loadMessageBody: "naloži telo sporočila", - thisMessageWasEncrypted: "to sporočilo je šifrirano", - enterPassword: "vnesite geslo", - decrypt: "dešifriraj", - nameDirectoryNotSet: "imenik ni nastavljen, pošiljanje ni mogoče", - errorFetchingMessages: "sporočil ni bilo mogoče prenesti", - unableToReceiveTheMessage: "sporočila ni bilo mogoče prenesti", - unableToDeleteTheMessage: "sporočila ni bilo mogoče izbrisati", - messageWasProbablySent: "sporočilo je bilo verjetno poslano, prepričajte se in preverite mapo s poslanimi sporočili", - errorSendingMessage: "sporočila ni bilo mogoče poslati", - imageAddedAsAnAttachment: "slika dodana kot priloga", - unableToReadDirectory: "imenika ni bilo mogoče prebrati", - messageCouldNotBeSent: "sporočila ni bilo mogoče poslati", - incorrectPassword: "nepravilno geslo", - // chats - chat: "klepet", - chattingWith: "klepet z osebo", - noMessages: "ni sporočil", - stillLoading: "nalaganje še poteka", - directory: "imenik", - select: "izberi", - mustSelectRecipient: "pred klepetom morate izbrati sogovornika. Odprite imenik (meni na levi strani) s pritiskom na gumb \"imenik\" zgoraj desno in izberite sogovornika.", - recipientNotInDirectory: "izbrane osebe ni v imeniku", - chatExternalInfo: "dobili ste kratko sporočilo v standardu, ki ga GimSIS ne podpira. Pri odgovarjanju spremenite zadevo. Vsebina sporočila: ", - // meals - loginError: "napaka pri prijavi", - loginToLopolis: "prijava v Lopolis", - loginToLopolisNote: "izgleda, da niste prijavljeni v eRestavracijo, zato se vam je prikazal prijavni obrazec. Za uporavljanje s prehrano se uporablja druga kombinacija uporabniškega imena in gesla, zato se prijavite s svojimi Lopolis prijavnimi podatki za nadaljevanje.", - logInToLopolis: "prijava v Lopolis", - logOutFromLopolis: "odjava iz Lopolisa", - readOnly: "samo za branje", - usage: "uporaba", - mealsUsageNote: "kliknite na datum za prikaz menijev, nato pa si enega izberite s klikom na ime menija. Po nastavitvi menijev ponovno naložite menije in se prepričajte o pravilnih nastavitvah.", - lunchesNote: "aplikacija ni testirana za naročanje na kosila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.", - mealNotShownNote: "obroki, označeni z zlato so nastavljivi, tisti, označeni s sivo, niso, če pa pri kakšnem dnevu obroka ni, pa pomeni, da ga ni moč nastaviti ali pa da ne obrok ne obstaja", - mealsContributeNote: "vabimo vas k urejanju LopolisAPI programa za upravljanje z meniji.", - authenticationError: "napaka avtentikacije", - lopolisAPIConnectionError: "napaka povezave na LopolisAPI strežnik", - errorGettingMenus: "napaka branja menijev", - errorUnexpectedResponse: "napaka: nepričakovan odgovor", - requestForAuthenticationFailed: "zahteva za avtentikacijo ni uspela", - credentialsMatch: "prijavni podatki so pravilni", - errorSettingMeals: "napaka pri nastavljanju menijev", - mealSet: "obrok nastavljen! osvežite obroke in se prepričajte sami", - selected: "izbrano", - meal: "obrok", - checkedOut: "odjavljen", - checkedIn: "prijavljen", - errorCheckingInOut: "prijava/odjava na obrok NI uspela", - successfulCheckingInOut: "prijava/odjava na obrok je uspela", - // about - version: "različica", - authors: "avtorji", - translatorsForThisLanguage: "prevajalci izbranega jezika", - whatIsNew: "kaj je novega", - whatsNew: "kaj je novega", - reportABug: "prijavite napako", - sendASuggestion: "pošljite pripombo/predlog/pohvalo/pritožbo", - instagram: "instagram", - // changelog - changelog: "dnevnik sprememb", - // terms and conditions - termsOfUse: "terms of use", - termsOfUseDescription: "as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App", - termsOfUseHarass: "to abuse, harass, threaten, impersonate or intimidate any person", - termsOfUsePost: "to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person", - termsOfUseCommunicate: "to communicate with the App developers or other users in abusive or offensive manner", - termsOfUsePurpose: "for any purpose that is not permitted under the laws of the jurisdiction where you use the App", - termsOfUseExploit: "to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user", - termsOfUseSpam: "to create or transmit unwanted “spam” to any person or any URL", - termsOfUseModify: "you may also not reverse engineer, modify or redistribute the app without written consent from the developers", - terminationOfServices: "termination of services", - terminationOfServicesDescriptions: "the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons", - terminationOfServicesBreaching: "breaching the Terms of Service", - terminationOfServicesRequest: "receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App", - limitationOfLiability: "limitation of Liability", - limitationOfLiabilityContent: "the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.", - tosAreEffectiveAsOf: "the Terms of Service are effective as of", - // privacy policy - privacyImportant: "your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.", - privacyOnlyAskedWhen: "we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.", - privacyDataCollection: "we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.", - privacySharingData: "we don’t share any personally identifying information publicly or with third-parties, except when required to by law", - privacyExternalSites: "our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.", - privacyRefuse: "you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.", - privacyAcceptWithUse: "your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.", - privacyEffectiveAsOf: "this policy is effective as of", - // settings - language: "jezik", - selectLanguage: "izberite željen jezik", - languageSet: "jezik nastavljen, odprite neko drugo stran da se pokažejo spremembe", - theme: "izgled", - themeLight: "svetel izgled (privzeto)", - themeDark: "temen izgled", - themeNight: "nočni izgled", - themeSet: "izgled nastavljen, odprite neko drugo stran da se spremembe uveljavijo", - selectTheme: "izberite željen izgled", - errorReportingSet: "nastavitev pošiljanja napak izbrana", - errorReporting: "pošiljanje napak", - on: "vklopljeno", - off: "izklopljeno", - selectErrorReporting: "ali naj so napake v aplikaciji posredovane razvijalcem?", - triggerWarning: "spodnji gumb omogoči dodatne možnosti, ki lahko razburijo/vznevoljijo nekatere uporabnike. Če omogočite stikalo, se strinjate, da avtorjev in/ali njihovih osebnih prepričanj ne boste povezovali s katerokoli od dodatnih omogočenih možnosti", - triggerAgreement: "strinjam se z zgoraj navedenimi pogoji", - triggerWarningSet: "spremenili ste stanje dodatnih nastavitev", - additionalOptions: "dodatne nastavitve", - // gsec - gsecErrNet: "napaka povezave na GimSIS", - gsecErrLogin: "prijava v GimSIS ni uspela (napačno geslo?), poskusite se odjaviti", - gsecErrOther: "neznana napaka GimSISa, poskusite se odjaviti", - // videoconferences - videoconferences: "GimB konference" - } -} diff --git a/assets/js/lang/bundle.js.bvr b/assets/js/lang/bundle.js.bvr new file mode 100644 index 0000000..125d3c6 --- /dev/null +++ b/assets/js/lang/bundle.js.bvr @@ -0,0 +1,538 @@ +<@?i global@> +// @begin=js@ +// there's an DoS backdoor in BežiApp because of this (-:< +var chosenLang; +var dateString = { + day: (danv) => { + let dnevitedna = [S("sunday"), S("monday"), S("tuesday"), S("wednesday"), S("thursday"), S("friday"), S("saturday")]; + return dnevitedna[danv]; + }, + month: (mesl) => { + let mesecileta = [S("january"), S("february"), S("march"), S("april"), S("may"), S("june"), S("july"), S("august"), S("september"), S("october"), S("november"), S("december")]; + return mesecileta[mesl]; + }, + longFormatted: (dateObject) => { + return `${dateString.day(dateObject.getDay())}, ${(dateObject.getDate())}. ${dateString.month(dateObject.getMonth())} ${dateObject.getFullYear()}`; + } +}; +async function refreshLangDOM() { + let promises_to_runn = [ + localforage.getItem("chosenLang").then( (value) => { + chosenLang = value; + }) + ]; + await Promise.all(promises_to_runn); + // this could be done nicer. p. s.: lahko bi se uporablil x-s in x-S za razločitev med capitalize in !capitalize queryselectorall ni case sensitive za imena elementov + let stringContainerss = document.querySelectorAll("x-sl:not(.langFinished)"); + for (i = 0; i < stringContainerss.length; i++) { + stringContainerss[i].innerHTML = s(stringContainerss[i].innerHTML); + stringContainerss[i].classList.add("langFinished"); + stringContainerss[i].hidden = false; + } + let stringContainersd = document.querySelectorAll("x-dl:not(.langFinished)"); + for (i = 0; i < stringContainersd.length; i++) { + stringContainersd[i].innerHTML = d(stringContainersd[i].innerHTML); + stringContainersd[i].classList.add("langFinished"); + stringContainersd[i].hidden = false; + } + let stringContainersS = document.querySelectorAll("x-su:not(.langFinished)"); + for (i = 0; i < stringContainersS.length; i++) { + stringContainersS[i].innerHTML = S(stringContainersS[i].innerHTML); + stringContainersS[i].classList.add("langFinished"); + stringContainersS[i].hidden = false; + } + let stringContainersD = document.querySelectorAll("x-du:not(.langFinished)"); + for (i = 0; i < stringContainersD.length; i++) { + stringContainersD[i].innerHTML = D(stringContainersD[i].innerHTML); + stringContainersD[i].classList.add("langFinished"); + stringContainersD[i].hidden = false; + } +} +async function setLangConfigAndReload() { + let promises_to_run = [ + /* localforage.setItem("chosenCapitalize", true), */ // F for unused code + localforage.setItem("chosenLang", "<@?g app_default_language@>") + ]; + await Promise.all(promises_to_run); + window.location.reload(); +} +window.addEventListener("DOMContentLoaded", () => { + find_chosen_lang(); +}); + +async function find_chosen_lang() { + let value = await localforage.getItem("chosenLang"); + if(value == null) { + setLangConfigAndReload(); + } else { + chosenLang = value; + } + refreshLangDOM(); +} + +const capitalize = (s) => { + if (typeof s !== 'string') return '' + return s.charAt(0).toUpperCase() + s.slice(1) +} +var s = function(whatString) { + return getLang.s(whatString); +}; +var d = function(whatString) { + return getLang.d(whatString); +}; +var S = function(whatString) { + return getLang.S(whatString); +}; +var D = function(whatString) { + return getLang.D(whatString); +}; +var getLang = { // language object + s: function(whatString) { // get string + return langstrings[chosenLang][whatString]; + }, + S: function(whatString) { // get capitalized string + return capitalize(langstrings[chosenLang][whatString]); + }, + d: function(whatString) { // add a dot and get string + if(langstrings[chosenLang][whatString].slice(-1) != ".") { + return langstrings[chosenLang][whatString]+"."; + } else { + return langstrings[chosenLang][whatString]; + } + }, + D: function(whatString) { // add a dot and get capitalized string + if(langstrings[chosenLang][whatString].slice(-1) != ".") { + return capitalize(langstrings[chosenLang][whatString]+"."); + } else { + return capitalize(langstrings[chosenLang][whatString]); + } + }, +} +var langstrings = { + en: { + miscTranslationLanguage: "English", + miscTranslationAuthors: "Rok Štular", + "": "", + // date + monday: "monday", + tuesday: "tuesday", + wednesday: "wednesday", + thursday: "thursday", + friday: "friday", + saturday: "saturday", + sunday: "sunday", + am: "am", + pm: "pm", + january: "january", + february: "february", + march: "march", + april: "april", + may: "may", + june: "june", + july: "july", + august: "august", + september: "september", + october: "october", + november: "november", + december: "december", + // login + username: "username", + password: "password", + signIn: "sign in", + bySigningInYouAgreeTo: "by signing in, you agree to", + theToS: "the terms and conditions", + and: "and", + thePrivacyPolicy: "the privacy policy", + thePrivacyPolicy_rodilnik: "the privacy policy", + loginFailed: "login failed", + browserNotSupported: "bežiapp won't work on your device, unless you update your Internet browser", + // index + timetable: "timetable", + gradings: "gradings", + grades: "grades", + teachers: "teachers", + absences: "absences", + messaging: "messaging", + meals: "meals", + about: "about", + logout: "logout", + settings: "settings", + // timetable + noPeriods: "no periods in selected week", + // gradings + date: "date", + description: "description", + add: "add", + requestFailed: "request failed", + addGrading: "add grading", + noInternetConnection: "no internet connection", + // grades + temporary: "temporary", + useOnlyPermanentGrades: "use only permanent grades", + useOnlyPermanentGradesNote1: "if checked, only permanent grades will be used in the average grade calculation", + useOnlyPermanentGradesNote2: "if left unchecked, the calculation will include every available grade", + type: "type", + term: "term", + teacher: "teacher", + zakljucneGradess: "grades in red are final grades that appear on your end-of-year certificate and are decided by your teacher. They are not averages like grades in black. Should you have any questions or complaints about them, contact your teacher", + // teachers + name: "name", + schoolSubject: "subject", + tpMeetings: "TP meetings", + // absences + from: "from", + to: "to", + cancel: "cancel", + ok: "ok", + noAbsences: "no absences in the chosen time period", + lesson: "lesson", + notProcessed: "not processed", + authorizedAbsence: "authorized", + unauthorizedAbsence: "unauthorized", + doesNotCount: "does not count", + // messaging + loadingMessages: "Loading messages...", + sendAMessage: "send a message", + send: "send", + recipient: "recipient", + messageSubject: "subject", + messageBody: "message body", + removeImages: "remove images", + note: "note", + largeImagesNote: "GimB servers don't like large messages, so only very small images may be attached or your message will not be delivered", + attachedImages: "attached images", + encryptMessage: "Encrypt message", + passwordForE2EE: "password for encrypting the message", + messages: "messages", + received: "received", + sent: "sent", + deleted: "deleted", + messageStorageUsed: "message storage used in this folder", + maxMessagesNote: "you can only have 120 messages per message folder, older messages will not be shown. Remember to delete read and sent messages regulary to avoid any issues.", + loadMessageBody: "load message body", + thisMessageWasEncrypted: "this message was encrypted", + enterPassword: "enter password", + decrypt: "decrypt", + nameDirectoryNotSet: "name directory not set, sending unavailable", + errorFetchingMessages: "error fetching messages", + unableToReceiveTheMessage: "unable to receive the message", + unableToDeleteTheMessage: "unable to delete the message", + messageWasProbablySent: "message was probably sent, check the Sent folder to be sure", + errorSendingMessage: "error sending message", + imageAddedAsAnAttachment: "image added as an attachment", + unableToReadDirectory: "unable to read directory of people", + messageCouldNotBeSent: "message could to be sent", + incorrectPassword: "incorrect password", + // chats + chat: "chat", + chattingWith: "chatting with", + noMessages: "no messages", + stillLoading: "loading is still in progress", + directory: "directory", + select: "select", + mustSelectRecipient: "you have to select a recipient before chatting. Open directory on the left side by clicking on the top left addressbook button and select a recipient in order to start chatting with them", + recipientNotInDirectory: "recipient is not in directory.", + chatExternalInfo: "you have just received a chat. Chats are not supported by GimSIS, so you must reply by changing the subject to something else. Chat body: ", + // meals + loginError: "login error", + loginToLopolis: "login to Lopolis", + loginToLopolisNote: "it seems like you're not currently logged in to eRestavracija, so this form has been presented to you. You have a different username and password combination used for applying and opting out of of menus. In order to use this feature, you have to log in with your Lopolis account.", + logInToLopolis: "log in to Lopolis", + logOutFromLopolis: "log out from Lopolis", + readOnly: "read only", + usage: "usage", + mealsUsageNote: "click on a date to open the collapsible menu with choices and click on a specific meal to select it. Reload the meals when you're done and check the entries.", + lunchesNote: "app was not tested with lunches in mind. Meals probably won't work with lunches and having a lunch subscription may even break its functionality.", + mealNotShownNote: "editable meals are highlighted in gold, read-only meals are highlighted in grey and cannot be changed. Meals that provide no options for menus are not shown for clarity, same applies for days where there are no meals", + mealsContributeNote: "you are welcome to contribute to the LopolisAPI project and add features, such as checkouts.", + authenticationError: "authentication error", + lopolisAPIConnectionError: "LopolisAPI server connection error", + errorGettingMenus: "error getting menus", + errorUnexpectedResponse: "error: unexpected response", + requestForAuthenticationFailed: "request for authentication failed", + credentialsMatch: "credentials match", + errorSettingMeals: "error setting meals", + mealSet: "meal set! Reload meals to be sure", + selected: "selected", + meal: "meal", + checkedOut: "checked out", + checkedIn: "checked in", + successfulCheckingInOut: "successfully checked in/out", + errorCheckingInOut: "failed to check in/out", + // about + version: "version", + authors: "authors", + translatorsForThisLanguage: "translators for this language", + whatIsNew: "what's new", + whatsNew: "what's new", + reportABug: "report a bug", + sendASuggestion: "send a suggestion", + instagram: "instagram", + // changelog + changelog: "changelog", + // terms and conditions + termsOfUse: "terms of use", + termsOfUseDescription: "as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App", + termsOfUseHarass: "to abuse, harass, threaten, impersonate or intimidate any person", + termsOfUsePost: "to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person", + termsOfUseCommunicate: "to communicate with the App developers or other users in abusive or offensive manner", + termsOfUsePurpose: "for any purpose that is not permitted under the laws of the jurisdiction where you use the App", + termsOfUseExploit: "to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user", + termsOfUseSpam: "to create or transmit unwanted “spam” to any person or any URL", + termsOfUseModify: "you may also not reverse engineer, modify or redistribute the app without written consent from the developers", + terminationOfServices: "termination of services", + terminationOfServicesDescriptions: "the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons", + terminationOfServicesBreaching: "breaching the Terms of Service", + terminationOfServicesRequest: "receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App", + limitationOfLiability: "limitation of Liability", + limitationOfLiabilityContent: "the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.", + tosAreEffectiveAsOf: "the Terms of Service are effective as of", + // privacy policy + privacyImportant: "your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.", + privacyOnlyAskedWhen: "we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.", + privacyDataCollection: "we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.", + privacySharingData: "we don’t share any personally identifying information publicly or with third-parties, except when required to by law", + privacyExternalSites: "our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.", + privacyRefuse: "you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.", + privacyAcceptWithUse: "your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.", + privacyEffectiveAsOf: "this policy is effective as of", + // settings + language: "language", + selectLanguage: "select desired language", + languageSet: "language set, open another page for the changes to take effect", + theme: "theme", + themeLight: "light theme (default)", + themeDark: "dark theme", + themeNight: "night theme", + selectTheme: "select a theme", + triggerWarning: "the following switch enables additional settings, which some people may: disagree with, find annoying, be offended by them. By enabling the switch, you agree that you won't be triggered by any of the additional options and will not asociate any of the authors and/or their personal beliefs and opinions with additional options.", + triggerAgreement: "i agree with terms and conditions stated above", + triggerWarningSet: "additional settings toggled", + additionalOptions: "additional settings", + themeSet: "theme set, open another page for the changes to take effect", + errorReportingSet: "error reporting preference set", + errorReporting: "error reporting", + on: "on", + off: "off", + selectErrorReporting: "should error reports be submitted to the developers?", + // gsec + gsecErrNet: "GimSIS connection error", + gsecErrLogin: "GimSIS login error (bad password?), try logging out", + gsecErrOther: "GimSIS unknown error, try logging out", + // videoconferences + videoconferences: "GimB meet" + }, + sl: { + miscTranslationLanguage: "slovenščina", + miscTranslationAuthors: "Anton Luka Šijanec", + "": "", + // date + monday: "ponedeljek", + tuesday: "torek", + wednesday: "sreda", + thursday: "četrtek", + friday: "petek", + saturday: "sobota", + sunday: "nedelja", + am: "dop.", + pm: "pop.", + january: "januar", + february: "februar", + march: "marec", + april: "april", + may: "maj", + june: "junij", + july: "julij", + august: "avgust", + september: "september", + october: "oktober", + november: "november", + december: "december", + // login + username: "uporabniško ime", + password: "geslo", + signIn: "prijava", + bySigningInYouAgreeTo: "s prijavo se strinjate s", + theToS: "pogoji uporabe (v angleščini)", + and: "in", + thePrivacyPolicy: "politika zasebnosti (v angleščini)", + thePrivacyPolicy_rodilnik: "politiko zasebnosti (v angleščini)", + loginFailed: "prijava je spodletela", + browserNotSupported: "BežiApp ne bo deloval na vaši napravi, če ne posodobite vašega Internetnega brskalnika", + // timetable + noPeriods: "ni ur v izbranem tednu", + // index + timetable: "urnik", + gradings: "ocenjevanja", + grades: "ocene", + teachers: "profesorji", + absences: "izostanki", + messaging: "sporočanje", + meals: "obroki", + about: "o", + logout: "odjava", + settings: "nastavitve", + // gradings + date: "datum", + description: "opis", + add: "dodaj", + requestFailed: "zahteva spodletela", + addGrading: "dodaj ocenjevanje", + noInternetConnection: "ni povezave s spletom", + // grades + temporary: "začasno", + useOnlyPermanentGrades: "uporabi le stalne ocene", + useOnlyPermanentGradesNote1: "če je označeno, bodo za izračun povprečja uporabljene le stalne ocene", + useOnlyPermanentGradesNote2: "če pa je polje neoznačeno, pa se ob izračunu povprečne ocene upoštevajo vse ocene", + type: "tip", + term: "rok", + teacher: "profesor", + zakljucneGradess: "zaključne ocene, ki bodo na spričevalu, so označene z rdečo, povprečja ocen pa so v črni barvi. V kolikor imate kakršnekoli pritožbe ali vprašanja glede zaključnih ocen, povprašajte profesorja", + // teachers + name: "ime", + schoolSubject: "predmet", + tpMeetings: "govorilne ure", + // absences + from: "od", + to: "do", + cancel: "prekliči", + ok: "v redu", + noAbsences: "ni izostankov v izbranem časovnem obdobju", + lesson: "ura", + notProcessed: "ni obdelano", + authorizedAbsence: "opravičeno", + unauthorizedAbsence: "neopravičeno", + doesNotCount: "ne šteje", + // messaging + loadingMessages: "Nalagam sporočila...", + sendAMessage: "pošlji sporočilo", + send: "pošlji", + recipient: "prejemnik", + messageSubject: "zadeva", + messageBody: "telo", + removeImages: "odstrani slike", + note: "opomba", + largeImagesNote: "GimB strežniki ne marajo velikih sporočil, zato lahko pošiljate le zelo majhne slike, v nasprotnem primeru sporočilo ne bo dostavljeno", + attachedImages: "pripete slike", + encryptMessage: "Šifriraj sporočilo", + passwordForE2EE: "geslo za šifriranje sporočila", + messages: "sporočila", + received: "prejeta", + sent: "poslana", + deleted: "izbrisana", + messageStorageUsed: "zasedenost shrambe sporočil v tej mapi", + maxMessagesNote: "v vsaki mapi imate lahko največ 120 sporočil. Starejša sporočila ne bodo prikazana. Redno brišite sporočila, da se izognete morebitnim težavam.", + loadMessageBody: "naloži telo sporočila", + thisMessageWasEncrypted: "to sporočilo je šifrirano", + enterPassword: "vnesite geslo", + decrypt: "dešifriraj", + nameDirectoryNotSet: "imenik ni nastavljen, pošiljanje ni mogoče", + errorFetchingMessages: "sporočil ni bilo mogoče prenesti", + unableToReceiveTheMessage: "sporočila ni bilo mogoče prenesti", + unableToDeleteTheMessage: "sporočila ni bilo mogoče izbrisati", + messageWasProbablySent: "sporočilo je bilo verjetno poslano, prepričajte se in preverite mapo s poslanimi sporočili", + errorSendingMessage: "sporočila ni bilo mogoče poslati", + imageAddedAsAnAttachment: "slika dodana kot priloga", + unableToReadDirectory: "imenika ni bilo mogoče prebrati", + messageCouldNotBeSent: "sporočila ni bilo mogoče poslati", + incorrectPassword: "nepravilno geslo", + // chats + chat: "klepet", + chattingWith: "klepet z osebo", + noMessages: "ni sporočil", + stillLoading: "nalaganje še poteka", + directory: "imenik", + select: "izberi", + mustSelectRecipient: "pred klepetom morate izbrati sogovornika. Odprite imenik (meni na levi strani) s pritiskom na gumb \"imenik\" zgoraj desno in izberite sogovornika.", + recipientNotInDirectory: "izbrane osebe ni v imeniku", + chatExternalInfo: "dobili ste kratko sporočilo v standardu, ki ga GimSIS ne podpira. Pri odgovarjanju spremenite zadevo. Vsebina sporočila: ", + // meals + loginError: "napaka pri prijavi", + loginToLopolis: "prijava v Lopolis", + loginToLopolisNote: "izgleda, da niste prijavljeni v eRestavracijo, zato se vam je prikazal prijavni obrazec. Za uporavljanje s prehrano se uporablja druga kombinacija uporabniškega imena in gesla, zato se prijavite s svojimi Lopolis prijavnimi podatki za nadaljevanje.", + logInToLopolis: "prijava v Lopolis", + logOutFromLopolis: "odjava iz Lopolisa", + readOnly: "samo za branje", + usage: "uporaba", + mealsUsageNote: "kliknite na datum za prikaz menijev, nato pa si enega izberite s klikom na ime menija. Po nastavitvi menijev ponovno naložite menije in se prepričajte o pravilnih nastavitvah.", + lunchesNote: "aplikacija ni testirana za naročanje na kosila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.", + mealNotShownNote: "obroki, označeni z zlato so nastavljivi, tisti, označeni s sivo, niso, če pa pri kakšnem dnevu obroka ni, pa pomeni, da ga ni moč nastaviti ali pa da ne obrok ne obstaja", + mealsContributeNote: "vabimo vas k urejanju LopolisAPI programa za upravljanje z meniji.", + authenticationError: "napaka avtentikacije", + lopolisAPIConnectionError: "napaka povezave na LopolisAPI strežnik", + errorGettingMenus: "napaka branja menijev", + errorUnexpectedResponse: "napaka: nepričakovan odgovor", + requestForAuthenticationFailed: "zahteva za avtentikacijo ni uspela", + credentialsMatch: "prijavni podatki so pravilni", + errorSettingMeals: "napaka pri nastavljanju menijev", + mealSet: "obrok nastavljen! osvežite obroke in se prepričajte sami", + selected: "izbrano", + meal: "obrok", + checkedOut: "odjavljen", + checkedIn: "prijavljen", + errorCheckingInOut: "prijava/odjava na obrok NI uspela", + successfulCheckingInOut: "prijava/odjava na obrok je uspela", + // about + version: "različica", + authors: "avtorji", + translatorsForThisLanguage: "prevajalci izbranega jezika", + whatIsNew: "kaj je novega", + whatsNew: "kaj je novega", + reportABug: "prijavite napako", + sendASuggestion: "pošljite pripombo/predlog/pohvalo/pritožbo", + instagram: "instagram", + // changelog + changelog: "dnevnik sprememb", + // terms and conditions + termsOfUse: "terms of use", + termsOfUseDescription: "as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App", + termsOfUseHarass: "to abuse, harass, threaten, impersonate or intimidate any person", + termsOfUsePost: "to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person", + termsOfUseCommunicate: "to communicate with the App developers or other users in abusive or offensive manner", + termsOfUsePurpose: "for any purpose that is not permitted under the laws of the jurisdiction where you use the App", + termsOfUseExploit: "to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user", + termsOfUseSpam: "to create or transmit unwanted “spam” to any person or any URL", + termsOfUseModify: "you may also not reverse engineer, modify or redistribute the app without written consent from the developers", + terminationOfServices: "termination of services", + terminationOfServicesDescriptions: "the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons", + terminationOfServicesBreaching: "breaching the Terms of Service", + terminationOfServicesRequest: "receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App", + limitationOfLiability: "limitation of Liability", + limitationOfLiabilityContent: "the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.", + tosAreEffectiveAsOf: "the Terms of Service are effective as of", + // privacy policy + privacyImportant: "your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.", + privacyOnlyAskedWhen: "we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.", + privacyDataCollection: "we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.", + privacySharingData: "we don’t share any personally identifying information publicly or with third-parties, except when required to by law", + privacyExternalSites: "our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.", + privacyRefuse: "you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.", + privacyAcceptWithUse: "your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.", + privacyEffectiveAsOf: "this policy is effective as of", + // settings + language: "jezik", + selectLanguage: "izberite željen jezik", + languageSet: "jezik nastavljen, odprite neko drugo stran da se pokažejo spremembe", + theme: "izgled", + themeLight: "svetel izgled (privzeto)", + themeDark: "temen izgled", + themeNight: "nočni izgled", + themeSet: "izgled nastavljen, odprite neko drugo stran da se spremembe uveljavijo", + selectTheme: "izberite željen izgled", + errorReportingSet: "nastavitev pošiljanja napak izbrana", + errorReporting: "pošiljanje napak", + on: "vklopljeno", + off: "izklopljeno", + selectErrorReporting: "ali naj so napake v aplikaciji posredovane razvijalcem?", + triggerWarning: "spodnji gumb omogoči dodatne možnosti, ki lahko razburijo/vznevoljijo nekatere uporabnike. Če omogočite stikalo, se strinjate, da avtorjev in/ali njihovih osebnih prepričanj ne boste povezovali s katerokoli od dodatnih omogočenih možnosti", + triggerAgreement: "strinjam se z zgoraj navedenimi pogoji", + triggerWarningSet: "spremenili ste stanje dodatnih nastavitev", + additionalOptions: "dodatne nastavitve", + // gsec + gsecErrNet: "napaka povezave na GimSIS", + gsecErrLogin: "prijava v GimSIS ni uspela (napačno geslo?), poskusite se odjaviti", + gsecErrOther: "neznana napaka GimSISa, poskusite se odjaviti", + // videoconferences + videoconferences: "GimB konference" + } +} diff --git a/assets/js/setup-storage.js b/assets/js/setup-storage.js deleted file mode 100644 index b29c959..0000000 --- a/assets/js/setup-storage.js +++ /dev/null @@ -1,43 +0,0 @@ -async function setupStorage(force = false) { - let logged_in; - promises_check_if_already_installed = [ - localforage.getItem("logged_in").then(function (val) { - console.log("[setupStorage] logged in status: " + val); - logged_in = val; - }) - ]; - await Promise.all(promises_check_if_already_installed); - - let promises_update = [ - localforage.setItem("profile", {}), - localforage.setItem("timetable", []), - localforage.setItem("teachers", []), - localforage.setItem("gradings", []), - localforage.setItem("grades", []), - localforage.setItem("absences", {}), - localforage.setItem("messages", [[], [], []]), // see messages.js:129, commit 8eb9ca9caca30fbbe023243657535ab4088be377 - localforage.setItem("directory", {}), //\\ well I could remember my own code but I didn't. - localforage.setItem("meals", {}), - localforage.setItem("chosenLang", "en"), - localforage.setItem("theme", "light"), - localforage.setItem("errorReporting", "on"), - localforage.setItem("lastUpdate", 0), - localforage.setItem("triggerWarningAccepted", false) - ]; - - if (logged_in && force == false) { // torej, če je že bila prijava narejena, ne posodobi backwards-compatible vrednosti (username, password,...) - await Promise.all(promises_update); - console.log("[setupStorage] user logged in: only updated"); - } else { - - let promises_first_install = [ - localforage.setItem("logged_in", false), - localforage.setItem("username", ""), - localforage.setItem("password", ""), - ]; - await localforage.clear(); - await Promise.all(promises_first_install); - await Promise.all(promises_update); - console.log("[setupStorage] user not logged in: set up whole database"); - } -} diff --git a/assets/js/setup-storage.js.bvr b/assets/js/setup-storage.js.bvr new file mode 100644 index 0000000..3d3b554 --- /dev/null +++ b/assets/js/setup-storage.js.bvr @@ -0,0 +1,45 @@ +<@?i global@> +// @begin=js@ +async function setupStorage(force = false) { + let logged_in; + promises_check_if_already_installed = [ + localforage.getItem("logged_in").then(function (val) { + console.log("[setupStorage] logged in status: " + val); + logged_in = val; + }) + ]; + await Promise.all(promises_check_if_already_installed); + + let promises_update = [ + localforage.setItem("profile", {}), + localforage.setItem("timetable", []), + localforage.setItem("teachers", []), + localforage.setItem("gradings", []), + localforage.setItem("grades", []), + localforage.setItem("absences", {}), + localforage.setItem("messages", [[], [], []]), // see messages.js:129, commit 8eb9ca9caca30fbbe023243657535ab4088be377 + localforage.setItem("directory", {}), //\\ well I could remember my own code but I didn't. + localforage.setItem("meals", {}), + localforage.setItem("lastUpdate", 0), + localforage.setItem("triggerWarningAccepted", false) + ]; + + if (logged_in && force == false) { // torej, če je že bila prijava narejena, ne posodobi backwards-compatible vrednosti (username, password,...) + await Promise.all(promises_update); + console.log("[setupStorage] user logged in: only updated"); + } else { + + let promises_first_install = [ + localforage.setItem("logged_in", false), + localforage.setItem("username", ""), + localforage.setItem("password", ""), + localforage.setItem("chosenLang", "<@?g app_default_language@>"), + localforage.setItem("theme", "light"), + localforage.setItem("errorReporting", "on"), + ]; + await localforage.clear(); + await Promise.all(promises_first_install); + await Promise.all(promises_update); + console.log("[setupStorage] user not logged in: set up whole database"); + } +} diff --git a/assets/root/login.html b/assets/root/login.html index 95bcc2e..8a2c532 100644 --- a/assets/root/login.html +++ b/assets/root/login.html @@ -57,7 +57,7 @@

bySigningInYouAgreeTo theToS and - thePrivacyPolicy + thePrivacyPolicy_rodilnik

diff --git a/dist/cache_name.txt b/dist/cache_name.txt index c25c4f4..cff4c21 100755 --- a/dist/cache_name.txt +++ b/dist/cache_name.txt @@ -2,4 +2,5 @@ -///site-static-1.0.16.1-beta-4734866||| + +///site-static-1.0.16.2-beta-90dfb78||| diff --git a/dist/js/app.js b/dist/js/app.js index db89d67..6d1226e 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -2,9 +2,10 @@ -// @begin=html@ -const app_version = "1.0.16.1-beta"; -const previous_commit = "473486647475ee26470fc33f5eb95f51b00fdcc5"; + +// @begin=js@ +const app_version = "1.0.16.2-beta"; +const previous_commit = "90dfb784cc11a8cc52e3cfb063273f44849f62a1"; const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund if ("serviceWorker" in navigator) { diff --git a/dist/js/lang/bundle.js b/dist/js/lang/bundle.js index eecd450..41567f3 100755 --- a/dist/js/lang/bundle.js +++ b/dist/js/lang/bundle.js @@ -1,12 +1,542 @@ -var chosenLang;var dateString={day:(danv)=>{let dnevitedna=[S("sunday"),S("monday"),S("tuesday"),S("wednesday"),S("thursday"),S("friday"),S("saturday")];return dnevitedna[danv];},month:(mesl)=>{let mesecileta=[S("january"),S("february"),S("march"),S("april"),S("may"),S("june"),S("july"),S("august"),S("september"),S("october"),S("november"),S("december")];return mesecileta[mesl];},longFormatted:(dateObject)=>{return`${dateString.day(dateObject.getDay())}, ${(dateObject.getDate())}. ${dateString.month(dateObject.getMonth())} ${dateObject.getFullYear()}`;}};async function refreshLangDOM(){let promises_to_runn=[localforage.getItem("chosenLang").then((value)=>{chosenLang=value;})];await Promise.all(promises_to_runn);let stringContainerss=document.querySelectorAll("x-sl:not(.langFinished)");for(i=0;i{find_chosen_lang();});async function find_chosen_lang(){let value=await localforage.getItem("chosenLang");if(value==null){setLangConfigAndReload();}else{chosenLang=value;} -refreshLangDOM();} -const capitalize=(s)=>{if(typeof s!=='string')return'' -return s.charAt(0).toUpperCase()+s.slice(1)} -var s=function(whatString){return getLang.s(whatString);};var d=function(whatString){return getLang.d(whatString);};var S=function(whatString){return getLang.S(whatString);};var D=function(whatString){return getLang.D(whatString);};var getLang={s:function(whatString){return langstrings[chosenLang][whatString];},S:function(whatString){return capitalize(langstrings[chosenLang][whatString]);},d:function(whatString){if(langstrings[chosenLang][whatString].slice(-1)!="."){return langstrings[chosenLang][whatString]+".";}else{return langstrings[chosenLang][whatString];}},D:function(whatString){if(langstrings[chosenLang][whatString].slice(-1)!="."){return capitalize(langstrings[chosenLang][whatString]+".");}else{return capitalize(langstrings[chosenLang][whatString]);}},} -var langstrings={en:{miscTranslationLanguage:"English",miscTranslationAuthors:"Rok Štular","":"",monday:"monday",tuesday:"tuesday",wednesday:"wednesday",thursday:"thursday",friday:"friday",saturday:"saturday",sunday:"sunday",am:"am",pm:"pm",january:"january",february:"february",march:"march",april:"april",may:"may",june:"june",july:"july",august:"august",september:"september",october:"october",november:"november",december:"december",username:"username",password:"password",signIn:"sign in",bySigningInYouAgreeTo:"by signing in, you agree to",theToS:"the terms and conditions",and:"and",thePrivacyPolicy:"the privacy policy",loginFailed:"login failed",browserNotSupported:"bežiapp won't work on your device, unless you update your Internet browser",timetable:"timetable",gradings:"gradings",grades:"grades",teachers:"teachers",absences:"absences",messaging:"messaging",meals:"meals",about:"about",logout:"logout",settings:"settings",noPeriods:"no periods in selected week",date:"date",description:"description",add:"add",requestFailed:"request failed",addGrading:"add grading",noInternetConnection:"no internet connection",temporary:"temporary",useOnlyPermanentGrades:"use only permanent grades",useOnlyPermanentGradesNote1:"if checked, only permanent grades will be used in the average grade calculation",useOnlyPermanentGradesNote2:"if left unchecked, the calculation will include every available grade",type:"type",term:"term",teacher:"teacher",zakljucneGradess:"grades in red are final grades that appear on your end-of-year certificate and are decided by your teacher. They are not averages like grades in black. Should you have any questions or complaints about them, contact your teacher",name:"name",schoolSubject:"subject",tpMeetings:"TP meetings",from:"from",to:"to",cancel:"cancel",ok:"ok",noAbsences:"no absences in the chosen time period",lesson:"lesson",notProcessed:"not processed",authorizedAbsence:"authorized",unauthorizedAbsence:"unauthorized",doesNotCount:"does not count",loadingMessages:"Loading messages...",sendAMessage:"send a message",send:"send",recipient:"recipient",messageSubject:"subject",messageBody:"message body",removeImages:"remove images",note:"note",largeImagesNote:"GimB servers don't like large messages, so only very small images may be attached or your message will not be delivered",attachedImages:"attached images",encryptMessage:"Encrypt message",passwordForE2EE:"password for encrypting the message",messages:"messages",received:"received",sent:"sent",deleted:"deleted",messageStorageUsed:"message storage used in this folder",maxMessagesNote:"you can only have 120 messages per message folder, older messages will not be shown. Remember to delete read and sent messages regulary to avoid any issues.",loadMessageBody:"load message body",thisMessageWasEncrypted:"this message was encrypted",enterPassword:"enter password",decrypt:"decrypt",nameDirectoryNotSet:"name directory not set, sending unavailable",errorFetchingMessages:"error fetching messages",unableToReceiveTheMessage:"unable to receive the message",unableToDeleteTheMessage:"unable to delete the message",messageWasProbablySent:"message was probably sent, check the Sent folder to be sure",errorSendingMessage:"error sending message",imageAddedAsAnAttachment:"image added as an attachment",unableToReadDirectory:"unable to read directory of people",messageCouldNotBeSent:"message could to be sent",incorrectPassword:"incorrect password",chat:"chat",chattingWith:"chatting with",noMessages:"no messages",stillLoading:"loading is still in progress",directory:"directory",select:"select",mustSelectRecipient:"you have to select a recipient before chatting. Open directory on the left side by clicking on the top left addressbook button and select a recipient in order to start chatting with them",recipientNotInDirectory:"recipient is not in directory.",chatExternalInfo:"you have just received a chat. Chats are not supported by GimSIS, so you must reply by changing the subject to something else. Chat body: ",loginError:"login error",loginToLopolis:"login to Lopolis",loginToLopolisNote:"it seems like you're not currently logged in to eRestavracija, so this form has been presented to you. You have a different username and password combination used for applying and opting out of of menus. In order to use this feature, you have to log in with your Lopolis account.",logInToLopolis:"log in to Lopolis",logOutFromLopolis:"log out from Lopolis",readOnly:"read only",usage:"usage",mealsUsageNote:"click on a date to open the collapsible menu with choices and click on a specific meal to select it. Reload the meals when you're done and check the entries.",lunchesNote:"app was not tested with lunches in mind. Meals probably won't work with lunches and having a lunch subscription may even break its functionality.",mealNotShownNote:"editable meals are highlighted in gold, read-only meals are highlighted in grey and cannot be changed. Meals that provide no options for menus are not shown for clarity, same applies for days where there are no meals",mealsContributeNote:"you are welcome to contribute to the LopolisAPI project and add features, such as checkouts.",authenticationError:"authentication error",lopolisAPIConnectionError:"LopolisAPI server connection error",errorGettingMenus:"error getting menus",errorUnexpectedResponse:"error: unexpected response",requestForAuthenticationFailed:"request for authentication failed",credentialsMatch:"credentials match",errorSettingMeals:"error setting meals",mealSet:"meal set! Reload meals to be sure",selected:"selected",meal:"meal",checkedOut:"checked out",checkedIn:"checked in",successfulCheckingInOut:"successfully checked in/out",errorCheckingInOut:"failed to check in/out",version:"version",authors:"authors",translatorsForThisLanguage:"translators for this language",whatIsNew:"what's new",whatsNew:"what's new",reportABug:"report a bug",sendASuggestion:"send a suggestion",instagram:"instagram",changelog:"changelog",termsOfUse:"terms of use",termsOfUseDescription:"as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App",termsOfUseHarass:"to abuse, harass, threaten, impersonate or intimidate any person",termsOfUsePost:"to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person",termsOfUseCommunicate:"to communicate with the App developers or other users in abusive or offensive manner",termsOfUsePurpose:"for any purpose that is not permitted under the laws of the jurisdiction where you use the App",termsOfUseExploit:"to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user",termsOfUseSpam:"to create or transmit unwanted “spam” to any person or any URL",termsOfUseModify:"you may also not reverse engineer, modify or redistribute the app without written consent from the developers",terminationOfServices:"termination of services",terminationOfServicesDescriptions:"the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons",terminationOfServicesBreaching:"breaching the Terms of Service",terminationOfServicesRequest:"receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App",limitationOfLiability:"limitation of Liability",limitationOfLiabilityContent:"the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.",tosAreEffectiveAsOf:"the Terms of Service are effective as of",privacyImportant:"your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.",privacyOnlyAskedWhen:"we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.",privacyDataCollection:"we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.",privacySharingData:"we don’t share any personally identifying information publicly or with third-parties, except when required to by law",privacyExternalSites:"our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.",privacyRefuse:"you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.",privacyAcceptWithUse:"your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.",privacyEffectiveAsOf:"this policy is effective as of",language:"language",selectLanguage:"select desired language",languageSet:"language set, open another page for the changes to take effect",theme:"theme",themeLight:"light theme (default)",themeDark:"dark theme",themeNight:"night theme",selectTheme:"select a theme",triggerWarning:"the following switch enables additional settings, which some people may: disagree with, find annoying, be offended by them. By enabling the switch, you agree that you won't be triggered by any of the additional options and will not asociate any of the authors and/or their personal beliefs and opinions with additional options.",triggerAgreement:"i agree with terms and conditions stated above",triggerWarningSet:"additional settings toggled",additionalOptions:"additional settings",themeSet:"theme set, open another page for the changes to take effect",errorReportingSet:"error reporting preference set",errorReporting:"error reporting",on:"on",off:"off",selectErrorReporting:"should error reports be submitted to the developers?",gsecErrNet:"GimSIS connection error",gsecErrLogin:"GimSIS login error (bad password?), try logging out",gsecErrOther:"GimSIS unknown error, try logging out",videoconferences:"GimB meet"},sl:{miscTranslationLanguage:"slovenščina",miscTranslationAuthors:"Anton Luka Šijanec","":"",monday:"ponedeljek",tuesday:"torek",wednesday:"sreda",thursday:"četrtek",friday:"petek",saturday:"sobota",sunday:"nedelja",am:"dop.",pm:"pop.",january:"januar",february:"februar",march:"marec",april:"april",may:"maj",june:"junij",july:"julij",august:"avgust",september:"september",october:"oktober",november:"november",december:"december",username:"uporabniško ime",password:"geslo",signIn:"prijava",bySigningInYouAgreeTo:"s prijavo se strinjate s",theToS:"pogoji uporabe (v angleščini)",and:"in",thePrivacyPolicy:"politika zasebnosti (v angleščini)",loginFailed:"prijava je spodletela",browserNotSupported:"BežiApp ne bo deloval na vaši napravi, če ne posodobite vašega Internetnega brskalnika",noPeriods:"ni ur v izbranem tednu",timetable:"urnik",gradings:"ocenjevanja",grades:"ocene",teachers:"profesorji",absences:"izostanki",messaging:"sporočanje",meals:"obroki",about:"o",logout:"odjava",settings:"nastavitve",date:"datum",description:"opis",add:"dodaj",requestFailed:"zahteva spodletela",addGrading:"dodaj ocenjevanje",noInternetConnection:"ni povezave s spletom",temporary:"začasno",useOnlyPermanentGrades:"uporabi le stalne ocene",useOnlyPermanentGradesNote1:"če je označeno, bodo za izračun povprečja uporabljene le stalne ocene",useOnlyPermanentGradesNote2:"če pa je polje neoznačeno, pa se ob izračunu povprečne ocene upoštevajo vse ocene",type:"tip",term:"rok",teacher:"profesor",zakljucneGradess:"zaključne ocene, ki bodo na spričevalu, so označene z rdečo, povprečja ocen pa so v črni barvi. V kolikor imate kakršnekoli pritožbe ali vprašanja glede zaključnih ocen, povprašajte profesorja",name:"ime",schoolSubject:"predmet",tpMeetings:"govorilne ure",from:"od",to:"do",cancel:"prekliči",ok:"v redu",noAbsences:"ni izostankov v izbranem časovnem obdobju",lesson:"ura",notProcessed:"ni obdelano",authorizedAbsence:"opravičeno",unauthorizedAbsence:"neopravičeno",doesNotCount:"ne šteje",loadingMessages:"Nalagam sporočila...",sendAMessage:"pošlji sporočilo",send:"pošlji",recipient:"prejemnik",messageSubject:"zadeva",messageBody:"telo",removeImages:"odstrani slike",note:"opomba",largeImagesNote:"GimB strežniki ne marajo velikih sporočil, zato lahko pošiljate le zelo majhne slike, v nasprotnem primeru sporočilo ne bo dostavljeno",attachedImages:"pripete slike",encryptMessage:"Šifriraj sporočilo",passwordForE2EE:"geslo za šifriranje sporočila",messages:"sporočila",received:"prejeta",sent:"poslana",deleted:"izbrisana",messageStorageUsed:"zasedenost shrambe sporočil v tej mapi",maxMessagesNote:"v vsaki mapi imate lahko največ 120 sporočil. Starejša sporočila ne bodo prikazana. Redno brišite sporočila, da se izognete morebitnim težavam.",loadMessageBody:"naloži telo sporočila",thisMessageWasEncrypted:"to sporočilo je šifrirano",enterPassword:"vnesite geslo",decrypt:"dešifriraj",nameDirectoryNotSet:"imenik ni nastavljen, pošiljanje ni mogoče",errorFetchingMessages:"sporočil ni bilo mogoče prenesti",unableToReceiveTheMessage:"sporočila ni bilo mogoče prenesti",unableToDeleteTheMessage:"sporočila ni bilo mogoče izbrisati",messageWasProbablySent:"sporočilo je bilo verjetno poslano, prepričajte se in preverite mapo s poslanimi sporočili",errorSendingMessage:"sporočila ni bilo mogoče poslati",imageAddedAsAnAttachment:"slika dodana kot priloga",unableToReadDirectory:"imenika ni bilo mogoče prebrati",messageCouldNotBeSent:"sporočila ni bilo mogoče poslati",incorrectPassword:"nepravilno geslo",chat:"klepet",chattingWith:"klepet z osebo",noMessages:"ni sporočil",stillLoading:"nalaganje še poteka",directory:"imenik",select:"izberi",mustSelectRecipient:"pred klepetom morate izbrati sogovornika. Odprite imenik (meni na levi strani) s pritiskom na gumb \"imenik\" zgoraj desno in izberite sogovornika.",recipientNotInDirectory:"izbrane osebe ni v imeniku",chatExternalInfo:"dobili ste kratko sporočilo v standardu, ki ga GimSIS ne podpira. Pri odgovarjanju spremenite zadevo. Vsebina sporočila: ",loginError:"napaka pri prijavi",loginToLopolis:"prijava v Lopolis",loginToLopolisNote:"izgleda, da niste prijavljeni v eRestavracijo, zato se vam je prikazal prijavni obrazec. Za uporavljanje s prehrano se uporablja druga kombinacija uporabniškega imena in gesla, zato se prijavite s svojimi Lopolis prijavnimi podatki za nadaljevanje.",logInToLopolis:"prijava v Lopolis",logOutFromLopolis:"odjava iz Lopolisa",readOnly:"samo za branje",usage:"uporaba",mealsUsageNote:"kliknite na datum za prikaz menijev, nato pa si enega izberite s klikom na ime menija. Po nastavitvi menijev ponovno naložite menije in se prepričajte o pravilnih nastavitvah.",lunchesNote:"aplikacija ni testirana za naročanje na kosila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.",mealNotShownNote:"obroki, označeni z zlato so nastavljivi, tisti, označeni s sivo, niso, če pa pri kakšnem dnevu obroka ni, pa pomeni, da ga ni moč nastaviti ali pa da ne obrok ne obstaja",mealsContributeNote:"vabimo vas k urejanju LopolisAPI programa za upravljanje z meniji.",authenticationError:"napaka avtentikacije",lopolisAPIConnectionError:"napaka povezave na LopolisAPI strežnik",errorGettingMenus:"napaka branja menijev",errorUnexpectedResponse:"napaka: nepričakovan odgovor",requestForAuthenticationFailed:"zahteva za avtentikacijo ni uspela",credentialsMatch:"prijavni podatki so pravilni",errorSettingMeals:"napaka pri nastavljanju menijev",mealSet:"obrok nastavljen! osvežite obroke in se prepričajte sami",selected:"izbrano",meal:"obrok",checkedOut:"odjavljen",checkedIn:"prijavljen",errorCheckingInOut:"prijava/odjava na obrok NI uspela",successfulCheckingInOut:"prijava/odjava na obrok je uspela",version:"različica",authors:"avtorji",translatorsForThisLanguage:"prevajalci izbranega jezika",whatIsNew:"kaj je novega",whatsNew:"kaj je novega",reportABug:"prijavite napako",sendASuggestion:"pošljite pripombo/predlog/pohvalo/pritožbo",instagram:"instagram",changelog:"dnevnik sprememb",termsOfUse:"terms of use",termsOfUseDescription:"as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App",termsOfUseHarass:"to abuse, harass, threaten, impersonate or intimidate any person",termsOfUsePost:"to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person",termsOfUseCommunicate:"to communicate with the App developers or other users in abusive or offensive manner",termsOfUsePurpose:"for any purpose that is not permitted under the laws of the jurisdiction where you use the App",termsOfUseExploit:"to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user",termsOfUseSpam:"to create or transmit unwanted “spam” to any person or any URL",termsOfUseModify:"you may also not reverse engineer, modify or redistribute the app without written consent from the developers",terminationOfServices:"termination of services",terminationOfServicesDescriptions:"the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons",terminationOfServicesBreaching:"breaching the Terms of Service",terminationOfServicesRequest:"receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App",limitationOfLiability:"limitation of Liability",limitationOfLiabilityContent:"the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.",tosAreEffectiveAsOf:"the Terms of Service are effective as of",privacyImportant:"your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.",privacyOnlyAskedWhen:"we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.",privacyDataCollection:"we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.",privacySharingData:"we don’t share any personally identifying information publicly or with third-parties, except when required to by law",privacyExternalSites:"our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.",privacyRefuse:"you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.",privacyAcceptWithUse:"your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.",privacyEffectiveAsOf:"this policy is effective as of",language:"jezik",selectLanguage:"izberite željen jezik",languageSet:"jezik nastavljen, odprite neko drugo stran da se pokažejo spremembe",theme:"izgled",themeLight:"svetel izgled (privzeto)",themeDark:"temen izgled",themeNight:"nočni izgled",themeSet:"izgled nastavljen, odprite neko drugo stran da se spremembe uveljavijo",selectTheme:"izberite željen izgled",errorReportingSet:"nastavitev pošiljanja napak izbrana",errorReporting:"pošiljanje napak",on:"vklopljeno",off:"izklopljeno",selectErrorReporting:"ali naj so napake v aplikaciji posredovane razvijalcem?",triggerWarning:"spodnji gumb omogoči dodatne možnosti, ki lahko razburijo/vznevoljijo nekatere uporabnike. Če omogočite stikalo, se strinjate, da avtorjev in/ali njihovih osebnih prepričanj ne boste povezovali s katerokoli od dodatnih omogočenih možnosti",triggerAgreement:"strinjam se z zgoraj navedenimi pogoji",triggerWarningSet:"spremenili ste stanje dodatnih nastavitev",additionalOptions:"dodatne nastavitve",gsecErrNet:"napaka povezave na GimSIS",gsecErrLogin:"prijava v GimSIS ni uspela (napačno geslo?), poskusite se odjaviti",gsecErrOther:"neznana napaka GimSISa, poskusite se odjaviti",videoconferences:"GimB konference"}} \ No newline at end of file + + + + +// @begin=js@ +// there's an DoS backdoor in BežiApp because of this (-:< +var chosenLang; +var dateString = { + day: (danv) => { + let dnevitedna = [S("sunday"), S("monday"), S("tuesday"), S("wednesday"), S("thursday"), S("friday"), S("saturday")]; + return dnevitedna[danv]; + }, + month: (mesl) => { + let mesecileta = [S("january"), S("february"), S("march"), S("april"), S("may"), S("june"), S("july"), S("august"), S("september"), S("october"), S("november"), S("december")]; + return mesecileta[mesl]; + }, + longFormatted: (dateObject) => { + return `${dateString.day(dateObject.getDay())}, ${(dateObject.getDate())}. ${dateString.month(dateObject.getMonth())} ${dateObject.getFullYear()}`; + } +}; +async function refreshLangDOM() { + let promises_to_runn = [ + localforage.getItem("chosenLang").then( (value) => { + chosenLang = value; + }) + ]; + await Promise.all(promises_to_runn); + // this could be done nicer. p. s.: lahko bi se uporablil x-s in x-S za razločitev med capitalize in !capitalize queryselectorall ni case sensitive za imena elementov + let stringContainerss = document.querySelectorAll("x-sl:not(.langFinished)"); + for (i = 0; i < stringContainerss.length; i++) { + stringContainerss[i].innerHTML = s(stringContainerss[i].innerHTML); + stringContainerss[i].classList.add("langFinished"); + stringContainerss[i].hidden = false; + } + let stringContainersd = document.querySelectorAll("x-dl:not(.langFinished)"); + for (i = 0; i < stringContainersd.length; i++) { + stringContainersd[i].innerHTML = d(stringContainersd[i].innerHTML); + stringContainersd[i].classList.add("langFinished"); + stringContainersd[i].hidden = false; + } + let stringContainersS = document.querySelectorAll("x-su:not(.langFinished)"); + for (i = 0; i < stringContainersS.length; i++) { + stringContainersS[i].innerHTML = S(stringContainersS[i].innerHTML); + stringContainersS[i].classList.add("langFinished"); + stringContainersS[i].hidden = false; + } + let stringContainersD = document.querySelectorAll("x-du:not(.langFinished)"); + for (i = 0; i < stringContainersD.length; i++) { + stringContainersD[i].innerHTML = D(stringContainersD[i].innerHTML); + stringContainersD[i].classList.add("langFinished"); + stringContainersD[i].hidden = false; + } +} +async function setLangConfigAndReload() { + let promises_to_run = [ + /* localforage.setItem("chosenCapitalize", true), */ // F for unused code + localforage.setItem("chosenLang", "sl") + ]; + await Promise.all(promises_to_run); + window.location.reload(); +} +window.addEventListener("DOMContentLoaded", () => { + find_chosen_lang(); +}); + +async function find_chosen_lang() { + let value = await localforage.getItem("chosenLang"); + if(value == null) { + setLangConfigAndReload(); + } else { + chosenLang = value; + } + refreshLangDOM(); +} + +const capitalize = (s) => { + if (typeof s !== 'string') return '' + return s.charAt(0).toUpperCase() + s.slice(1) +} +var s = function(whatString) { + return getLang.s(whatString); +}; +var d = function(whatString) { + return getLang.d(whatString); +}; +var S = function(whatString) { + return getLang.S(whatString); +}; +var D = function(whatString) { + return getLang.D(whatString); +}; +var getLang = { // language object + s: function(whatString) { // get string + return langstrings[chosenLang][whatString]; + }, + S: function(whatString) { // get capitalized string + return capitalize(langstrings[chosenLang][whatString]); + }, + d: function(whatString) { // add a dot and get string + if(langstrings[chosenLang][whatString].slice(-1) != ".") { + return langstrings[chosenLang][whatString]+"."; + } else { + return langstrings[chosenLang][whatString]; + } + }, + D: function(whatString) { // add a dot and get capitalized string + if(langstrings[chosenLang][whatString].slice(-1) != ".") { + return capitalize(langstrings[chosenLang][whatString]+"."); + } else { + return capitalize(langstrings[chosenLang][whatString]); + } + }, +} +var langstrings = { + en: { + miscTranslationLanguage: "English", + miscTranslationAuthors: "Rok Štular", + "": "", + // date + monday: "monday", + tuesday: "tuesday", + wednesday: "wednesday", + thursday: "thursday", + friday: "friday", + saturday: "saturday", + sunday: "sunday", + am: "am", + pm: "pm", + january: "january", + february: "february", + march: "march", + april: "april", + may: "may", + june: "june", + july: "july", + august: "august", + september: "september", + october: "october", + november: "november", + december: "december", + // login + username: "username", + password: "password", + signIn: "sign in", + bySigningInYouAgreeTo: "by signing in, you agree to", + theToS: "the terms and conditions", + and: "and", + thePrivacyPolicy: "the privacy policy", + thePrivacyPolicy_rodilnik: "the privacy policy", + loginFailed: "login failed", + browserNotSupported: "bežiapp won't work on your device, unless you update your Internet browser", + // index + timetable: "timetable", + gradings: "gradings", + grades: "grades", + teachers: "teachers", + absences: "absences", + messaging: "messaging", + meals: "meals", + about: "about", + logout: "logout", + settings: "settings", + // timetable + noPeriods: "no periods in selected week", + // gradings + date: "date", + description: "description", + add: "add", + requestFailed: "request failed", + addGrading: "add grading", + noInternetConnection: "no internet connection", + // grades + temporary: "temporary", + useOnlyPermanentGrades: "use only permanent grades", + useOnlyPermanentGradesNote1: "if checked, only permanent grades will be used in the average grade calculation", + useOnlyPermanentGradesNote2: "if left unchecked, the calculation will include every available grade", + type: "type", + term: "term", + teacher: "teacher", + zakljucneGradess: "grades in red are final grades that appear on your end-of-year certificate and are decided by your teacher. They are not averages like grades in black. Should you have any questions or complaints about them, contact your teacher", + // teachers + name: "name", + schoolSubject: "subject", + tpMeetings: "TP meetings", + // absences + from: "from", + to: "to", + cancel: "cancel", + ok: "ok", + noAbsences: "no absences in the chosen time period", + lesson: "lesson", + notProcessed: "not processed", + authorizedAbsence: "authorized", + unauthorizedAbsence: "unauthorized", + doesNotCount: "does not count", + // messaging + loadingMessages: "Loading messages...", + sendAMessage: "send a message", + send: "send", + recipient: "recipient", + messageSubject: "subject", + messageBody: "message body", + removeImages: "remove images", + note: "note", + largeImagesNote: "GimB servers don't like large messages, so only very small images may be attached or your message will not be delivered", + attachedImages: "attached images", + encryptMessage: "Encrypt message", + passwordForE2EE: "password for encrypting the message", + messages: "messages", + received: "received", + sent: "sent", + deleted: "deleted", + messageStorageUsed: "message storage used in this folder", + maxMessagesNote: "you can only have 120 messages per message folder, older messages will not be shown. Remember to delete read and sent messages regulary to avoid any issues.", + loadMessageBody: "load message body", + thisMessageWasEncrypted: "this message was encrypted", + enterPassword: "enter password", + decrypt: "decrypt", + nameDirectoryNotSet: "name directory not set, sending unavailable", + errorFetchingMessages: "error fetching messages", + unableToReceiveTheMessage: "unable to receive the message", + unableToDeleteTheMessage: "unable to delete the message", + messageWasProbablySent: "message was probably sent, check the Sent folder to be sure", + errorSendingMessage: "error sending message", + imageAddedAsAnAttachment: "image added as an attachment", + unableToReadDirectory: "unable to read directory of people", + messageCouldNotBeSent: "message could to be sent", + incorrectPassword: "incorrect password", + // chats + chat: "chat", + chattingWith: "chatting with", + noMessages: "no messages", + stillLoading: "loading is still in progress", + directory: "directory", + select: "select", + mustSelectRecipient: "you have to select a recipient before chatting. Open directory on the left side by clicking on the top left addressbook button and select a recipient in order to start chatting with them", + recipientNotInDirectory: "recipient is not in directory.", + chatExternalInfo: "you have just received a chat. Chats are not supported by GimSIS, so you must reply by changing the subject to something else. Chat body: ", + // meals + loginError: "login error", + loginToLopolis: "login to Lopolis", + loginToLopolisNote: "it seems like you're not currently logged in to eRestavracija, so this form has been presented to you. You have a different username and password combination used for applying and opting out of of menus. In order to use this feature, you have to log in with your Lopolis account.", + logInToLopolis: "log in to Lopolis", + logOutFromLopolis: "log out from Lopolis", + readOnly: "read only", + usage: "usage", + mealsUsageNote: "click on a date to open the collapsible menu with choices and click on a specific meal to select it. Reload the meals when you're done and check the entries.", + lunchesNote: "app was not tested with lunches in mind. Meals probably won't work with lunches and having a lunch subscription may even break its functionality.", + mealNotShownNote: "editable meals are highlighted in gold, read-only meals are highlighted in grey and cannot be changed. Meals that provide no options for menus are not shown for clarity, same applies for days where there are no meals", + mealsContributeNote: "you are welcome to contribute to the LopolisAPI project and add features, such as checkouts.", + authenticationError: "authentication error", + lopolisAPIConnectionError: "LopolisAPI server connection error", + errorGettingMenus: "error getting menus", + errorUnexpectedResponse: "error: unexpected response", + requestForAuthenticationFailed: "request for authentication failed", + credentialsMatch: "credentials match", + errorSettingMeals: "error setting meals", + mealSet: "meal set! Reload meals to be sure", + selected: "selected", + meal: "meal", + checkedOut: "checked out", + checkedIn: "checked in", + successfulCheckingInOut: "successfully checked in/out", + errorCheckingInOut: "failed to check in/out", + // about + version: "version", + authors: "authors", + translatorsForThisLanguage: "translators for this language", + whatIsNew: "what's new", + whatsNew: "what's new", + reportABug: "report a bug", + sendASuggestion: "send a suggestion", + instagram: "instagram", + // changelog + changelog: "changelog", + // terms and conditions + termsOfUse: "terms of use", + termsOfUseDescription: "as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App", + termsOfUseHarass: "to abuse, harass, threaten, impersonate or intimidate any person", + termsOfUsePost: "to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person", + termsOfUseCommunicate: "to communicate with the App developers or other users in abusive or offensive manner", + termsOfUsePurpose: "for any purpose that is not permitted under the laws of the jurisdiction where you use the App", + termsOfUseExploit: "to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user", + termsOfUseSpam: "to create or transmit unwanted “spam” to any person or any URL", + termsOfUseModify: "you may also not reverse engineer, modify or redistribute the app without written consent from the developers", + terminationOfServices: "termination of services", + terminationOfServicesDescriptions: "the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons", + terminationOfServicesBreaching: "breaching the Terms of Service", + terminationOfServicesRequest: "receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App", + limitationOfLiability: "limitation of Liability", + limitationOfLiabilityContent: "the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.", + tosAreEffectiveAsOf: "the Terms of Service are effective as of", + // privacy policy + privacyImportant: "your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.", + privacyOnlyAskedWhen: "we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.", + privacyDataCollection: "we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.", + privacySharingData: "we don’t share any personally identifying information publicly or with third-parties, except when required to by law", + privacyExternalSites: "our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.", + privacyRefuse: "you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.", + privacyAcceptWithUse: "your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.", + privacyEffectiveAsOf: "this policy is effective as of", + // settings + language: "language", + selectLanguage: "select desired language", + languageSet: "language set, open another page for the changes to take effect", + theme: "theme", + themeLight: "light theme (default)", + themeDark: "dark theme", + themeNight: "night theme", + selectTheme: "select a theme", + triggerWarning: "the following switch enables additional settings, which some people may: disagree with, find annoying, be offended by them. By enabling the switch, you agree that you won't be triggered by any of the additional options and will not asociate any of the authors and/or their personal beliefs and opinions with additional options.", + triggerAgreement: "i agree with terms and conditions stated above", + triggerWarningSet: "additional settings toggled", + additionalOptions: "additional settings", + themeSet: "theme set, open another page for the changes to take effect", + errorReportingSet: "error reporting preference set", + errorReporting: "error reporting", + on: "on", + off: "off", + selectErrorReporting: "should error reports be submitted to the developers?", + // gsec + gsecErrNet: "GimSIS connection error", + gsecErrLogin: "GimSIS login error (bad password?), try logging out", + gsecErrOther: "GimSIS unknown error, try logging out", + // videoconferences + videoconferences: "GimB meet" + }, + sl: { + miscTranslationLanguage: "slovenščina", + miscTranslationAuthors: "Anton Luka Šijanec", + "": "", + // date + monday: "ponedeljek", + tuesday: "torek", + wednesday: "sreda", + thursday: "četrtek", + friday: "petek", + saturday: "sobota", + sunday: "nedelja", + am: "dop.", + pm: "pop.", + january: "januar", + february: "februar", + march: "marec", + april: "april", + may: "maj", + june: "junij", + july: "julij", + august: "avgust", + september: "september", + october: "oktober", + november: "november", + december: "december", + // login + username: "uporabniško ime", + password: "geslo", + signIn: "prijava", + bySigningInYouAgreeTo: "s prijavo se strinjate s", + theToS: "pogoji uporabe (v angleščini)", + and: "in", + thePrivacyPolicy: "politika zasebnosti (v angleščini)", + thePrivacyPolicy_rodilnik: "politiko zasebnosti (v angleščini)", + loginFailed: "prijava je spodletela", + browserNotSupported: "BežiApp ne bo deloval na vaši napravi, če ne posodobite vašega Internetnega brskalnika", + // timetable + noPeriods: "ni ur v izbranem tednu", + // index + timetable: "urnik", + gradings: "ocenjevanja", + grades: "ocene", + teachers: "profesorji", + absences: "izostanki", + messaging: "sporočanje", + meals: "obroki", + about: "o", + logout: "odjava", + settings: "nastavitve", + // gradings + date: "datum", + description: "opis", + add: "dodaj", + requestFailed: "zahteva spodletela", + addGrading: "dodaj ocenjevanje", + noInternetConnection: "ni povezave s spletom", + // grades + temporary: "začasno", + useOnlyPermanentGrades: "uporabi le stalne ocene", + useOnlyPermanentGradesNote1: "če je označeno, bodo za izračun povprečja uporabljene le stalne ocene", + useOnlyPermanentGradesNote2: "če pa je polje neoznačeno, pa se ob izračunu povprečne ocene upoštevajo vse ocene", + type: "tip", + term: "rok", + teacher: "profesor", + zakljucneGradess: "zaključne ocene, ki bodo na spričevalu, so označene z rdečo, povprečja ocen pa so v črni barvi. V kolikor imate kakršnekoli pritožbe ali vprašanja glede zaključnih ocen, povprašajte profesorja", + // teachers + name: "ime", + schoolSubject: "predmet", + tpMeetings: "govorilne ure", + // absences + from: "od", + to: "do", + cancel: "prekliči", + ok: "v redu", + noAbsences: "ni izostankov v izbranem časovnem obdobju", + lesson: "ura", + notProcessed: "ni obdelano", + authorizedAbsence: "opravičeno", + unauthorizedAbsence: "neopravičeno", + doesNotCount: "ne šteje", + // messaging + loadingMessages: "Nalagam sporočila...", + sendAMessage: "pošlji sporočilo", + send: "pošlji", + recipient: "prejemnik", + messageSubject: "zadeva", + messageBody: "telo", + removeImages: "odstrani slike", + note: "opomba", + largeImagesNote: "GimB strežniki ne marajo velikih sporočil, zato lahko pošiljate le zelo majhne slike, v nasprotnem primeru sporočilo ne bo dostavljeno", + attachedImages: "pripete slike", + encryptMessage: "Šifriraj sporočilo", + passwordForE2EE: "geslo za šifriranje sporočila", + messages: "sporočila", + received: "prejeta", + sent: "poslana", + deleted: "izbrisana", + messageStorageUsed: "zasedenost shrambe sporočil v tej mapi", + maxMessagesNote: "v vsaki mapi imate lahko največ 120 sporočil. Starejša sporočila ne bodo prikazana. Redno brišite sporočila, da se izognete morebitnim težavam.", + loadMessageBody: "naloži telo sporočila", + thisMessageWasEncrypted: "to sporočilo je šifrirano", + enterPassword: "vnesite geslo", + decrypt: "dešifriraj", + nameDirectoryNotSet: "imenik ni nastavljen, pošiljanje ni mogoče", + errorFetchingMessages: "sporočil ni bilo mogoče prenesti", + unableToReceiveTheMessage: "sporočila ni bilo mogoče prenesti", + unableToDeleteTheMessage: "sporočila ni bilo mogoče izbrisati", + messageWasProbablySent: "sporočilo je bilo verjetno poslano, prepričajte se in preverite mapo s poslanimi sporočili", + errorSendingMessage: "sporočila ni bilo mogoče poslati", + imageAddedAsAnAttachment: "slika dodana kot priloga", + unableToReadDirectory: "imenika ni bilo mogoče prebrati", + messageCouldNotBeSent: "sporočila ni bilo mogoče poslati", + incorrectPassword: "nepravilno geslo", + // chats + chat: "klepet", + chattingWith: "klepet z osebo", + noMessages: "ni sporočil", + stillLoading: "nalaganje še poteka", + directory: "imenik", + select: "izberi", + mustSelectRecipient: "pred klepetom morate izbrati sogovornika. Odprite imenik (meni na levi strani) s pritiskom na gumb \"imenik\" zgoraj desno in izberite sogovornika.", + recipientNotInDirectory: "izbrane osebe ni v imeniku", + chatExternalInfo: "dobili ste kratko sporočilo v standardu, ki ga GimSIS ne podpira. Pri odgovarjanju spremenite zadevo. Vsebina sporočila: ", + // meals + loginError: "napaka pri prijavi", + loginToLopolis: "prijava v Lopolis", + loginToLopolisNote: "izgleda, da niste prijavljeni v eRestavracijo, zato se vam je prikazal prijavni obrazec. Za uporavljanje s prehrano se uporablja druga kombinacija uporabniškega imena in gesla, zato se prijavite s svojimi Lopolis prijavnimi podatki za nadaljevanje.", + logInToLopolis: "prijava v Lopolis", + logOutFromLopolis: "odjava iz Lopolisa", + readOnly: "samo za branje", + usage: "uporaba", + mealsUsageNote: "kliknite na datum za prikaz menijev, nato pa si enega izberite s klikom na ime menija. Po nastavitvi menijev ponovno naložite menije in se prepričajte o pravilnih nastavitvah.", + lunchesNote: "aplikacija ni testirana za naročanje na kosila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.", + mealNotShownNote: "obroki, označeni z zlato so nastavljivi, tisti, označeni s sivo, niso, če pa pri kakšnem dnevu obroka ni, pa pomeni, da ga ni moč nastaviti ali pa da ne obrok ne obstaja", + mealsContributeNote: "vabimo vas k urejanju LopolisAPI programa za upravljanje z meniji.", + authenticationError: "napaka avtentikacije", + lopolisAPIConnectionError: "napaka povezave na LopolisAPI strežnik", + errorGettingMenus: "napaka branja menijev", + errorUnexpectedResponse: "napaka: nepričakovan odgovor", + requestForAuthenticationFailed: "zahteva za avtentikacijo ni uspela", + credentialsMatch: "prijavni podatki so pravilni", + errorSettingMeals: "napaka pri nastavljanju menijev", + mealSet: "obrok nastavljen! osvežite obroke in se prepričajte sami", + selected: "izbrano", + meal: "obrok", + checkedOut: "odjavljen", + checkedIn: "prijavljen", + errorCheckingInOut: "prijava/odjava na obrok NI uspela", + successfulCheckingInOut: "prijava/odjava na obrok je uspela", + // about + version: "različica", + authors: "avtorji", + translatorsForThisLanguage: "prevajalci izbranega jezika", + whatIsNew: "kaj je novega", + whatsNew: "kaj je novega", + reportABug: "prijavite napako", + sendASuggestion: "pošljite pripombo/predlog/pohvalo/pritožbo", + instagram: "instagram", + // changelog + changelog: "dnevnik sprememb", + // terms and conditions + termsOfUse: "terms of use", + termsOfUseDescription: "as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App", + termsOfUseHarass: "to abuse, harass, threaten, impersonate or intimidate any person", + termsOfUsePost: "to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person", + termsOfUseCommunicate: "to communicate with the App developers or other users in abusive or offensive manner", + termsOfUsePurpose: "for any purpose that is not permitted under the laws of the jurisdiction where you use the App", + termsOfUseExploit: "to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user", + termsOfUseSpam: "to create or transmit unwanted “spam” to any person or any URL", + termsOfUseModify: "you may also not reverse engineer, modify or redistribute the app without written consent from the developers", + terminationOfServices: "termination of services", + terminationOfServicesDescriptions: "the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons", + terminationOfServicesBreaching: "breaching the Terms of Service", + terminationOfServicesRequest: "receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App", + limitationOfLiability: "limitation of Liability", + limitationOfLiabilityContent: "the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.", + tosAreEffectiveAsOf: "the Terms of Service are effective as of", + // privacy policy + privacyImportant: "your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.", + privacyOnlyAskedWhen: "we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.", + privacyDataCollection: "we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.", + privacySharingData: "we don’t share any personally identifying information publicly or with third-parties, except when required to by law", + privacyExternalSites: "our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.", + privacyRefuse: "you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.", + privacyAcceptWithUse: "your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.", + privacyEffectiveAsOf: "this policy is effective as of", + // settings + language: "jezik", + selectLanguage: "izberite željen jezik", + languageSet: "jezik nastavljen, odprite neko drugo stran da se pokažejo spremembe", + theme: "izgled", + themeLight: "svetel izgled (privzeto)", + themeDark: "temen izgled", + themeNight: "nočni izgled", + themeSet: "izgled nastavljen, odprite neko drugo stran da se spremembe uveljavijo", + selectTheme: "izberite željen izgled", + errorReportingSet: "nastavitev pošiljanja napak izbrana", + errorReporting: "pošiljanje napak", + on: "vklopljeno", + off: "izklopljeno", + selectErrorReporting: "ali naj so napake v aplikaciji posredovane razvijalcem?", + triggerWarning: "spodnji gumb omogoči dodatne možnosti, ki lahko razburijo/vznevoljijo nekatere uporabnike. Če omogočite stikalo, se strinjate, da avtorjev in/ali njihovih osebnih prepričanj ne boste povezovali s katerokoli od dodatnih omogočenih možnosti", + triggerAgreement: "strinjam se z zgoraj navedenimi pogoji", + triggerWarningSet: "spremenili ste stanje dodatnih nastavitev", + additionalOptions: "dodatne nastavitve", + // gsec + gsecErrNet: "napaka povezave na GimSIS", + gsecErrLogin: "prijava v GimSIS ni uspela (napačno geslo?), poskusite se odjaviti", + gsecErrOther: "neznana napaka GimSISa, poskusite se odjaviti", + // videoconferences + videoconferences: "GimB konference" + } +} diff --git a/dist/js/setup-storage.js b/dist/js/setup-storage.js index be05650..74b2909 100755 --- a/dist/js/setup-storage.js +++ b/dist/js/setup-storage.js @@ -1,2 +1,49 @@ -async function setupStorage(force=false){let logged_in;promises_check_if_already_installed=[localforage.getItem("logged_in").then(function(val){console.log("[setupStorage] logged in status: "+val);logged_in=val;})];await Promise.all(promises_check_if_already_installed);let promises_update=[localforage.setItem("profile",{}),localforage.setItem("timetable",[]),localforage.setItem("teachers",[]),localforage.setItem("gradings",[]),localforage.setItem("grades",[]),localforage.setItem("absences",{}),localforage.setItem("messages",[[],[],[]]),localforage.setItem("directory",{}),localforage.setItem("meals",{}),localforage.setItem("chosenLang","en"),localforage.setItem("theme","light"),localforage.setItem("errorReporting","on"),localforage.setItem("lastUpdate",0),localforage.setItem("triggerWarningAccepted",false)];if(logged_in&&force==false){await Promise.all(promises_update);console.log("[setupStorage] user logged in: only updated");}else{let promises_first_install=[localforage.setItem("logged_in",false),localforage.setItem("username",""),localforage.setItem("password",""),];await localforage.clear();await Promise.all(promises_first_install);await Promise.all(promises_update);console.log("[setupStorage] user not logged in: set up whole database");}} \ No newline at end of file + + + + +// @begin=js@ +async function setupStorage(force = false) { + let logged_in; + promises_check_if_already_installed = [ + localforage.getItem("logged_in").then(function (val) { + console.log("[setupStorage] logged in status: " + val); + logged_in = val; + }) + ]; + await Promise.all(promises_check_if_already_installed); + + let promises_update = [ + localforage.setItem("profile", {}), + localforage.setItem("timetable", []), + localforage.setItem("teachers", []), + localforage.setItem("gradings", []), + localforage.setItem("grades", []), + localforage.setItem("absences", {}), + localforage.setItem("messages", [[], [], []]), // see messages.js:129, commit 8eb9ca9caca30fbbe023243657535ab4088be377 + localforage.setItem("directory", {}), //\\ well I could remember my own code but I didn't. + localforage.setItem("meals", {}), + localforage.setItem("lastUpdate", 0), + localforage.setItem("triggerWarningAccepted", false) + ]; + + if (logged_in && force == false) { // torej, če je že bila prijava narejena, ne posodobi backwards-compatible vrednosti (username, password,...) + await Promise.all(promises_update); + console.log("[setupStorage] user logged in: only updated"); + } else { + + let promises_first_install = [ + localforage.setItem("logged_in", false), + localforage.setItem("username", ""), + localforage.setItem("password", ""), + localforage.setItem("chosenLang", "sl"), + localforage.setItem("theme", "light"), + localforage.setItem("errorReporting", "on"), + ]; + await localforage.clear(); + await Promise.all(promises_first_install); + await Promise.all(promises_update); + console.log("[setupStorage] user not logged in: set up whole database"); + } +} diff --git a/dist/login.html b/dist/login.html index 95bcc2e..8a2c532 100755 --- a/dist/login.html +++ b/dist/login.html @@ -57,7 +57,7 @@

bySigningInYouAgreeTo theToS and - thePrivacyPolicy + thePrivacyPolicy_rodilnik

diff --git a/dist/pages/about.html b/dist/pages/about.html index 79ff2d5..6b0f39f 100755 --- a/dist/pages/about.html +++ b/dist/pages/about.html @@ -2,6 +2,7 @@ + @@ -78,7 +79,7 @@
version - 1.0.16.1-beta + 1.0.16.2-beta
@@ -162,7 +163,7 @@

- ^HEAD 473486647475ee26470fc33f5eb95f51b00fdcc5 + ^HEAD 90dfb784cc11a8cc52e3cfb063273f44849f62a1

diff --git a/dist/pages/absences.html b/dist/pages/absences.html index cd03b3f..69ca7f0 100755 --- a/dist/pages/absences.html +++ b/dist/pages/absences.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/changelog.html b/dist/pages/changelog.html index 9902ec8..45b8c67 100755 --- a/dist/pages/changelog.html +++ b/dist/pages/changelog.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/chats.html b/dist/pages/chats.html index d842531..83c66b0 100755 --- a/dist/pages/chats.html +++ b/dist/pages/chats.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/grades.html b/dist/pages/grades.html index c2c083a..0d8e736 100755 --- a/dist/pages/grades.html +++ b/dist/pages/grades.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/gradings.html b/dist/pages/gradings.html index d20020b..86b047d 100755 --- a/dist/pages/gradings.html +++ b/dist/pages/gradings.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/jitsi.html b/dist/pages/jitsi.html index 343302d..7dafa9c 100755 --- a/dist/pages/jitsi.html +++ b/dist/pages/jitsi.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/meals.html b/dist/pages/meals.html index 26e79f6..a071e21 100755 --- a/dist/pages/meals.html +++ b/dist/pages/meals.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/messaging.html b/dist/pages/messaging.html index 5acb6f6..87baac0 100755 --- a/dist/pages/messaging.html +++ b/dist/pages/messaging.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/privacypolicy.html b/dist/pages/privacypolicy.html index 4876d6b..62ef319 100755 --- a/dist/pages/privacypolicy.html +++ b/dist/pages/privacypolicy.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/settings.html b/dist/pages/settings.html index 43e6376..2d00d2b 100755 --- a/dist/pages/settings.html +++ b/dist/pages/settings.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/teachers.html b/dist/pages/teachers.html index 0c1e9cb..50038dc 100755 --- a/dist/pages/teachers.html +++ b/dist/pages/teachers.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/timetable.html b/dist/pages/timetable.html index f4b6220..cbdc971 100755 --- a/dist/pages/timetable.html +++ b/dist/pages/timetable.html @@ -2,6 +2,7 @@ + diff --git a/dist/pages/tos.html b/dist/pages/tos.html index 384b2d3..18c7c42 100755 --- a/dist/pages/tos.html +++ b/dist/pages/tos.html @@ -2,6 +2,7 @@ + diff --git a/dist/sw.js b/dist/sw.js index 0348f79..33eb888 100755 --- a/dist/sw.js +++ b/dist/sw.js @@ -2,10 +2,11 @@ + // @begin=js@ // Change version to cause cache refresh -const static_cache_name = "site-static-1.0.16.1-beta-4734866"; -// commit before the latest is 473486647475ee26470fc33f5eb95f51b00fdcc5 +const static_cache_name = "site-static-1.0.16.2-beta-90dfb78"; +// commit before the latest is 90dfb784cc11a8cc52e3cfb063273f44849f62a1 // Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js // sw.js NE SME BITI CACHAN, ker vsebuje verzijo! diff --git a/global.bvr b/global.bvr index 4d0e032..1454ef0 100644 --- a/global.bvr +++ b/global.bvr @@ -1,3 +1,4 @@ <@?s bvr_include_path assets/pages-src/ assets/pages-src/misc/@> <@?s latest_commit ?u 0 -1 ?i .git/refs/heads/dev@> -<@?s app_version 1.0.16.1-beta@> +<@?s app_version 1.0.16.2-beta@> +<@?s app_default_language sl@> diff --git a/server/nadomescanja/output.pdf b/server/nadomescanja/output.pdf deleted file mode 100644 index ada8a98..0000000 Binary files a/server/nadomescanja/output.pdf and /dev/null differ diff --git a/server/nadomescanja/script.sh b/server/nadomescanja/script.sh deleted file mode 100755 index 496b869..0000000 --- a/server/nadomescanja/script.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# this is a script to test if we can get files from sharepoint in an easy way. #fuckrosoft - -curl 'https://gimnazijabezigrad.sharepoint.com/Gim/DatSpl/Gimb%20%C5%A0olska%20pravila%20ocenjevanja%202019_20.pdf' \ - -H 'authority: gimnazijabezigrad.sharepoint.com' \ - -H 'cache-control: max-age=0' \ - -H 'upgrade-insecure-requests: 1' \ - -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36' \ - -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \ - -H 'sec-fetch-site: none' \ - -H 'sec-fetch-mode: navigate' \ - -H 'sec-fetch-user: ?1' \ - -H 'sec-fetch-dest: document' \ - -H 'accept-language: en-US,en;q=0.9' \ - -H 'cookie: nSGt-0F5C552C67D73B521FBC79E429B19BDACAD60901BA94F0F7=gYEwMThFQjM0NTU1MjE0RkQyOTMyRUY3MEFBM0EyNTc1RTMwMjk4QTlEQjk0RjJBRDY5MDBGNUM1NTJDNjdENzNCNTIxRkJDNzlFNDI5QjE5QkRBQ0FENjA5MDFCQTk0RjBGNxIxMzIzNTc1NzEwNDE4MDQ3NTIgZ2ltbmF6aWphYmV6aWdyYWQuc2hhcmVwb2ludC5jb20l6emYjLtdSZH+qYiO8V6/lU1eeE4X4HEulbeqPNPqfZ84humJDzVIOi5BgnAVXq2FhXmQUJFVpRO83UVCPWy8jR3s5QweUhfiB6SJP6vVltUwKzbjyPGQf7h1ykLNXvOBJL+icoKtulLKHZ1nwZuYcByYHHoJFLHERm/PKVhaN4ixIepiui3mEZrv8yzxZdX7Brzz2lAHF/DvqnK10U2p6FzcvmkBHTBpyFL86QYnuEwEXVmHsWq+uFBMYwQemY3S1goKVZONN8oUDKbr3woIOf2/YK5TfEPdaWOWkGROmFeDMxx/eAEoFHKd2HOM1PJM+H9MX1qP/BNo3G3+6cIFmAAAAA==; rtFa=ZRFHgKH1ffwmMES9Vjd7ein7sIVcTByBP6hlk6Fb8DgmRTcwQUE5M0QtRTQ1NS00MUU4LTg5MzEtRkFCOTYwQTlCNkJBptaV0VQGYEWk2f0ThJtHccyMco6F7IoScwB1jD7W8zpkcGPhrpbcCxy2lrfJyd4nS/B311WEl2k+c6VUZqkcDJQ6On5wZ486tQi5J+H27wfAd+/Z7VO9CqtiOL9jiWWub+qiCE1EpPlsCwrbDmV4TCToUY9lnZVG8Zw9B7iam73f82I5YSZ9P/rCcHqfd27YjL/EIuMTy8F/ned9AT7hnWvKpr0l2moEjoKInIaTPrEda50jv7hvQlKb6RYuSbV4YrC8Bcmn2JqDb7X7WXPXXYLBfzUcbqFaxkqoOUlXwkWvKNS3gSXSTeSEVAOjTJZ0OME5MrcYLKIN70G2BoX0eEUAAAA=; FedAuth=77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48U1A+VjgsMGguZnxtZW1iZXJzaGlwfDEwMDMzZmZmODZhNWM0NmZAbGl2ZS5jb20sMCMuZnxtZW1iZXJzaGlwfHdlYnVzZXJAZ2ltYi5vcmcsMTMyMzU3NTY1MjYwMDAwMDAwLDEyODcyMTgzNzMzMDAwMDAwMCwxMzIzNjE4ODUzMDEwMjIyMDYsMTg4LjIzMC4xMjkuNjYsMyxlNzBhYTkzZC1lNDU1LTQxZTgtODkzMS1mYWI5NjBhOWI2YmEsLDM0ZmNmNWEyLWZjNGMtNGFhOC1iZDRmLTEyZWJjZmFmOTFiYSw3NjIwNTk5Zi04MDk2LWEwMDAtNjExYy1jN2ZjODBmMGI2NDIsNzYyMDU5OWYtODA5Ni1hMDAwLTYxMWMtYzdmYzgwZjBiNjQyLCwwLDEzMjM1ODQyOTMwMDU1MzU1NywxMzIzNjAxNTczMDA1NTM1NTcsLCwsMjY1MDQ2Nzc0Mzk5OTk5OTk5OSwxMzIzNTc1NjUyOTAwMDAwMDAsZTE5NTRlMDMtNDZlMS00OTY5LTg4NWUtODMzZGY5NjE5YTU3LElySW16VXRjaWpwSjlGNlluMEpZMERicldsblE1anBYRkxSaGJYSGt6eGtvNXcwcGJyOVZwZVJGNXJlOWdLa1ZFVEtLRFFBcWxTWnN6YnJFQ3lCT1FQbEgrdFVkeTZUcStydk0zOEVqMVlQMFh5SE1JWmRHWjFrYTVGcWY3MzVCOE03VGhkSGVKcnpqNzlPR01kR1pzVE9JOUo4WDlkRkcrMGJkRnVsY1JBanh5ckd3U2szWlpwY0NiNTFLN3NpQTJHOEE5ODZTa2VqSkJBaVpCWk5HRElNSG5JSTAyRXVZaVN1OCtqbWxFUHU4OVhxTlpXRmZYNHpxdEM1TnNKRURwZ0RsKzFnMUFDOFBsaXBMMjh5YTcyRWY5N1RqTWdOQlIxcCtEeVlLUUdNWVdRUFp6NG5DUU9HRGU2REhpMnRDYWZWU2c5TUM0TGlrcEZTNVl4YWdVUT09PC9TUD4=; CCSInfo=Ny4gMDYuIDIwMjAgMTc6MDc6MDg0fL7YWM9M1GwNXmIVSDq7jc1NY/Qod+/ZRKTvTkTqlaRXX01bAepfiS+zo61xxrv7g20l+dy8VjQVb9Jby19pTGWx+PwCrrCdGVLf8uW+AbVkS8mD8mZPWu8XrP5qHxcs2I5JoTJkUGkO/HNO1DDrXFAYmONZ1PEKbRJE5XijlaaGEM6I+lv1EvNXQxAau/H3BnbqXqHi3sK/PBDS6JGPw/qQVxuE9kr4IdA6XcCbok64aU4sjtKbo0J0csclZIqZkRwO0dCh16oSS4mnsATVqlPtLggROb30dognrv16+XaxSUY6dUAEoL/NpaYdgMmo9pyLsItuu41XKRO0bAklFAAAAA==' \ - -H 'if-none-match: "{B7F3D3FC-A5A1-4919-9076-2C7804E4A31F},2"' \ - -H 'if-modified-since: Wed, 11 Dec 2019 10:12:19 GMT' \ - -o output.pdf \ - --compressed - -# they're fixking with me, right? why would anyone need 1 kilobyte of data in a cookie,,, A SESSION COOKIE!=?!=? -- cgit v1.2.3 From 095b66391412ad617eda18ceb503704a9f159703 Mon Sep 17 00:00:00 2001 From: sijanec Date: Fri, 9 Oct 2020 16:29:59 +0200 Subject: =?UTF-8?q?added=20nginx=20config=20file=20for=20be=C5=BEiapp=20ht?= =?UTF-8?q?ml=20host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/beziapp.conf | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 server/beziapp.conf diff --git a/server/beziapp.conf b/server/beziapp.conf new file mode 100644 index 0000000..1aaa138 --- /dev/null +++ b/server/beziapp.conf @@ -0,0 +1,62 @@ +server { + listen 0.0.0.0:80; + listen [::]:80; + server_name .app.gimb.tk; + return 301 https://app.gimb.tk$request_uri; + port_in_redirect off; + server_name_in_redirect off; +} +server { + listen 0.0.0.0:443 http2 ssl; + listen [::]:443 http2 ssl; + server_name .app.gimb.tk; + ssl_certificate /etc/ssl/sslforfree/gimb.tk.crtca; + ssl_certificate_key /etc/ssl/sslforfree/gimb.tk.key; + root /home/gimb/beziapp.github.io; + location / { + if ($http_origin ~ \.?gimb\.tk$) { + set $cors 'true'; + set $both_conditions "P"; + add_header "x-debug-http-origin-check" "passed"; + } + if ($cors = 'true') { + add_header "Access-Control-Allow-Origin" $http_origin always; + add_header "Access-Control-Allow-Credentials" "true" always; + add_header "Access-Control-Allow-Methods" "GET, POST, PATCH, PUT, DELETE, OPTIONS" always; + add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Authorization' always; + add_header 'Access-Control-Expose-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Authorization' always; + } + if ($request_method = 'OPTIONS') { + set $both_conditions "${both_conditions}D"; + } + if ($both_conditions = PD) { + add_header "Access-Control-Allow-Origin" $http_origin always; + add_header "Access-Control-Allow-Credentials" "true" always; + add_header "Access-Control-Allow-Methods" "GET, POST, PATCH, PUT, DELETE, OPTIONS" always; + add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Authorization' always; + add_header 'Access-Control-Expose-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,Authorization' always; + add_header 'Access-Control-Max-Age' -1; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + add_header 'Content-Length' 0; + return 204; + } + try_files $uri $uri/ =404; + } + +# pass PHP scripts to FastCGI server +# + location ~ \.php$ { + include snippets/fastcgi-php.conf; +# +# # With php-fpm (or other unix sockets): + fastcgi_pass unix:/run/php/php7.3-fpm.sock; +# # With php-cgi (or other tcp sockets): +# fastcgi_pass 127.0.0.1:9000; + } + location /clear-site-data { + add_header 'clear-site-data' '"*"'; + add_header 'content-type' 'text/plain'; + return 200 "data clear requested, you can go back now."; + } +} + -- cgit v1.2.3