Browse Source

make notification errors go away automatically

master
Trent Larson 2 weeks ago
parent
commit
f405e7d02f
  1. 12
      src/views/AccountViewView.vue
  2. 2
      src/views/ClaimAddRawView.vue
  3. 16
      src/views/ClaimView.vue
  4. 12
      src/views/ContactAmountsView.vue
  5. 15
      src/views/ContactEditView.vue
  6. 10
      src/views/ContactsView.vue
  7. 2
      src/views/DIDView.vue
  8. 12
      src/views/DiscoverView.vue
  9. 8
      src/views/GiftedDetailsView.vue
  10. 8
      src/views/HelpNotificationsView.vue
  11. 2
      src/views/HomeView.vue
  12. 2
      src/views/IdentitySwitcherView.vue
  13. 4
      src/views/ImportAccountView.vue
  14. 10
      src/views/OfferDetailsView.vue
  15. 2
      src/views/ProjectViewView.vue
  16. 6
      src/views/ProjectsView.vue
  17. 6
      src/views/SearchAreaView.vue
  18. 2
      src/views/SeedBackupView.vue
  19. 2
      src/views/SharedPhotoView.vue
  20. 2
      src/views/StatisticsView.vue
  21. 8
      src/views/TestView.vue

12
src/views/AccountViewView.vue

@ -936,7 +936,7 @@ export default class AccountViewView extends Vue {
title: "Error Loading Profile", title: "Error Loading Profile",
text: "See the Help page about errors with your personal data.", text: "See the Help page about errors with your personal data.",
}, },
-1, 5000,
); );
} }
@ -1339,7 +1339,7 @@ export default class AccountViewView extends Vue {
title: "Export Error", title: "Export Error",
text: "There was an error exporting the data.", text: "There was an error exporting the data.",
}, },
-1, 3000,
); );
} }
@ -1475,7 +1475,7 @@ export default class AccountViewView extends Vue {
title: "Update Error", title: "Update Error",
text: "Unable to update your settings. Check claim limits again.", text: "Unable to update your settings. Check claim limits again.",
}, },
-1, 5000,
); );
} }
} }
@ -1540,7 +1540,7 @@ export default class AccountViewView extends Vue {
title: "Reload", title: "Reload",
text: "Now reload the app to get a new VAPID to use with this push server.", text: "Now reload the app to get a new VAPID to use with this push server.",
}, },
-1, 5000,
); );
} }
@ -1598,7 +1598,7 @@ export default class AccountViewView extends Vue {
title: "Error", title: "Error",
text: "There was a problem deleting the image. Contact support if you want it removed from the servers.", text: "There was a problem deleting the image. Contact support if you want it removed from the servers.",
}, },
-1, 5000,
); );
// keep the imageUrl in localStorage so the user can try again if they want // keep the imageUrl in localStorage so the user can try again if they want
} }
@ -1630,7 +1630,7 @@ export default class AccountViewView extends Vue {
title: "Error", title: "Error",
text: "There was an error deleting the image.", text: "There was an error deleting the image.",
}, },
5000, 3000,
); );
} }
} }

2
src/views/ClaimAddRawView.vue

@ -135,7 +135,7 @@ export default class ClaimAddRawView extends Vue {
title: "Error", title: "Error",
text: "There was a problem submitting the claim.", text: "There was a problem submitting the claim.",
}, },
-1, 5000,
); );
} }
} }

16
src/views/ClaimView.vue

