adding pdf and image viewer

This commit is contained in:
DioCrafts
2025-04-02 01:22:05 +02:00
parent 09e37ee677
commit 705cb5b069
20 changed files with 1716 additions and 16 deletions
+20
View File
@@ -10,6 +10,16 @@ const contextMenus = {
*/
assignMenuEvents() {
// Folder context menu options
document.getElementById('download-folder-option').addEventListener('click', () => {
if (window.app.contextMenuTargetFolder) {
window.fileOps.downloadFolder(
window.app.contextMenuTargetFolder.id,
window.app.contextMenuTargetFolder.name
);
}
window.ui.closeContextMenu();
});
document.getElementById('rename-folder-option').addEventListener('click', () => {
if (window.app.contextMenuTargetFolder) {
this.showRenameDialog(window.app.contextMenuTargetFolder);
@@ -42,6 +52,16 @@ const contextMenus = {
});
// File context menu options
document.getElementById('download-file-option').addEventListener('click', () => {
if (window.app.contextMenuTargetFile) {
window.fileOps.downloadFile(
window.app.contextMenuTargetFile.id,
window.app.contextMenuTargetFile.name
);
}
window.ui.closeFileContextMenu();
});
document.getElementById('move-file-option').addEventListener('click', () => {
if (window.app.contextMenuTargetFile) {
this.showMoveDialog(window.app.contextMenuTargetFile, 'file');