diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue
index d268dde7..69569e28 100644
--- a/src/views/AccountViewView.vue
+++ b/src/views/AccountViewView.vue
@@ -307,18 +307,10 @@
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
@@ -334,6 +326,7 @@ import { db, accountsDB } from "@/db";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { accessToken } from "@/libs/crypto";
import { AxiosError } from "axios/index";
+import AlertMessage from "@/components/AlertMessage";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer;
@@ -347,7 +340,7 @@ interface RateLimits {
nextWeekBeginDateTime: string;
}
-@Component
+@Component({ components: { AlertMessage } })
export default class AccountViewView extends Vue {
Constants = AppString;
@@ -546,27 +539,5 @@ export default class AccountViewView extends Vue {
// This same popup code is in many files.
alertMessage = "";
alertTitle = "";
- isAlertVisible = false;
- 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,
- };
- }
}
diff --git a/src/views/ContactAmountsView.vue b/src/views/ContactAmountsView.vue
index 1b1b46fb..d086b35b 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 0cdf6c5e..871dd254 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 c2a4143f..0425b802 100644
--- a/src/views/ContactsView.vue
+++ b/src/views/ContactsView.vue
@@ -230,19 +230,11 @@
+
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue
index cee4e502..06698ce2 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 dc9c5a90..89c54fc7 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/SeedBackupView.vue b/src/views/SeedBackupView.vue
index 9ad683dc..7aa06552 100644
--- a/src/views/SeedBackupView.vue
+++ b/src/views/SeedBackupView.vue
@@ -85,18 +85,10 @@
{{ activeAccount.mnemonic }}
You do not have an active identity.
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
@@ -105,8 +97,9 @@ import { Component, Vue } from "vue-facing-decorator";
import { accountsDB, db } from "@/db";
import * as R from "ramda";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
+import AlertMessage from "@/components/AlertMessage";
-@Component
+@Component({ components: [AlertMessage] })
export default class SeedBackupView extends Vue {
activeAccount = null;
showSeed = false;
@@ -136,27 +129,5 @@ export default class SeedBackupView extends Vue {
// This same popup code is in many files.
alertMessage = "";
alertTitle = "";
- isAlertVisible = false;
- 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,
- };
- }
}
diff --git a/src/views/StatisticsView.vue b/src/views/StatisticsView.vue
index 2913b209..af9797ba 100644
--- a/src/views/StatisticsView.vue
+++ b/src/views/StatisticsView.vue
@@ -79,22 +79,11 @@
{{ worldProperties.animationDurationSeconds }} seconds
-
-
-
-
-
-
-
-
{{ alertTitle }}
-
{{ alertMessage }}
-
+
@@ -102,13 +91,14 @@
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 } })
export default class StatisticsView extends Vue {
world: World;
worldProperties: WorldProperties = {};
@@ -210,23 +200,6 @@ export default class StatisticsView extends Vue {
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) {