@@ -30,10 +30,13 @@ const extensionMap = {
30
30
"gif" : { style : FA_STYLE_REGULAR , icon : "file-image" , type : "bin" } ,
31
31
"htm" : { style : FA_STYLE_REGULAR , icon : "file-code" , type : "text" } ,
32
32
"html" : { style : FA_STYLE_REGULAR , icon : "file-code" , type : "text" } ,
33
+ "ini" : { style : FA_STYLE_REGULAR , icon : "file-code" , type : "text" } ,
34
+ "inf" : { style : FA_STYLE_REGULAR , icon : "file-code" , type : "text" } ,
33
35
"jpeg" : { style : FA_STYLE_REGULAR , icon : "file-image" , type : "bin" } ,
34
36
"jpg" : { style : FA_STYLE_REGULAR , icon : "file-image" , type : "bin" } ,
35
37
"js" : { style : FA_STYLE_REGULAR , icon : "file-code" , type : "text" } ,
36
38
"json" : { style : FA_STYLE_REGULAR , icon : "file-code" , type : "text" } ,
39
+ "md" : { style : FA_STYLE_REGULAR , icon : "file-lines" , type : "text" } ,
37
40
"mov" : { style : FA_STYLE_REGULAR , icon : "file-video" , type : "bin" } ,
38
41
"mp3" : { style : FA_STYLE_REGULAR , icon : "file-audio" , type : "bin" } ,
39
42
"mp4" : { style : FA_STYLE_REGULAR , icon : "file-video" , type : "bin" } ,
@@ -50,8 +53,8 @@ const extensionMap = {
50
53
const FOLDER_ICON = [ FA_STYLE_REGULAR , "fa-folder" ] ;
51
54
const DEFAULT_FILE_ICON = [ FA_STYLE_REGULAR , "fa-file" ] ;
52
55
53
- const FILESIZE_UNITS = [ "bytes" , "KB" , "MB" , "GB" ] ;
54
- const COMPACT_UNITS = [ "" , "K" , "M" , "G" ] ;
56
+ const FILESIZE_UNITS = [ "bytes" , "KB" , "MB" , "GB" , "TB" ] ;
57
+ const COMPACT_UNITS = [ "" , "K" , "M" , "G" , "T" ] ;
55
58
56
59
function getFileExtension ( filename ) {
57
60
let extension = filename . split ( '.' ) . pop ( ) ;
@@ -280,7 +283,9 @@ class FileDialog extends GenericModal {
280
283
this . _selectItem ( listItem , selectedFiles . includes ( listItem ) ) ;
281
284
}
282
285
283
- if ( clickedItem . getAttribute ( "data-type" ) != "folder" ) {
286
+ if ( this . _multipleItemsSelected ( ) ) {
287
+ this . _getElement ( 'fileNameField' ) . value = "" ;
288
+ } else if ( clickedItem . getAttribute ( "data-type" ) != "folder" ) {
284
289
this . _getElement ( 'fileNameField' ) . value = clickedItem . querySelector ( "span" ) . innerHTML ;
285
290
}
286
291
0 commit comments