Skip to content

Commit

Permalink
add IPFS logo to dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Mar 11, 2022
1 parent d69c93a commit f9aa807
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
20 changes: 20 additions & 0 deletions assets/icons/ipfs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/dialogs/prompt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = async function showPrompt (options) {
show: false,
width: 350,
height: 330,
useContentSize: true,
resizable: false,
autoHideMenuBar: true,
fullscreenable: false,
Expand Down
9 changes: 8 additions & 1 deletion src/dialogs/prompt/template.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
const { styles } = require('./styles')

const fs = require('fs-extra')
const path = require('path')

const ipfsLogoPath = path.join(__dirname, '../../../assets/icons/ipfs.svg')
const ipfsLogo = 'data:image/svg+xml;base64,' + fs.readFileSync(ipfsLogoPath).toString('base64')

module.exports = ({ message, inputs, buttons, id }) => (`<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
</head>
<body>
<img src="${ipfsLogo}" id="logo">
<p>${message}</p>
<form>
${inputs}
Expand Down
2 changes: 1 addition & 1 deletion src/download-cid.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function getCID () {
],
window: {
width: 500,
height: 120
height: 159
}
})

Expand Down
2 changes: 1 addition & 1 deletion src/protocol-handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function getAction () {
],
window: {
width: 500,
height: 210 // Use 240 when adding the explore screen option.
height: 245
}
})

Expand Down

0 comments on commit f9aa807

Please sign in to comment.