Browse Source

Clean up vestigle old alert code

world-fix
Matthew Raymer 1 year ago
parent
commit
0a020a4069
  1. 5
      src/views/AccountViewView.vue
  2. 11
      src/views/ContactAmountsView.vue
  3. 7
      src/views/SeedBackupView.vue
  4. 13
      src/views/StatisticsView.vue

5
src/views/AccountViewView.vue

@ -317,7 +317,6 @@
<script lang="ts">
import "dexie-export-import";
import * as R from "ramda";
import { Component, Vue } from "vue-facing-decorator";
import { useClipboard } from "@vueuse/core";
@ -419,7 +418,6 @@ export default class AccountViewView extends Vue {
"Clear your cache and start over (after data backup).";
console.error("Telling user to clear cache at page create because:", err);
this.alertTitle = "Error Creating Account";
this.isAlertVisible = true;
}
}
@ -437,7 +435,6 @@ export default class AccountViewView extends Vue {
err
);
this.alertTitle = "Error Updating Contact Setting";
this.isAlertVisible = true;
}
}
@ -455,11 +452,9 @@ export default class AccountViewView extends Vue {
this.alertTitle = "Download Started";
this.alertMessage = "See your downloads directory for the backup.";
this.isAlertVisible = true;
} catch (error) {
this.alertTitle = "Export Error";
this.alertMessage = "See console logs for more info.";
this.isAlertVisible = true;
console.error("Export Error:", error);
}
}

11
src/views/ContactAmountsView.vue

@ -140,6 +140,8 @@ export default class ContactsView extends Vue {
apiServer = "";
contact: Contact | null = null;
giveRecords: Array<GiveServerRecord> = [];
alertTitle = "";
alertMessage = "";
// 'created' hook runs when the Vue instance is first created
async created() {
@ -200,7 +202,6 @@ export default class ContactsView extends Vue {
this.alertTitle = "Error With Server";
this.alertMessage =
"Got an error retrieving your given time from the server.";
this.isAlertVisible = true;
}
const url2 =
@ -226,7 +227,6 @@ export default class ContactsView extends Vue {
this.alertTitle = "Error With Server";
this.alertMessage =
"Got an error retrieving your given time from the server.";
this.isAlertVisible = true;
}
const sortedResult: Array<GiveServerRecord> = R.sort(
@ -238,7 +238,6 @@ export default class ContactsView extends Vue {
} catch (error) {
this.alertTitle = "Error With Server";
this.alertMessage = error as string;
this.isAlertVisible = true;
}
}
@ -316,7 +315,6 @@ export default class ContactsView extends Vue {
// Now set that error for the user to see.
this.alertTitle = "Error With Server";
this.alertMessage = userMessage;
this.isAlertVisible = true;
}
}
}
@ -324,12 +322,7 @@ export default class ContactsView extends Vue {
cannotConfirmMessage() {
this.alertTitle = "Not Allowed";
this.alertMessage = "Only the recipient can confirm final receipt.";
this.isAlertVisible = true;
}
// This same popup code is in many files.
alertTitle = "";
alertMessage = "";
}
</script>

7
src/views/SeedBackupView.vue

@ -103,6 +103,8 @@ import AlertMessage from "@/components/AlertMessage";
export default class SeedBackupView extends Vue {
activeAccount = null;
showSeed = false;
alertMessage = "";
alertTitle = "";
// 'created' hook runs when the Vue instance is first created
async created() {
@ -118,16 +120,11 @@ export default class SeedBackupView extends Vue {
console.error("Got an error loading an identity:", err);
this.alertTitle = "Error Loading Account";
this.alertMessage = "Got an error loading your seed data.";
this.isAlertVisible = true;
}
}
showSeedPhrase() {
this.showSeed = true;
}
// This same popup code is in many files.
alertMessage = "";
alertTitle = "";
}
</script>

13
src/views/StatisticsView.vue

@ -187,19 +187,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 = "";
}
}
function ExportToSVG(rendererSVG, filename) {

Loading…
Cancel
Save