diff --git a/css/main.css b/css/main.css index cd13cf2..3cc6f56 100644 --- a/css/main.css +++ b/css/main.css @@ -804,8 +804,8 @@ select option:disabled { } #local-fileloader { - position: absolute; - bottom: 10px; + position: sticky; + bottom: -20px; } #packets { diff --git a/js/main.js b/js/main.js index a896f00..ea33433 100644 --- a/js/main.js +++ b/js/main.js @@ -220,6 +220,11 @@ async function loadExamList(data) { // Check the database for exams that have been saved question_db.saved_exams.toArray().then((saved_exams) => { + if (saved_exams.length < 1) { + $("#cache-details ul").append("No cached exams / questions"); + } else { + $("#cache-details ul").append("Cached exams / questions:"); + } saved_exams.forEach((saved_exam, n) => { $("#cache-details ul").append( `
  • Exam: ${saved_exam.exam_name} [${saved_exam.eid}]: ${saved_exam.generated}` @@ -2352,11 +2357,17 @@ function saveSession(start_review) { function refreshDatabaseSettings() { navigator.storage.estimate().then((value) => { $("#storage-details").empty(); - $("#storage-details").append( - `Local space used: ${helper.humanFileSize( - value.usage - )}, available: ${helper.humanFileSize(value.quota)}` - ); + if (value != undefined) { + $("#storage-details").append( + `Local space used: ${helper.humanFileSize( + value.usage + )}, available: ${helper.humanFileSize(value.quota)}` + ); + } else { + $("#storage-details").append( + `Local storage information not available (are you connecting over http rather than https?).` + ); + } }); }