Skip to content

Commit

Permalink
Fixed: Issue #29 - Lack of icons for arbitrary file types.
Browse files Browse the repository at this point in the history
  • Loading branch information
GameGodS3 committed Sep 2, 2022
1 parent 9ac6700 commit 5c7b1c9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
18 changes: 16 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion renderer.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,14 @@ holder.ondrop = (e) => {
alert("File already in the instance");
continue;
}

// Add the file to the filelist
filelist.push({
filepath: f.path.toString(),
fileType:
f.type.split("/")[0] !== "application" ? f.type.split("/")[0] : "file",
f.type && f.type.split("/")[0] !== "application"
? f.type.split("/")[0]
: "file",
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/RequestHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let getFileTypeIcons = (fileList) => {
if (fileType !== "application") {
fileType = icons[fileType];
} else {
fileType = icons.file;
fileType = icons[file];
}
} else {
fileType = icons.multifile;
Expand Down

0 comments on commit 5c7b1c9

Please sign in to comment.