feat: add documents to Lesson materials (#572)

* feat: Initial logic for the pdf upload

* feat: uploa logic, translations and ui flow complete

* chore:console log cleanup

* feat: fixed upload issue and added cancel upload button

* feat: fixing the download document ish

* feat: All done and ready for use

* feat: updated the document viewing logic

* feat: some minor refactor

* feat: added migration file

* fix: dark mode, translations, restyling,

---------

Co-authored-by: Rotimi Best <best@classroomio.com>
This commit is contained in:
Nwosu Emmanuel
2025-09-10 11:39:06 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 7a77bd6c79
commit 937f1d8155
32 changed files with 1682 additions and 50 deletions
@@ -663,8 +663,46 @@
"upgrade": "Upgrade your plan to upload vidoes",
"uploading": "Uploading...",
"invalid_youtube": "Invalid YouTube link(s)",
"invalid_link": "Invalid link(s)"
"invalid_link": "Invalid link(s)",
"cancel_upload": "Cancel Upload",
"upload_cancelled": "Upload cancelled by user"
}
},
"document": {
"title": "Docs",
"add_document": "Add Document",
"no_document": "No documents uploaded yet",
"view_document": "View Document",
"download": "Download",
"upload_document": "Upload Document",
"upload_title": "Upload Document",
"upload_description": "Upload PDF, DOCX, or DOC files. Maximum size: 5MB",
"drag_drop": "Drag and drop your document here",
"or": "or",
"choose_file": "Choose File",
"cancel": "Cancel",
"uploading": "Uploading...",
"upload_success": "Document uploaded successfully!",
"upload_error": "Failed to upload document",
"file_type_error": "File type not supported. Please upload PDF, DOCX, or DOC files.",
"file_size_error": "File size too large. Maximum size is {size}.",
"type": "Type",
"size": "Size",
"upload_error_title": "Upload Error",
"upload_error_message": "Unsupported file format or upload failed",
"upload_error_try_again": "Please try again with a valid document file",
"try_again": "Try Again",
"cancel_upload": "Cancel Upload",
"upload_cancelled": "Upload cancelled by user",
"downloading": "Downloading...",
"view_pdf": "View PDF",
"delete": "Delete",
"page_of": "Page {page} of {total}",
"loading_pdf": "Loading PDF...",
"failed_to_load_pdf": "Failed to load PDF document",
"failed_to_render_pdf": "Failed to render PDF page",
"use_arrow_keys": "Use arrow keys to navigate, +/- to zoom, or click the controls above. Right-click is disabled."
}
},
"button_done": "Done"