diff --git a/puter/config/config.example.json b/puter/config/config.example.json deleted file mode 100644 index b2cab6d3b..000000000 --- a/puter/config/config.example.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "config_name": "generated default config", - "env": "dev", - "nginx_mode": true, - "server_id": "localhost", - "http_port": "auto", - "domain": "puter.localhost", - "protocol": "http", - "contact_email": "hey@example.com", - "services": { - "database": { - "engine": "sqlite", - "path": "puter-database.sqlite" - }, - "thumbnails": { - "engine": "purejs" - }, - "file-cache": { - "disk_limit": 16384, - "disk_max_size": 16384, - "precache_size": 16384, - "path": "./file-cache" - } - }, - "cookie_name": "61ed0898-f0da-498d-a988-86f5ffcd8afe", - "jwt_secret": "923d54d9-0911-44b3-87b1-ea3b04c5fa48", - "url_signature_secret": "e076d914-f1c8-4c33-82a6-cc52dc469a37", - "private_uid_secret": "cb751192555c60f8b985651bed2535738609960d69eeb177", - "private_uid_namespace": "75deb70d-08b7-4391-b331-484d955dcfca", - "": null -} diff --git a/src/gui/src/UI/UIDesktop.js b/src/gui/src/UI/UIDesktop.js index 0de9c419b..6e5a96c68 100644 --- a/src/gui/src/UI/UIDesktop.js +++ b/src/gui/src/UI/UIDesktop.js @@ -273,9 +273,6 @@ async function UIDesktop(options) { * It is not necessary to query unreads separately. If this stops working, * then this event should be fixed rather than querying unreads separately. */ - // Ensure horizontal scroll na aaye - $('.desktop.item-container').css('overflow-x', 'hidden'); - window.__already_got_unreads = false; window.socket.on('notif.unreads', async ({ unreads }) => { if (window.__already_got_unreads) return; @@ -770,23 +767,26 @@ async function UIDesktop(options) { // Allow dragging of local files onto desktop. // -------------------------------------------------------- $(el_desktop).dragster({ - enter: function(dragsterEvent, event) { - $('.context-menu').remove(); - }, - leave: function(dragsterEvent, event) {}, - drop: async function (dragsterEvent, event) { - const e = event.originalEvent; - // ...existing drop logic... - }, + enter: function (dragsterEvent, event) { + $('.context-menu').remove(); + }, + leave: function (dragsterEvent, event) { + }, + drop: async function (dragsterEvent, event) { + const e = event.originalEvent; + // no drop on item + if ($(event.target).hasClass('item') || $(event.target).parent('.item').length > 0) + return false; + // recursively create directories and upload files + if (e.dataTransfer?.items?.length > 0) { + window.upload_items(e.dataTransfer.items, window.desktop_path); + } - drag: function (dragsterEvent, event) { - if (event && event.position && typeof event.position.left === 'number') { - if (event.position.left < 0) { - event.position.left = 0; // Only block left edge from going offscreen - } -} - -}); + e.stopPropagation(); + e.preventDefault(); + return false; + } + }); // -------------------------------------------------------- // Droppable