@ -606,7 +606,7 @@ export default class ClaimView extends Vue {
title: "Error Loading Profile", title: "Error Loading Profile",
text: "See the Help page for problems with your personal data.", text: "See the Help page for problems with your personal data.",
}, },
-1, 5000,
); );
} }
@ -623,7 +623,7 @@ export default class ClaimView extends Vue {
title: "Error", title: "Error",
text: "No claim ID was provided.", text: "No claim ID was provided.",
}, },
-1, 5000,
); );
} }
@ -685,7 +685,7 @@ export default class ClaimView extends Vue {
title: "Error", title: "Error",
text: "There was a problem retrieving that claim.", text: "There was a problem retrieving that claim.",
}, },
-1, 5000,
); );
return; return;
} }
@ -732,7 +732,7 @@ export default class ClaimView extends Vue {
title: "Error", title: "Error",
text: "Got error retrieving linked provider data.", text: "Got error retrieving linked provider data.",
}, },
-1, 5000,
); );
} }
} else if (this.veriClaim.claimType === "Offer") { } else if (this.veriClaim.claimType === "Offer") {
@ -755,7 +755,7 @@ export default class ClaimView extends Vue {
title: "Error", title: "Error",
text: "Got error retrieving linked offer data.", text: "Got error retrieving linked offer data.",
}, },
-1, 5000,
); );
} }
} }
@ -810,7 +810,7 @@ export default class ClaimView extends Vue {
title: "Error", title: "Error",
text: "There was a problem getting that claim.", text: "There was a problem getting that claim.",
}, },
-1, 5000,
); );
} }
} catch (error: unknown) { } catch (error: unknown) {
@ -854,7 +854,7 @@ export default class ClaimView extends Vue {
title: "Error", title: "Error",
text: "Something went wrong retrieving that claim.", text: "Something went wrong retrieving that claim.",
}, },
-1, 5000,
); );
} }
} }
@ -917,7 +917,7 @@ export default class ClaimView extends Vue {
title: "Error", title: "Error",
text: "There was a problem submitting the confirmation.", text: "There was a problem submitting the confirmation.",
}, },
-1, 5000,
); );
} }
} }

12
src/views/ContactAmountsView.vue

@ -165,7 +165,7 @@ export default class ContactAmountssView extends Vue {
err.userMessage || err.userMessage ||
"There was an error retrieving your settings or contacts or gives.", "There was an error retrieving your settings or contacts or gives.",
}, },
-1, 5000,
); );
} }
} }
@ -196,7 +196,7 @@ export default class ContactAmountssView extends Vue {
title: "Error With Server", title: "Error With Server",
text: "Got an error retrieving your given time from the server.", text: "Got an error retrieving your given time from the server.",
}, },
-1, 5000,
); );
} }
@ -223,7 +223,7 @@ export default class ContactAmountssView extends Vue {
title: "Error With Server", title: "Error With Server",
text: "Got an error retrieving your given time from the server.", text: "Got an error retrieving your given time from the server.",
}, },
-1, 5000,
); );
} }
@ -241,7 +241,7 @@ export default class ContactAmountssView extends Vue {
title: "Error With Server", title: "Error With Server",
text: error as string, text: error as string,
}, },
-1, 5000,
); );
} }
} }
@ -297,7 +297,7 @@ export default class ContactAmountssView extends Vue {
title: "Error With Server", title: "Error With Server",
text: userMessage, text: userMessage,
}, },
-1, 5000,
); );
} }
} }
@ -310,7 +310,7 @@ export default class ContactAmountssView extends Vue {
title: "Not Allowed", title: "Not Allowed",
text: "Only the recipient can confirm final receipt.", text: "Only the recipient can confirm final receipt.",
}, },
-1, 5000,
); );
} }
} }

15
src/views/ContactEditView.vue

@ -93,22 +93,21 @@ export default class ContactEditView extends Vue {
async created() { async created() {
const contactDid = (this.$route as RouteLocation).params.did; const contactDid = (this.$route as RouteLocation).params.did;
if (!contactDid) { const contact = await db.contacts.get(contactDid || "");
if (contact) {
this.contact = contact;
this.contactName = contact.name || "";
this.contactNotes = contact.notes || "";
} else {
this.$notify({ this.$notify({
group: "alert", group: "alert",
type: "error", type: "danger",
title: "Contact Not Found", title: "Contact Not Found",
text: "There is no contact with that DID.", text: "There is no contact with that DID.",
}); });
(this.$router as Router).push({ path: "/contacts" }); (this.$router as Router).push({ path: "/contacts" });
return; return;
} }
const contact = await db.contacts.get(contactDid);
if (contact) {
this.contact = contact;
this.contactName = contact.name || "";
this.contactNotes = contact.notes || "";
}
} }
async saveEdit() { async saveEdit() {

10
src/views/ContactsView.vue

@ -635,7 +635,7 @@ export default class ContactsView extends Vue {
(useRecipient ? "given" : "received") + (useRecipient ? "given" : "received") +
" data from the server.", " data from the server.",
}, },
5000, 3000,
); );
} }
}; };
@ -693,7 +693,7 @@ export default class ContactsView extends Vue {
title: "Load Error", title: "Load Error",
text: "Got an error loading your gives.", text: "Got an error loading your gives.",
}, },
5000, 3000,
); );
} }
} }
@ -969,7 +969,7 @@ export default class ContactsView extends Vue {
message += message +=
" Check that the contact doesn't conflict with any you already have."; " Check that the contact doesn't conflict with any you already have.";
} }
this.danger(message, "Contact Not Added", -1); this.danger(message, "Contact Not Added", 5000);
}); });
} }
@ -1018,7 +1018,7 @@ export default class ContactsView extends Vue {
text: text:
(contact.name || "That unnamed person") + " has been registered.", (contact.name || "That unnamed person") + " has been registered.",
}, },
5000, 3000,
); );
} else { } else {
this.$notify( this.$notify(
@ -1298,7 +1298,7 @@ export default class ContactsView extends Vue {
title: "Copied", title: "Copied",
text: "The link for those contacts is now in the clipboard.", text: "The link for those contacts is now in the clipboard.",
}, },
5000, 3000,
); );
}); });
} }

