File tree 3 files changed +7
-3
lines changed 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,15 @@ module.exports = function operations ({
9
9
ipfsNodeType,
10
10
isIpfsOnline,
11
11
redirectEnabled,
12
+ uploadEnabled,
12
13
onQuickUpload,
13
14
onOpenWebUi,
14
15
onOpenPrefs,
15
16
onToggleRedirect
16
17
} ) {
17
18
return html `
18
19
< div class ="fade-in pv1 ">
19
- ${ isIpfsOnline ? (
20
+ ${ isIpfsOnline && uploadEnabled ? (
20
21
navItem ( {
21
22
text : browser . i18n . getMessage ( 'panel_quickUpload' ) ,
22
23
bold : true ,
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ module.exports = (state, emitter) => {
21
21
gatewayAddress : null ,
22
22
swarmPeers : null ,
23
23
gatewayVersion : null ,
24
- redirectEnabled : false
24
+ redirectEnabled : false ,
25
+ uploadEnabled : false
25
26
} )
26
27
27
28
let port
@@ -201,6 +202,8 @@ module.exports = (state, emitter) => {
201
202
state . ipfsNodeType = status . ipfsNodeType
202
203
state . ipfsApiUrl = options . ipfsApiUrl
203
204
state . redirectEnabled = options . useCustomGateway
205
+ // Upload requires access to the background page (https://github.com/ipfs-shipyard/ipfs-companion/issues/477)
206
+ state . uploadEnabled = ! ! ( await browser . runtime . getBackgroundPage ( ) )
204
207
state . swarmPeers = status . peerCount === - 1 ? 0 : status . peerCount
205
208
state . isIpfsOnline = status . peerCount > - 1
206
209
state . gatewayVersion = status . gatewayVersion ? status . gatewayVersion : null
Original file line number Diff line number Diff line change @@ -5554,7 +5554,7 @@ level-js@^2.2.4:
5554
5554
typedarray-to-buffer "~1.0.0"
5555
5555
xtend "~2.1.2"
5556
5556
5557
- " level-js@github: timkuijsten/level.js#idbunwrapper " :
5557
+ level-js@timkuijsten/level.js#idbunwrapper:
5558
5558
version "2.2.3"
5559
5559
resolved "https://codeload.github.com/timkuijsten/level.js/tar.gz/18e03adab34c49523be7d3d58fafb0c632f61303"
5560
5560
dependencies :
You can’t perform that action at this time.
0 commit comments