diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 5c13c96a..11d31b47 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -4687,6 +4687,9 @@ class HttpCli(object): else: taglist = list(tagset) + if not files and not dirs and not readme and not logues[0] and not logues[1]: + logues[1] = "this folder is empty" + if is_ls: ls_ret["dirs"] = dirs ls_ret["files"] = files diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 006531bf..30a67dd9 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -285,6 +285,7 @@ var Ls = { "im_hnf": "that image no longer exists", + "f_empty": 'this folder is empty', "f_chide": 'this will hide the column «{0}»\n\nyou can unhide columns in the settings tab', "f_bigtxt": "this file is {0} MiB large -- really view as text?", "fbd_more": '
showing {0} of {1} files; show {2} or show all
', @@ -793,6 +794,7 @@ var Ls = { "im_hnf": "bildet finnes ikke lenger", + "f_empty": 'denne mappen er tom', "f_chide": 'dette vil skjule kolonnen «{0}»\n\nfanen for "andre innstillinger" lar deg vise kolonnen igjen', "f_bigtxt": "denne filen er hele {0} MiB -- vis som tekst?", "fbd_more": '
viser {0} av {1} filer; vis {2} eller vis alle
', @@ -6384,6 +6386,9 @@ var treectl = (function () { lg1 = res.logues ? res.logues[1] || "" : "", dirchg = get_evpath() != cdir; + if (lg1 === Ls.eng.f_empty) + lg1 = L.f_empty; + sandbox(ebi('pro'), sb_lg, '', lg0); if (dirchg) sandbox(ebi('epi'), sb_lg, '', lg1); @@ -8021,6 +8026,9 @@ window.addEventListener("message", function (e) { if (sb_lg && logues.length) { + if (logues[1] === Ls.eng.f_empty) + logues[1] = L.f_empty; + sandbox(ebi('pro'), sb_lg, '', logues[0]); sandbox(ebi('epi'), sb_lg, '', logues[1]); }