-
Notifications
You must be signed in to change notification settings - Fork 864
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rm repo.lock, show previous pins, use MFS
Make components as independent as possible Remove repo.lock when not running (fix #588) Fix #590 by using MFS Save pins on MFS (ref.: #597) Order addresses on info pane (fix #599) Show previously pinned stuff (fix #600) Save Screenshots on MFS While daemon is turned off, let the user turn it on or close Desktop only. Improve Files pane Add some basic tests to start the testing journey #50
- Loading branch information
Showing
100 changed files
with
2,030 additions
and
1,170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"env": { | ||
"test": { | ||
"plugins": [ "istanbul" ] | ||
} | ||
}, | ||
"presets": [ | ||
"env", | ||
"stage-2", | ||
"react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,8 @@ out | |
*.lock | ||
package-lock.json | ||
dist | ||
*.zip | ||
*.zip | ||
coverage | ||
.nyc_output | ||
coverage.lcov | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ node_js: | |
|
||
script: | ||
- npm run lint | ||
|
||
- npm run test | ||
- npm run coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
/** | ||
* It's a Block. | ||
* | ||
* @param {Object} props | ||
* | ||
* @prop {Any} wrapped | ||
* @prop {Any} unwrapped | ||
* @prop {Function} [onClick] | ||
* | ||
* @return {ReactElement} | ||
*/ | ||
export default function Block (props) { | ||
let className = 'block' | ||
if (props.className !== '') { | ||
className += ' ' + props.className | ||
} | ||
|
||
if (props.onClick !== null) { | ||
className += ' clickable' | ||
} | ||
|
||
return ( | ||
<div className={className} {...props.onClick !== null && { onClick: props.onClick }}> | ||
<div className='wrapper'> | ||
{props.wrapped} | ||
</div> | ||
{props.unwrapped && props.unwrapped} | ||
</div> | ||
) | ||
} | ||
|
||
Block.propTypes = { | ||
wrapped: PropTypes.any.isRequired, | ||
unwrapped: PropTypes.any, | ||
className: PropTypes.string, | ||
onClick: PropTypes.func | ||
} | ||
|
||
Block.defaultProps = { | ||
className: '', | ||
onClick: null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
function makeBread (root) { | ||
if (root.endsWith('/')) { | ||
root = root.substring(0, root.length - 1) | ||
} | ||
|
||
let parts = root.split('/').map(part => { | ||
return { | ||
name: part, | ||
path: part | ||
} | ||
}) | ||
|
||
for (let i = 1; i < parts.length; i++) { | ||
parts[i] = { | ||
name: parts[i].name, | ||
path: parts[i - 1].path + '/' + parts[i].path | ||
} | ||
} | ||
|
||
parts[0] = { | ||
name: 'ipfs', | ||
path: '/' | ||
} | ||
|
||
return parts | ||
} | ||
|
||
export default function Breadcrumbs ({path, navigate}) { | ||
const bread = makeBread(path) | ||
const res = [] | ||
|
||
bread.forEach((link, index) => { | ||
res.push(<a key={`${index}link`} onClick={() => { navigate(link.path) }}>{link.name}</a>) | ||
res.push(<span key={`${index}divisor`}>/</span>) | ||
}) | ||
|
||
res.pop() | ||
return ( | ||
<span className='breadcrumbs'>{res}</span> | ||
) | ||
} | ||
|
||
Breadcrumbs.propTypes = { | ||
path: PropTypes.string.isRequired, | ||
navigate: PropTypes.func.isRequired | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.