2
src/views/DIDView.vue

@ -479,7 +479,7 @@ export default class DIDView extends Vue {
title: "Error", title: "Error",
text: e.userMessage || "There was a problem retrieving claims.", text: e.userMessage || "There was a problem retrieving claims.",
}, },
-1, 3000,
); );
} finally { } finally {
this.isLoading = false; this.isLoading = false;

12
src/views/DiscoverView.vue

@ -337,9 +337,9 @@ export default class DiscoverView extends Vue {
group: "alert", group: "alert",
type: "danger", type: "danger",
title: "Error", title: "Error",
text: `There was a problem accessing the server. Try again later.`, text: `There was a problem accessing the server.`,
}, },
-1, 3000,
); );
throw details; throw details;
@ -376,7 +376,7 @@ export default class DiscoverView extends Vue {
title: "Error", title: "Error",
text: e.userMessage || "There was a problem retrieving projects.", text: e.userMessage || "There was a problem retrieving projects.",
}, },
-1, 5000,
); );
} finally { } finally {
this.isLoading = false; this.isLoading = false;
@ -433,9 +433,9 @@ export default class DiscoverView extends Vue {
group: "alert", group: "alert",
type: "danger", type: "danger",
title: "Error", title: "Error",
text: "There was a problem accessing the server. Try again later.", text: "There was a problem accessing the server.",
}, },
-1, 3000,
); );
throw await response.text(); throw await response.text();
} }
@ -472,7 +472,7 @@ export default class DiscoverView extends Vue {
title: "Error", title: "Error",
text: e.userMessage || "There was a problem retrieving projects.", text: e.userMessage || "There was a problem retrieving projects.",
}, },
-1, 5000,
); );
} finally { } finally {
this.isLoading = false; this.isLoading = false;

8
src/views/GiftedDetailsView.vue

@ -818,7 +818,7 @@ export default class GiftedDetails extends Vue {
title: "Error", title: "Error",
text: errorMessage || "There was an error creating the give.", text: errorMessage || "There was an error creating the give.",
}, },
-1, 5000,
); );
} else { } else {
this.$notify( this.$notify(
@ -828,7 +828,7 @@ export default class GiftedDetails extends Vue {
title: "Success", title: "Success",
text: `That ${this.isTrade ? "trade" : "gift"} was recorded.`, text: `That ${this.isTrade ? "trade" : "gift"} was recorded.`,
}, },
5000, 3000,
); );
localStorage.removeItem("imageUrl"); localStorage.removeItem("imageUrl");
if (this.destinationPathAfter) { if (this.destinationPathAfter) {
@ -851,7 +851,7 @@ export default class GiftedDetails extends Vue {
title: "Error", title: "Error",
text: errorMessage, text: errorMessage,
}, },
-1, 5000,
); );
} }
} }
@ -912,7 +912,7 @@ export default class GiftedDetails extends Vue {
title: "Data Sharing", title: "Data Sharing",
text: libsUtil.PRIVACY_MESSAGE, text: libsUtil.PRIVACY_MESSAGE,
}, },
-1, 7000,
); );
} }
} }

8
src/views/HelpNotificationsView.vue

