Browse Source

Merge pull request #440 from meriadec/master

Fix images in build. Fix Linux build. Faster app relaunch.
master
Gaëtan Renaudeau 7 years ago
committed by GitHub
parent
commit
dfe34b1682
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      electron-builder.yml
  2. 9
      src/components/SettingsPage/sections/Profile.js
  3. 2
      src/helpers/staticPath.js

2
electron-builder.yml

@ -13,6 +13,8 @@ mac:
- zip
linux:
asarUnpack:
- node_modules/@ledgerhq/ledger-core
artifactName: ${name}-${version}-${os}-${arch}.${ext}
category: Finance
target:

9
src/components/SettingsPage/sections/Profile.js

@ -84,14 +84,13 @@ class TabProfile extends PureComponent<Props, State> {
this.props.cleanAccountsCache()
await delay(500)
db.cleanCache()
remote.app.relaunch()
remote.app.exit()
remote.getCurrentWindow().webContents.reload()
}
handleHardReset = () => {
handleHardReset = async () => {
db.resetAll()
remote.app.relaunch()
remote.app.exit()
await delay(500)
remote.getCurrentWindow().webContents.reload()
}
handleChangePasswordCheck = isChecked => {

2
src/helpers/staticPath.js

@ -20,7 +20,7 @@ const staticPath =
* note: `i` for `image` (using `img` was confusing when using with <img /> tag)
*/
export function i(path: string): string {
return `/images/${path}`
return isRunningInAsar ? `${staticPath}/images/${path}` : `/images/${path}`
}
export default staticPath

Loading…
Cancel
Save