Skip to content

Commit

Permalink
fix: make action icons actionable in suspended state
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jun 20, 2018
1 parent 15eb284 commit 19ba4ac
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion add-on/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"description": "A menu item in Browser Action pop-up (panel_openWebui)"
},
"panel_openPreferences": {
"message": "Open Preferences",
"message": "Open Preferences of Browser Extension",
"description": "A menu item in Browser Action pop-up (panel_openPreferences)"
},
"panel_switchToCustomGateway": {
Expand Down
6 changes: 3 additions & 3 deletions add-on/src/popup/browser-action/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ module.exports = function header (props) {
const { ipfsNodeType, active, onToggleActive, onOpenPrefs, isIpfsOnline } = props
return html`
<div class="pt3 pb1 br2 br--top ba bw1 b--white" style="background-image: url('../../../images/stars.png'), linear-gradient(to bottom, #041727 0%,#043b55 100%); background-size: 100%; background-repeat: repeat;">
<div class="no-user-select ${active ? '' : 'o-40'}">
<div class="tc mb2 transition-all" style="${!active ? 'filter: blur( .15em )' : ''}">
<div class="no-user-select">
<div class="tc mb2 transition-all ${active ? '' : 'o-40'}" style="${active ? '' : 'filter: blur( .15em )'}">
${logo({
size: 52,
path: '../../../icons',
ipfsNodeType,
isIpfsOnline: (active && isIpfsOnline)
})}
</div>
<h1 class="mb1 montserrat f5 mt2 tc white normal">
<h1 class="mb1 montserrat f5 mt2 tc white normal ${active ? '' : 'o-40'}">
${browser.i18n.getMessage('panel_headerIpfsNodeIconLabel')}
</h1>
<div class="tc ma0 pa0">
Expand Down
5 changes: 0 additions & 5 deletions add-on/src/popup/browser-action/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = function operations ({
isApiAvailable,
onQuickUpload,
onOpenWebUi,
onOpenPrefs,
onToggleRedirect
}) {
const activeQuickUpload = active && isIpfsOnline && isApiAvailable
Expand All @@ -37,10 +36,6 @@ module.exports = function operations ({
disabled: !activeGatewaySwitch,
onClick: onToggleRedirect
})}
${navItem({
text: browser.i18n.getMessage('panel_openPreferences'),
onClick: onOpenPrefs
})}
${navItem({
text: browser.i18n.getMessage('panel_openWebui'),
disabled: !activeWebUI,
Expand Down
2 changes: 1 addition & 1 deletion add-on/src/popup/browser-action/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = function browserActionPage (state, emit) {

const headerProps = Object.assign({ onToggleNodeType, onToggleActive, onOpenPrefs }, state)
const contextActionsProps = Object.assign({ onCopyIpfsAddr, onCopyPublicGwAddr, onPin, onUnPin }, state)
const opsProps = Object.assign({ onQuickUpload, onOpenWebUi, onOpenPrefs, onToggleRedirect }, state)
const opsProps = Object.assign({ onQuickUpload, onOpenWebUi, onToggleRedirect }, state)

return html`
<div class="sans-serif" style="text-rendering: optimizeLegibility;">
Expand Down

0 comments on commit 19ba4ac

Please sign in to comment.