@ -348,7 +348,7 @@ export default class HelpNotificationsView extends Vue {
// Note that this exact verbiage shows in help text. // Note that this exact verbiage shows in help text.
text: "You must enable notifications before testing the web push.", text: "You must enable notifications before testing the web push.",
}, },
-1, 5000,
); );
return; return;
} }
@ -365,7 +365,7 @@ export default class HelpNotificationsView extends Vue {
"Check your device for the test web push message" + "Check your device for the test web push message" +
(skipFilter ? "." : " if there are new items in your feed."), (skipFilter ? "." : " if there are new items in your feed."),
}, },
-1, 5000,
); );
} catch (error) { } catch (error) {
console.error("Got an error sending test notification:", error); console.error("Got an error sending test notification:", error);
@ -376,7 +376,7 @@ export default class HelpNotificationsView extends Vue {
title: "Error Sending Test", title: "Error Sending Test",
text: "Got an error sending the test web push notification.", text: "Got an error sending the test web push notification.",
}, },
-1, 5000,
); );
} }
} }
@ -409,7 +409,7 @@ export default class HelpNotificationsView extends Vue {
title: "Failed", title: "Failed",
text: "Got an error sending a notification.", text: "Got an error sending a notification.",
}, },
-1, 5000,
); );
}); });
} }

2
src/views/HomeView.vue

@ -585,7 +585,7 @@ export default class HomeView extends Vue {
err.userMessage || err.userMessage ||
"There was an error retrieving your settings or the latest activity.", "There was an error retrieving your settings or the latest activity.",
}, },
-1, 5000,
); );
} }
} }

2
src/views/IdentitySwitcherView.vue

@ -144,7 +144,7 @@ export default class IdentitySwitcherView extends Vue {
title: "Error Loading Accounts", title: "Error Loading Accounts",
text: "Clear your cache and start over (after data backup).", text: "Clear your cache and start over (after data backup).",
}, },
-1, 5000,
); );
console.error("Telling user to clear cache at page create because:", err); console.error("Telling user to clear cache at page create because:", err);
} }

4
src/views/ImportAccountView.vue

@ -182,7 +182,7 @@ export default class ImportAccountView extends Vue {
title: "Invalid Mnemonic", title: "Invalid Mnemonic",
text: "Please check your mnemonic and try again.", text: "Please check your mnemonic and try again.",
}, },
-1, 5000,
); );
} else { } else {
this.$notify( this.$notify(
@ -192,7 +192,7 @@ export default class ImportAccountView extends Vue {
title: "Error", title: "Error",
text: "Got an error creating that identifier.", text: "Got an error creating that identifier.",
}, },
-1, 5000,
); );
} }
} }

10
src/views/OfferDetailsView.vue

@ -242,7 +242,7 @@ export default class OfferDetailsView extends Vue {
title: "Retrieval Error", title: "Retrieval Error",
text: "The previous record isn't available for editing. If you submit, you'll create a new record.", text: "The previous record isn't available for editing. If you submit, you'll create a new record.",
}, },
6000, 5000,
); );
} }
@ -325,7 +325,7 @@ export default class OfferDetailsView extends Vue {
title: "Error", title: "Error",
text: err.message || "There was an error retrieving your settings.", text: err.message || "There was an error retrieving your settings.",
}, },
-1, 5000,
); );
} }
@ -530,7 +530,7 @@ export default class OfferDetailsView extends Vue {
title: "Error", title: "Error",
text: errorMessage || "There was an error creating the offer.", text: errorMessage || "There was an error creating the offer.",
}, },
-1, 5000,
); );
} else { } else {
this.$notify( this.$notify(
@ -563,7 +563,7 @@ export default class OfferDetailsView extends Vue {
title: "Error", title: "Error",
text: errorMessage, text: errorMessage,
}, },
-1, 5000,
); );
} }
} }
@ -621,7 +621,7 @@ export default class OfferDetailsView extends Vue {
title: "Data Sharing", title: "Data Sharing",
text: libsUtil.PRIVACY_MESSAGE, text: libsUtil.PRIVACY_MESSAGE,
}, },
-1, 7000,
); );
} }
} }

2
src/views/ProjectViewView.vue

@ -576,7 +576,7 @@ export default class ProjectViewView extends Vue {
title: "Error Loading Profile", title: "Error Loading Profile",
text: "See the Help page to fix problems with your personal data.", text: "See the Help page to fix problems with your personal data.",
}, },
-1, 5000,
); );
} }

