mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
remove cover iframe for public folders
This commit is contained in:
parent
ceecf54357
commit
3f520e13f3
@ -344,31 +344,6 @@ async function UIWindow(options) {
|
||||
// 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('/');
|
||||
|
||||
if ( components.length === 2 && components[1] === 'Public' ) {
|
||||
const username = components[0];
|
||||
h += `<iframe
|
||||
style="display:block;width:100%"
|
||||
tabindex="-1"
|
||||
frameborder="0"
|
||||
src="http://${username}.at.${window.hosting_domain}"
|
||||
height=150
|
||||
></iframe>
|
||||
`;
|
||||
}
|
||||
})();
|
||||
|
||||
// Add 'This folder is empty' message by default
|
||||
h += `<div class="explorer-empty-message">This folder is empty</div>`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user