forked from trent_larson/crowd-funder-for-time-pwa
add encryption & decryption for the sensitive identity & mnemonic in SQL DB
This commit is contained in:
@@ -62,7 +62,7 @@ backup and database export, with platform-specific download instructions. * *
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from "vue-facing-decorator";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { AppString, NotificationIface } from "../constants/app";
|
||||
import { db } from "../db/index";
|
||||
import { logger } from "../utils/logger";
|
||||
import { PlatformServiceFactory } from "../services/PlatformServiceFactory";
|
||||
@@ -145,7 +145,7 @@ export default class DataExportSection extends Vue {
|
||||
return { value, key };
|
||||
},
|
||||
});
|
||||
const fileName = `${db.name}-backup.json`;
|
||||
const fileName = `${AppString.APP_NAME_NO_SPACES}-backup.json`;
|
||||
|
||||
if (this.platformCapabilities.hasFileDownload) {
|
||||
// Web platform: Use download link
|
||||
@@ -159,6 +159,8 @@ export default class DataExportSection extends Vue {
|
||||
// Native platform: Write to app directory
|
||||
const content = await blob.text();
|
||||
await this.platformService.writeAndShareFile(fileName, content);
|
||||
} else {
|
||||
throw new Error("This platform does not support file downloads.");
|
||||
}
|
||||
|
||||
this.$notify(
|
||||
|
||||
Reference in New Issue
Block a user