6
src/views/ProjectsView.vue

@ -475,9 +475,9 @@ export default class ProjectsView extends Vue {
group: "alert", group: "alert",
type: "danger", type: "danger",
title: "Error", title: "Error",
text: "Failed to get offers from the server. Try again later.", text: "Failed to get offers from the server.",
}, },
-1, 5000,
); );
} }
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
@ -490,7 +490,7 @@ export default class ProjectsView extends Vue {
title: "Error", title: "Error",
text: "Got an error loading offers.", text: "Got an error loading offers.",
}, },
-1, 5000,
); );
} finally { } finally {
this.isLoading = false; this.isLoading = false;

6
src/views/SearchAreaView.vue

@ -228,7 +228,7 @@ export default class SearchAreaView extends Vue {
title: "Error Updating Search Settings", title: "Error Updating Search Settings",
text: "Try going to a different page and then coming back.", text: "Try going to a different page and then coming back.",
}, },
-1, 5000,
); );
console.error( console.error(
"Telling user to retry the location search setting because:", "Telling user to retry the location search setting because:",
@ -243,7 +243,7 @@ export default class SearchAreaView extends Vue {
title: "No Location Selected", title: "No Location Selected",
text: "Select a location on the map.", text: "Select a location on the map.",
}, },
-1, 5000,
); );
} }
} }
@ -271,7 +271,7 @@ export default class SearchAreaView extends Vue {
title: "Error Updating Search Settings", title: "Error Updating Search Settings",
text: "Try going to a different page and then coming back.", text: "Try going to a different page and then coming back.",
}, },
-1, 5000,
); );
console.error( console.error(
"Telling user to retry the location search setting because:", "Telling user to retry the location search setting because:",

2
src/views/SeedBackupView.vue

@ -138,7 +138,7 @@ export default class SeedBackupView extends Vue {
title: "Error Loading Profile", title: "Error Loading Profile",
text: "Got an error loading your seed data.", text: "Got an error loading your seed data.",
}, },
-1, 3000,
); );
} }
} }

2
src/views/SharedPhotoView.vue

@ -120,7 +120,7 @@ export default class SharedPhotoView extends Vue {
title: "Error", title: "Error",
text: "Got an error loading this data.", text: "Got an error loading this data.",
}, },
-1, 3000,
); );
} }
} }

2
src/views/StatisticsView.vue

@ -91,7 +91,7 @@ export default class StatisticsView extends Vue {
title: "Mounting Error", title: "Mounting Error",
text: error.message, text: error.message,
}, },
-1, 5000,
); );
} }
} }

8
src/views/TestView.vue

@ -49,7 +49,7 @@
title: 'Information Alert', title: 'Information Alert',
text: 'Just wanted you to know.', text: 'Just wanted you to know.',
}, },
-1, 5000,
) )
" "
class="font-bold uppercase bg-slate-600 text-white px-3 py-2 rounded-md mr-2" class="font-bold uppercase bg-slate-600 text-white px-3 py-2 rounded-md mr-2"
@ -66,7 +66,7 @@
title: 'Success Alert', title: 'Success Alert',
text: 'Congratulations!', text: 'Congratulations!',
}, },
-1, 5000,
) )
" "
class="font-bold uppercase bg-emerald-600 text-white px-3 py-2 rounded-md mr-2" class="font-bold uppercase bg-emerald-600 text-white px-3 py-2 rounded-md mr-2"
@ -83,7 +83,7 @@
title: 'Warning Alert', title: 'Warning Alert',
text: 'You might wanna look at this.', text: 'You might wanna look at this.',
}, },
-1, 5000,
) )
" "
class="font-bold uppercase bg-amber-600 text-white px-3 py-2 rounded-md mr-2" class="font-bold uppercase bg-amber-600 text-white px-3 py-2 rounded-md mr-2"
@ -100,7 +100,7 @@
title: 'Danger Alert', title: 'Danger Alert',
text: 'Something terrible has happened!', text: 'Something terrible has happened!',
}, },
-1, 5000,
) )
" "
class="font-bold uppercase bg-rose-600 text-white px-3 py-2 rounded-md mr-2" class="font-bold uppercase bg-rose-600 text-white px-3 py-2 rounded-md mr-2"

Loading…
Cancel
Save