|
|
|
@ -112,17 +112,6 @@ module.exports = { |
|
|
|
|
return text.replace(/\/+/g, '/') |
|
|
|
|
}, |
|
|
|
|
find: find, |
|
|
|
|
getPathIcon (path) { |
|
|
|
|
return path.endsWith('.txt') |
|
|
|
|
? 'far fa-file-alt' : path.endsWith('.md') |
|
|
|
|
? 'far fa-file-alt' : path.endsWith('.sol') |
|
|
|
|
? 'fak fa-solidity-mono' : path.endsWith('.js') |
|
|
|
|
? 'fab fa-js' : path.endsWith('.json') |
|
|
|
|
? 'fas fa-brackets-curly' : path.endsWith('.vy') |
|
|
|
|
? 'fak fa-vyper-mono' : path.endsWith('.lex') |
|
|
|
|
? 'fak fa-lexon' : path.endsWith('.contract') |
|
|
|
|
? 'fab fa-ethereum' : 'far fa-file' |
|
|
|
|
}, |
|
|
|
|
joinPath (...paths) { |
|
|
|
|
paths = paths.filter((value) => value !== '').map((path) => path.replace(/^\/|\/$/g, '')) // remove first and last slash)
|
|
|
|
|
if (paths.length === 1) return paths[0] |
|
|
|
|