MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / showMod_new

Method showMod_new

renderer/renderJS/main_ui_lib.js:2226–2246  ·  view source on GitHub ↗
(path, zipFiles = null)

Source from the content-addressed store, hash-verified

2224 }
2225
2226 showMod_new(path, zipFiles = null) {
2227 const shortNameParts = path.split('\\')
2228 const shortNameExt = shortNameParts.pop()
2229 const isFolder = shortNameExt.indexOf('.') === -1
2230 const shortName = isFolder ? shortNameExt : shortNameExt.split('.')[0]
2231
2232 return DATA.templateEngine('file_op_mod', {
2233 folderIcon : '',
2234 iconImage : isFolder ?
2235 `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor" class="bi bi-folder-plus" viewBox="0 0 16 16">
2236 <path d="m.5 3 .04.87a2 2 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14H9v-1H2.826a1 1 0 0 1-.995-.91l-.637-7A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09L14.54 8h1.005l.256-2.819A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2m5.672-1a1 1 0 0 1 .707.293L7.586 3H2.19q-.362.002-.683.12L1.5 2.98a1 1 0 0 1 1-.98z"/>
2237 <path d="M13.5 9a.5.5 0 0 1 .5.5V11h1.5a.5.5 0 1 1 0 1H14v1.5a.5.5 0 1 1-1 0V12h-1.5a.5.5 0 0 1 0-1H13V9.5a.5.5 0 0 1 .5-.5"/>
2238 </svg>` :
2239 `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor" class="bi bi-file-earmark-plus" viewBox="0 0 16 16">
2240 <path d="M8 6.5a.5.5 0 0 1 .5.5v1.5H10a.5.5 0 0 1 0 1H8.5V11a.5.5 0 0 1-1 0V9.5H6a.5.5 0 0 1 0-1h1.5V7a.5.5 0 0 1 .5-.5"/>
2241 <path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"/>
2242 </svg>`,
2243 shortname : shortName,
2244 title : zipFiles === null ? path.replaceAll('\\', '\\<wbr>') : [...zipFiles].join('<br>'),
2245 })
2246 }
2247
2248 showMod(mod, hasDest, isDelete, isMulti) {
2249 const modPointer = this.flags.operation === 'import' ? mod : mod.colUUID

Callers 1

showModMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected