Considerable cleanup and merge

This commit is contained in:
Matthew Raymer
2023-07-06 16:59:50 +08:00
parent f568149745
commit 3b41014083
8 changed files with 196 additions and 130 deletions

View File

@@ -105,7 +105,6 @@ export default class NewEditProjectView extends Vue {
isHiddenSave = false;
isHiddenSpinner = true;
// 'created' hook runs when the Vue instance is first created
async created() {
await db.open();
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
@@ -122,7 +121,9 @@ export default class NewEditProjectView extends Vue {
const account = R.find((acc) => acc.did === this.activeDid, accounts);
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error("No identity found.");
throw new Error(
"An ID is chosen but there are no keys for it so it cannot be used to talk with the service."
);
}
this.LoadProject(identity);
}
@@ -257,7 +258,9 @@ export default class NewEditProjectView extends Vue {
const account = R.find((acc) => acc.did === this.activeDid, accounts);
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error("No identity found.");
throw new Error(
"An ID is chosen but there are no keys for it so it cannot be used to talk with the service."
);
}
this.SaveProject(identity);
}