From e7d1f7b9d1a41d0af7310728f7303b98dff892ae Mon Sep 17 00:00:00 2001 From: amy Date: Fri, 17 Feb 2023 08:21:11 -0600 Subject: 5% better :) --- src/fs-types.json | 4 ++++ src/window-utils.js | 31 ++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 src/fs-types.json (limited to 'src') diff --git a/src/fs-types.json b/src/fs-types.json new file mode 100644 index 0000000..4b1d9f7 --- /dev/null +++ b/src/fs-types.json @@ -0,0 +1,4 @@ +[ + { "identifier": "*", "descriptor": "All Files", "regex": "/(.*)/g" }, + { "identifier": "*.txt", "descriptor": "Text Files", "regex": "/(.*txt$)/g" } +] diff --git a/src/window-utils.js b/src/window-utils.js index 2755878..8f990c8 100644 --- a/src/window-utils.js +++ b/src/window-utils.js @@ -72,18 +72,35 @@ let util = { ""; } } + let opts = ""; + for (let uwu of fs_types) { + opts += + ""; + } files += "
file/directory name:
" + + "-fd-bar-top'>
File name:
" + + "
" + + "
File type:
" + "" + + "-content-button-sub' style='width:70px;margin-left:22px;padding-left:15px;padding-right:15px;top:0;text-align: center;display:inline-block;'>cancel
" + "
"; document.getElementById(i + "-content-content").innerHTML = files; for (let f of tfs) { @@ -125,8 +142,8 @@ let util = { } else sel.push(f.name); } else sel = [f.name]; //sel = [f.name]; - document.getElementById(i + "-fd-bottom-sel").innerHTML = - sel.join(",") + (sel.length == 0 ? "select a file!" : ""); + document.getElementById(i + "-fd-bottom-sel").value = + sel.join(",") + (sel.length == 0 ? "Untitled" : ""); for (let aa of tfs) { let ttt = document.getElementById( i + "-id-name-" + aa.name -- cgit v1.2.3