From 6903ce004368a6c1fdeafdc6c30fee87f6831c57 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 1 May 2024 16:54:31 +0100 Subject: [PATCH] chore: Clarify usage of window fields in UIWindowItemProperties.js /puter/src/UI/UIWindowItemProperties.js 135:26 error Empty block statement no-empty 147:120 error 'byte_format' is not defined no-undef 155:395 error 'extractSubdomain' is not defined no-undef --- src/UI/UIWindowItemProperties.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/UI/UIWindowItemProperties.js b/src/UI/UIWindowItemProperties.js index 2458341f1..21d46d356 100644 --- a/src/UI/UIWindowItemProperties.js +++ b/src/UI/UIWindowItemProperties.js @@ -132,7 +132,9 @@ async function UIWindowItemProperties(item_name, item_path, item_uid, left, top, $(el_window).find('.item-prop-val-original-path').text(metadata.original_path); $(el_window).find('.item-prop-original-path').show(); } - }catch(e){} + }catch(e){ + // Ignored + } } // shortcut to @@ -144,7 +146,7 @@ async function UIWindowItemProperties(item_name, item_path, item_uid, left, top, // type $(el_window).find('.item-prop-val-type').html(fsentry.is_dir ? 'Directory' : (fsentry.type === null ? '-' : fsentry.type)); // size - $(el_window).find('.item-prop-val-size').html(fsentry.size === null || fsentry.size === undefined ? '-' : byte_format(fsentry.size)); + $(el_window).find('.item-prop-val-size').html(fsentry.size === null || fsentry.size === undefined ? '-' : window.byte_format(fsentry.size)); // modified $(el_window).find('.item-prop-val-modified').html(fsentry.modified === 0 ? '-' : timeago.format(fsentry.modified*1000)); // created @@ -152,7 +154,7 @@ async function UIWindowItemProperties(item_name, item_path, item_uid, left, top, // subdomains if(fsentry.subdomains && fsentry.subdomains.length > 0 ){ fsentry.subdomains.forEach(subdomain => { - $(el_window).find('.item-prop-val-websites').append(`

${html_encode(subdomain.address)} (disassociate)

`); + $(el_window).find('.item-prop-val-websites').append(`

${html_encode(subdomain.address)} (disassociate)

`); }); } else{