mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
Check if we use electron
This commit is contained in:
parent
0eca538ddd
commit
70bba03a81
@ -41,7 +41,7 @@
|
||||
"os-locale": "3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "24.1.3",
|
||||
"electron": "24.2.0",
|
||||
"electron-builder": "23.6.0",
|
||||
"electron-packager": "17.1.1",
|
||||
"shelljs": "0.8.5"
|
||||
@ -49,4 +49,4 @@
|
||||
"engines": {
|
||||
"node": ">=18.14.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@
|
||||
"sass": "1.62.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.21.5",
|
||||
"@babel/core": "7.21.8",
|
||||
"@material/mwc-button": "0.27.0",
|
||||
"@material/mwc-checkbox": "0.27.0",
|
||||
"@material/mwc-dialog": "0.27.0",
|
||||
@ -68,13 +68,15 @@
|
||||
"asmcrypto.js": "2.3.2",
|
||||
"bcryptjs": "2.4.3",
|
||||
"epml": "0.3.3",
|
||||
"lit": "2.7.3",
|
||||
"file-saver": "2.0.5",
|
||||
"is-electron": "2.2.2",
|
||||
"lit": "2.7.4",
|
||||
"lit-translate": "2.0.1",
|
||||
"localforage": "1.10.0",
|
||||
"pwa-helpers": "0.9.1",
|
||||
"redux": "4.2.1",
|
||||
"redux-thunk": "2.4.2",
|
||||
"rollup": "3.21.1",
|
||||
"rollup": "3.21.5",
|
||||
"rollup-plugin-node-globals": "1.4.0",
|
||||
"rollup-plugin-progress": "1.1.2",
|
||||
"rollup-plugin-scss": "3.0.0"
|
||||
|
@ -7,6 +7,8 @@ import { createWallet } from '../../../../qortal-ui-crypto/api/createWallet.js'
|
||||
import { doLogin, doLogout, doSelectAddress } from '../../redux/app/app-actions.js'
|
||||
import { doStoreWallet } from '../../redux/user/user-actions.js'
|
||||
import { checkApiKey } from '../../apiKeyUtils.js'
|
||||
import FileSaver from 'file-saver'
|
||||
import isElectron from 'is-electron'
|
||||
import ripple from '../../functional-components/loading-ripple.js'
|
||||
import snackbar from '../../functional-components/snackbar.js'
|
||||
import '../../functional-components/random-sentence-generator.js'
|
||||
@ -592,15 +594,33 @@ class CreateAccountSection extends connect(store)(LitElement) {
|
||||
const dataString = JSON.stringify(data)
|
||||
const blob = new Blob([dataString], { type: 'text/plain;charset=utf-8' })
|
||||
backupname = "qortal_backup_" + wallet.addresses[0].address + ".json"
|
||||
this.saveFileToDisk(blob, backupname)
|
||||
if (!isElectron()) {
|
||||
await FileSaver.saveAs(blob, `qortal_backup_${wallet.addresses[0].address}.json`)
|
||||
let snack4string = get("general.save")
|
||||
snackbar.add({
|
||||
labelText: `${snack4string} ${backupname} ✅`,
|
||||
dismiss: true
|
||||
})
|
||||
} else {
|
||||
this.saveFileToDisk(blob, backupname)
|
||||
}
|
||||
}
|
||||
|
||||
downloadSeedphrase() {
|
||||
async downloadSeedphrase() {
|
||||
let seedname = ""
|
||||
const seed = this.shadowRoot.getElementById('randSentence').parsedString
|
||||
const blob = new Blob([seed], { type: 'text/plain;charset=utf-8' })
|
||||
seedname = "qortal_seedphrase_" + wallet.addresses[0].address + ".txt"
|
||||
this.saveFileToDisk(blob, seedname)
|
||||
seedname = "qortal_seedphrase.txt"
|
||||
if (!isElectron()) {
|
||||
await FileSaver.saveAs(blob, `qortal_seedphrase.txt`)
|
||||
let snack4string = get("general.save")
|
||||
snackbar.add({
|
||||
labelText: `${snack4string} ${seedname} ✅`,
|
||||
dismiss: true
|
||||
})
|
||||
} else {
|
||||
this.saveFileToDisk(blob, seedname)
|
||||
}
|
||||
}
|
||||
|
||||
async saveFileToDisk(blob, fileName) {
|
||||
|
@ -35,17 +35,17 @@
|
||||
"prosemirror-commands": "1.5.1",
|
||||
"prosemirror-dropcursor": "1.8.0",
|
||||
"prosemirror-gapcursor": "1.3.1",
|
||||
"prosemirror-history": "1.3.0",
|
||||
"prosemirror-history": "1.3.1",
|
||||
"prosemirror-keymap": "1.2.1",
|
||||
"prosemirror-model": "1.19.0",
|
||||
"prosemirror-schema-list": "1.2.2",
|
||||
"prosemirror-state": "1.4.2",
|
||||
"prosemirror-transform": "1.7.1",
|
||||
"prosemirror-view": "1.31.0",
|
||||
"prosemirror-view": "1.31.1",
|
||||
"short-unique-id": "4.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.21.5",
|
||||
"@babel/core": "7.21.8",
|
||||
"@material/mwc-button": "0.27.0",
|
||||
"@material/mwc-checkbox": "0.27.0",
|
||||
"@material/mwc-dialog": "0.27.0",
|
||||
@ -78,14 +78,16 @@
|
||||
"@vaadin/icons": "24.0.4",
|
||||
"@vaadin/tooltip": "24.0.4",
|
||||
"@zip.js/zip.js": "2.7.6",
|
||||
"axios": "1.3.5",
|
||||
"axios": "1.4.0",
|
||||
"epml": "0.3.3",
|
||||
"file-saver": "2.0.5",
|
||||
"highcharts": "10.3.3",
|
||||
"html-escaper": "3.0.3",
|
||||
"lit": "2.7.3",
|
||||
"is-electron": "2.2.2",
|
||||
"lit": "2.7.4",
|
||||
"lit-translate": "2.0.1",
|
||||
"passive-events-support": "1.0.33",
|
||||
"rollup": "3.21.1",
|
||||
"rollup": "3.21.5",
|
||||
"rollup-plugin-node-globals": "1.4.0",
|
||||
"rollup-plugin-progress": "1.1.2"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user