separate account from other data for backup/restore
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<script lang="ts">
|
||||
import { Options, Vue } from "vue-class-component";
|
||||
import { db } from "@/db";
|
||||
import { MASTER_SETTINGS } from "@/db/tables";
|
||||
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
||||
|
||||
@Options({
|
||||
components: {},
|
||||
@@ -69,7 +69,7 @@ export default class NewEditAccountView extends Vue {
|
||||
// 'created' hook runs when the Vue instance is first created
|
||||
async created() {
|
||||
await db.open();
|
||||
const settings = await db.settings.get(MASTER_SETTINGS);
|
||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||
if (settings) {
|
||||
this.firstName = settings.firstName || "";
|
||||
this.lastName = settings.lastName || "";
|
||||
@@ -77,7 +77,7 @@ export default class NewEditAccountView extends Vue {
|
||||
}
|
||||
|
||||
onClickSaveChanges() {
|
||||
db.settings.update(MASTER_SETTINGS, {
|
||||
db.settings.update(MASTER_SETTINGS_KEY, {
|
||||
firstName: this.firstName,
|
||||
lastName: this.lastName,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user