From 5cda51e1843c44125ee63a5a3e01968a2c9866e2 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Wed, 19 Jun 2024 02:10:58 -0400 Subject: [PATCH] tweak: add missing file for previous commit --- src/UI/UIWindow.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/UI/UIWindow.js b/src/UI/UIWindow.js index 3743b6e65..3a49500f4 100644 --- a/src/UI/UIWindow.js +++ b/src/UI/UIWindow.js @@ -337,6 +337,32 @@ async function UIWindow(options) { if(options.is_dir){ // Detail layout header h += window.explore_table_headers(); + + // Maybe render iframe for users public directory + (() => { + if ( options.is_saveFileDialog || options.is_openFileDialog || options.is_directoryPicker ) { + return false; + } + + if ( ! options.path || ! options.path.startsWith('/') ) { // sus + return false; + } + + const components = options.path.slice(1).split('/'); + + console.log('components???', components); + if ( components.length === 2 && components[1] === 'Public' ) { + const username = components[0]; + h += ` + `; + } + })(); // Add 'This folder is empty' message by default h += `
This folder is empty
`;