diff --git a/src/components/AlertMessage.vue b/src/components/AlertMessage.vue
new file mode 100644
index 0000000..6f3ea5b
--- /dev/null
+++ b/src/components/AlertMessage.vue
@@ -0,0 +1,47 @@
+
+
+
+
{{ alertTitle }}
+
{{ alertMessage }}
+
+
+
+
+
+
+
diff --git a/src/components/World/components/objects/landmarks.js b/src/components/World/components/objects/landmarks.js
index 3c6dbfa..a460337 100644
--- a/src/components/World/components/objects/landmarks.js
+++ b/src/components/World/components/objects/landmarks.js
@@ -23,6 +23,9 @@ export async function loadLandmarks(vue, world, scene, loop) {
const accounts = await accountsDB.accounts.toArray();
const account = R.find((acc) => acc.did === activeDid, accounts);
const identity = JSON.parse(account?.identity || "undefined");
+ if (!identity) {
+ throw new Error("No identity found.");
+ }
const token = await accessToken(identity);
const url = apiServer + "/api/v2/report/claims?claimType=GiveAction";
diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue
index 17e6e2d..ed2c7df 100644
--- a/src/views/AccountViewView.vue
+++ b/src/views/AccountViewView.vue
@@ -307,25 +307,16 @@
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
diff --git a/src/views/ContactAmountsView.vue b/src/views/ContactAmountsView.vue
index b05099f..3912731 100644
--- a/src/views/ContactAmountsView.vue
+++ b/src/views/ContactAmountsView.vue
@@ -109,25 +109,17 @@
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
diff --git a/src/views/ContactQRScanShowView.vue b/src/views/ContactQRScanShowView.vue
index 0cdf6c5..871dd25 100644
--- a/src/views/ContactQRScanShowView.vue
+++ b/src/views/ContactQRScanShowView.vue
@@ -64,17 +64,10 @@
:dotsOptions="{ type: 'square' }"
class="flex justify-center"
/>
-
-
-
-
-
{{ alertMessage }}
-
+
@@ -86,6 +79,7 @@ import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import * as R from "ramda";
import { SimpleSigner } from "@/libs/crypto";
import * as didJwt from "did-jwt";
+import AlertMessage from "@/components/AlertMessage";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer;
@@ -93,6 +87,7 @@ const Buffer = require("buffer/").Buffer;
@Component({
components: {
QRCodeVue3,
+ AlertMessage,
},
})
export default class ContactQRScanShow extends Vue {
@@ -144,25 +139,7 @@ export default class ContactQRScanShow extends Vue {
}
// This same popup code is in many files.
+ alertTitle = "";
alertMessage = "";
- public onClickClose() {
- this.alertMessage = "";
- }
- public computedAlertClassNames() {
- return {
- hidden: !this.alertMessage,
- "dismissable-alert": true,
- "bg-slate-100": true,
- "p-5": true,
- rounded: true,
- "drop-shadow-lg": true,
- fixed: true,
- "top-3": true,
- "inset-x-3": true,
- "transition-transform": true,
- "ease-in": true,
- "duration-300": true,
- };
- }
}
diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue
index c2a4143..0425b80 100644
--- a/src/views/ContactsView.vue
+++ b/src/views/ContactsView.vue
@@ -230,19 +230,11 @@
+
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 3056d92..4f3ba8e 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -106,18 +106,10 @@
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue
index cee4e50..06698ce 100644
--- a/src/views/NewEditProjectView.vue
+++ b/src/views/NewEditProjectView.vue
@@ -63,32 +63,25 @@
Cancel
+
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue
index dc9c5a9..89c54fc 100644
--- a/src/views/ProjectViewView.vue
+++ b/src/views/ProjectViewView.vue
@@ -179,18 +179,10 @@
-->
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
@@ -198,7 +190,7 @@
import { AxiosError } from "axios";
import * as moment from "moment";
import * as R from "ramda";
-import { Options, Vue } from "vue-class-component";
+import { Component, Vue } from "vue-facing-decorator";
import GiftedDialog from "@/components/GiftedDialog.vue";
import { accountsDB, db } from "@/db";
@@ -207,9 +199,10 @@ import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { createAndSubmitGive } from "@/libs/endorserServer";
import { accessToken } from "@/libs/crypto";
import { IIdentifier } from "@veramo/core";
+import AlertMessage from "@/components/AlertMessage";
-@Options({
- components: { GiftedDialog },
+@Component({
+ components: { GiftedDialog, AlertMessage },
})
export default class ProjectViewView extends Vue {
activeDid = "";
@@ -379,25 +372,5 @@ export default class ProjectViewView extends Vue {
// This same popup code is in many files.
alertMessage = "";
alertTitle = "";
- public onClickClose() {
- this.alertTitle = "";
- this.alertMessage = "";
- }
- public computedAlertClassNames() {
- return {
- hidden: !this.alertMessage,
- "dismissable-alert": true,
- "bg-slate-100": true,
- "p-5": true,
- rounded: true,
- "drop-shadow-lg": true,
- fixed: true,
- "top-3": true,
- "inset-x-3": true,
- "transition-transform": true,
- "ease-in": true,
- "duration-300": true,
- };
- }
}
diff --git a/src/views/ProjectsView.vue b/src/views/ProjectsView.vue
index a0dbe95..9959641 100644
--- a/src/views/ProjectsView.vue
+++ b/src/views/ProjectsView.vue
@@ -107,18 +107,22 @@
+
diff --git a/src/views/StatisticsView.vue b/src/views/StatisticsView.vue
index 2913b20..1b01fa9 100644
--- a/src/views/StatisticsView.vue
+++ b/src/views/StatisticsView.vue
@@ -79,22 +79,12 @@
{{ worldProperties.animationDurationSeconds }} seconds
-
-
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
@@ -102,23 +92,29 @@
import { SVGRenderer } from "three/addons/renderers/SVGRenderer.js";
import { Component, Vue } from "vue-facing-decorator";
import { World } from "@/components/World/World.js";
+import AlertMessage from "@/components/AlertMessage";
interface WorldProperties {
startTime?: string;
endTime?: string;
}
-@Component
+@Component({ components: { AlertMessage, World } })
export default class StatisticsView extends Vue {
world: World;
worldProperties: WorldProperties = {};
// 'mounted' hook runs after initial render
mounted() {
- const container = document.querySelector("#scene-container");
- const newWorld = new World(container, this);
- newWorld.start();
- this.world = newWorld;
+ try {
+ const container = document.querySelector("#scene-container");
+ console.log(container);
+ const newWorld = new World(container, this);
+ newWorld.start();
+ this.world = newWorld;
+ } catch (err) {
+ console.log(err);
+ }
}
public captureGraphics() {
@@ -197,36 +193,6 @@ export default class StatisticsView extends Vue {
alertTitle = "";
alertMessage = "";
- isAlertVisible = false;
-
- public setAlert(title, message) {
- this.alertTitle = title;
- this.alertMessage = message;
- this.isAlertVisible = true;
- }
-
- public onClickClose() {
- this.isAlertVisible = false;
- this.alertTitle = "";
- this.alertMessage = "";
- }
-
- public computedAlertClassNames() {
- return {
- hidden: !this.isAlertVisible,
- "dismissable-alert": true,
- "bg-slate-100": true,
- "p-5": true,
- rounded: true,
- "drop-shadow-lg": true,
- fixed: true,
- "top-3": true,
- "inset-x-3": true,
- "transition-transform": true,
- "ease-in": true,
- "duration-300": true,
- };
- }
}
function ExportToSVG(rendererSVG, filename) {