Skip to content

Commit

Permalink
feat: enable pinning with embedded js-ips node
Browse files Browse the repository at this point in the history
Closes #525
  • Loading branch information
lidel committed Jul 16, 2018
1 parent 50b3abf commit 1fd72d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
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

0 comments on commit 1fd72d4

Please sign in to comment.