Skip to content

Commit

Permalink
Merge pull request #523 from tableflip/feat/upgrade-ipfs-0.30
Browse files Browse the repository at this point in the history
feat: upgrade to js-ipfs 0.30 and enable pinning with embedded node
  • Loading branch information
lidel authored Jul 16, 2018
2 parents e013d40 + 1fd72d4 commit bcc8f40
Show file tree
Hide file tree
Showing 5 changed files with 440 additions and 246 deletions.
2 changes: 1 addition & 1 deletion add-on/src/lib/dir-view.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const filesize = require('filesize')
const mainStyle = require('ipfs/src/http/gateway/dir-view/style')
const mainStyle = require('ipfs-http-response/src/dir-view/style')

function buildFilesList (path, links) {
const rows = links.map((link) => {
Expand Down
2 changes: 1 addition & 1 deletion add-on/src/popup/browser-action/context-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function contextActions ({
onUnPin
}) {
if (!isIpfsContext) return null
const activePinControls = active && isIpfsOnline && isApiAvailable && (ipfsNodeType !== 'embedded') && !(isPinning || isUnPinning)
const activePinControls = active && isIpfsOnline && isApiAvailable && !(isPinning || isUnPinning)
return html`
<div class='fade-in pv1'>
${navItem({
Expand Down
5 changes: 1 addition & 4 deletions add-on/src/popup/quick-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ function quickUploadOptions (state, emit) {
const onExpandOptions = (e) => { state.expandOptions = true; emit('render') }
const onWrapWithDirectoryChange = (e) => { state.wrapWithDirectory = e.target.checked }
const onPinUploadChange = (e) => { state.pinUpload = e.target.checked }
const isPinningSupported = state.ipfsNodeType === 'external'
if (state.expandOptions) {
return html`
<div id='quickUploadOptions' class='sans-serif mt3 f6 lh-copy light-gray no-user-select'>
Expand All @@ -150,13 +149,11 @@ function quickUploadOptions (state, emit) {
<span class='mark db flex items-center relative mr2 br2'></span>
${browser.i18n.getMessage('quickUpload_options_wrapWithDirectory')}
</label>
${isPinningSupported ? (html`
<label for='pinUpload' class='flex items-center db relative mt1 pointer'>
<input id='pinUpload' type='checkbox' onchange=${onPinUploadChange} checked=${state.pinUpload} />
<span class='mark db flex items-center relative mr2 br2'></span>
${browser.i18n.getMessage('quickUpload_options_pinUpload')}
</label>`)
: null}
</label>
</div>
`
}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@
"file-type": "8.0.0",
"filereader-pull-stream": "1.0.0",
"filesize": "3.6.1",
"ipfs": "0.29.3",
"ipfs-api": "22.2.1",
"ipfs": "0.30.0",
"ipfs-api": "22.2.3",
"ipfs-css": "0.5.2",
"ipfs-http-response": "0.1.2",
"ipfs-postmsg-proxy": "3.0.0",
"is-ipfs": "0.3.2",
"is-svg": "3.0.0",
Expand Down
Loading

0 comments on commit bcc8f40

Please sign in to comment.