forked from trent_larson/crowd-funder-for-time-pwa
make notification errors go away automatically
This commit is contained in:
@@ -936,7 +936,7 @@ export default class AccountViewView extends Vue {
|
||||
title: "Error Loading Profile",
|
||||
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",
|
||||
text: "There was an error exporting the data.",
|
||||
},
|
||||
-1,
|
||||
3000,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1475,7 +1475,7 @@ export default class AccountViewView extends Vue {
|
||||
title: "Update Error",
|
||||
text: "Unable to update your settings. Check claim limits again.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1540,7 +1540,7 @@ export default class AccountViewView extends Vue {
|
||||
title: "Reload",
|
||||
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",
|
||||
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
|
||||
}
|
||||
@@ -1630,7 +1630,7 @@ export default class AccountViewView extends Vue {
|
||||
title: "Error",
|
||||
text: "There was an error deleting the image.",
|
||||
},
|
||||
5000,
|
||||
3000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ export default class ClaimAddRawView extends Vue {
|
||||
title: "Error",
|
||||
text: "There was a problem submitting the claim.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,7 +606,7 @@ export default class ClaimView extends Vue {
|
||||
title: "Error Loading Profile",
|
||||
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",
|
||||
text: "No claim ID was provided.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -685,7 +685,7 @@ export default class ClaimView extends Vue {
|
||||
title: "Error",
|
||||
text: "There was a problem retrieving that claim.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -732,7 +732,7 @@ export default class ClaimView extends Vue {
|
||||
title: "Error",
|
||||
text: "Got error retrieving linked provider data.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
} else if (this.veriClaim.claimType === "Offer") {
|
||||
@@ -755,7 +755,7 @@ export default class ClaimView extends Vue {
|
||||
title: "Error",
|
||||
text: "Got error retrieving linked offer data.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -810,7 +810,7 @@ export default class ClaimView extends Vue {
|
||||
title: "Error",
|
||||
text: "There was a problem getting that claim.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
@@ -854,7 +854,7 @@ export default class ClaimView extends Vue {
|
||||
title: "Error",
|
||||
text: "Something went wrong retrieving that claim.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -917,7 +917,7 @@ export default class ClaimView extends Vue {
|
||||
title: "Error",
|
||||
text: "There was a problem submitting the confirmation.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ export default class ContactAmountssView extends Vue {
|
||||
err.userMessage ||
|
||||
"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",
|
||||
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",
|
||||
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",
|
||||
text: error as string,
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -297,7 +297,7 @@ export default class ContactAmountssView extends Vue {
|
||||
title: "Error With Server",
|
||||
text: userMessage,
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -310,7 +310,7 @@ export default class ContactAmountssView extends Vue {
|
||||
title: "Not Allowed",
|
||||
text: "Only the recipient can confirm final receipt.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,22 +93,21 @@ export default class ContactEditView extends Vue {
|
||||
|
||||
async created() {
|
||||
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({
|
||||
group: "alert",
|
||||
type: "error",
|
||||
type: "danger",
|
||||
title: "Contact Not Found",
|
||||
text: "There is no contact with that DID.",
|
||||
});
|
||||
(this.$router as Router).push({ path: "/contacts" });
|
||||
return;
|
||||
}
|
||||
const contact = await db.contacts.get(contactDid);
|
||||
if (contact) {
|
||||
this.contact = contact;
|
||||
this.contactName = contact.name || "";
|
||||
this.contactNotes = contact.notes || "";
|
||||
}
|
||||
}
|
||||
|
||||
async saveEdit() {
|
||||
|
||||
@@ -635,7 +635,7 @@ export default class ContactsView extends Vue {
|
||||
(useRecipient ? "given" : "received") +
|
||||
" data from the server.",
|
||||
},
|
||||
5000,
|
||||
3000,
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -693,7 +693,7 @@ export default class ContactsView extends Vue {
|
||||
title: "Load Error",
|
||||
text: "Got an error loading your gives.",
|
||||
},
|
||||
5000,
|
||||
3000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -969,7 +969,7 @@ export default class ContactsView extends Vue {
|
||||
message +=
|
||||
" 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:
|
||||
(contact.name || "That unnamed person") + " has been registered.",
|
||||
},
|
||||
5000,
|
||||
3000,
|
||||
);
|
||||
} else {
|
||||
this.$notify(
|
||||
@@ -1298,7 +1298,7 @@ export default class ContactsView extends Vue {
|
||||
title: "Copied",
|
||||
text: "The link for those contacts is now in the clipboard.",
|
||||
},
|
||||
5000,
|
||||
3000,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -479,7 +479,7 @@ export default class DIDView extends Vue {
|
||||
title: "Error",
|
||||
text: e.userMessage || "There was a problem retrieving claims.",
|
||||
},
|
||||
-1,
|
||||
3000,
|
||||
);
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
|
||||
@@ -337,9 +337,9 @@ export default class DiscoverView extends Vue {
|
||||
group: "alert",
|
||||
type: "danger",
|
||||
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;
|
||||
@@ -376,7 +376,7 @@ export default class DiscoverView extends Vue {
|
||||
title: "Error",
|
||||
text: e.userMessage || "There was a problem retrieving projects.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
@@ -433,9 +433,9 @@ export default class DiscoverView extends Vue {
|
||||
group: "alert",
|
||||
type: "danger",
|
||||
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();
|
||||
}
|
||||
@@ -472,7 +472,7 @@ export default class DiscoverView extends Vue {
|
||||
title: "Error",
|
||||
text: e.userMessage || "There was a problem retrieving projects.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
|
||||
@@ -818,7 +818,7 @@ export default class GiftedDetails extends Vue {
|
||||
title: "Error",
|
||||
text: errorMessage || "There was an error creating the give.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
} else {
|
||||
this.$notify(
|
||||
@@ -828,7 +828,7 @@ export default class GiftedDetails extends Vue {
|
||||
title: "Success",
|
||||
text: `That ${this.isTrade ? "trade" : "gift"} was recorded.`,
|
||||
},
|
||||
5000,
|
||||
3000,
|
||||
);
|
||||
localStorage.removeItem("imageUrl");
|
||||
if (this.destinationPathAfter) {
|
||||
@@ -851,7 +851,7 @@ export default class GiftedDetails extends Vue {
|
||||
title: "Error",
|
||||
text: errorMessage,
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -912,7 +912,7 @@ export default class GiftedDetails extends Vue {
|
||||
title: "Data Sharing",
|
||||
text: libsUtil.PRIVACY_MESSAGE,
|
||||
},
|
||||
-1,
|
||||
7000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ export default class HelpNotificationsView extends Vue {
|
||||
// Note that this exact verbiage shows in help text.
|
||||
text: "You must enable notifications before testing the web push.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ export default class HelpNotificationsView extends Vue {
|
||||
"Check your device for the test web push message" +
|
||||
(skipFilter ? "." : " if there are new items in your feed."),
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Got an error sending test notification:", error);
|
||||
@@ -376,7 +376,7 @@ export default class HelpNotificationsView extends Vue {
|
||||
title: "Error Sending Test",
|
||||
text: "Got an error sending the test web push notification.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,7 @@ export default class HelpNotificationsView extends Vue {
|
||||
title: "Failed",
|
||||
text: "Got an error sending a notification.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ export default class HomeView extends Vue {
|
||||
err.userMessage ||
|
||||
"There was an error retrieving your settings or the latest activity.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ export default class IdentitySwitcherView extends Vue {
|
||||
title: "Error Loading Accounts",
|
||||
text: "Clear your cache and start over (after data backup).",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
console.error("Telling user to clear cache at page create because:", err);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ export default class ImportAccountView extends Vue {
|
||||
title: "Invalid Mnemonic",
|
||||
text: "Please check your mnemonic and try again.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
} else {
|
||||
this.$notify(
|
||||
@@ -192,7 +192,7 @@ export default class ImportAccountView extends Vue {
|
||||
title: "Error",
|
||||
text: "Got an error creating that identifier.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ export default class OfferDetailsView extends Vue {
|
||||
title: "Retrieval Error",
|
||||
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",
|
||||
text: err.message || "There was an error retrieving your settings.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ export default class OfferDetailsView extends Vue {
|
||||
title: "Error",
|
||||
text: errorMessage || "There was an error creating the offer.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
} else {
|
||||
this.$notify(
|
||||
@@ -563,7 +563,7 @@ export default class OfferDetailsView extends Vue {
|
||||
title: "Error",
|
||||
text: errorMessage,
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -621,7 +621,7 @@ export default class OfferDetailsView extends Vue {
|
||||
title: "Data Sharing",
|
||||
text: libsUtil.PRIVACY_MESSAGE,
|
||||
},
|
||||
-1,
|
||||
7000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,7 +576,7 @@ export default class ProjectViewView extends Vue {
|
||||
title: "Error Loading Profile",
|
||||
text: "See the Help page to fix problems with your personal data.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -475,9 +475,9 @@ export default class ProjectsView extends Vue {
|
||||
group: "alert",
|
||||
type: "danger",
|
||||
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
|
||||
@@ -490,7 +490,7 @@ export default class ProjectsView extends Vue {
|
||||
title: "Error",
|
||||
text: "Got an error loading offers.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
|
||||
@@ -228,7 +228,7 @@ export default class SearchAreaView extends Vue {
|
||||
title: "Error Updating Search Settings",
|
||||
text: "Try going to a different page and then coming back.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
console.error(
|
||||
"Telling user to retry the location search setting because:",
|
||||
@@ -243,7 +243,7 @@ export default class SearchAreaView extends Vue {
|
||||
title: "No Location Selected",
|
||||
text: "Select a location on the map.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -271,7 +271,7 @@ export default class SearchAreaView extends Vue {
|
||||
title: "Error Updating Search Settings",
|
||||
text: "Try going to a different page and then coming back.",
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
console.error(
|
||||
"Telling user to retry the location search setting because:",
|
||||
|
||||
@@ -138,7 +138,7 @@ export default class SeedBackupView extends Vue {
|
||||
title: "Error Loading Profile",
|
||||
text: "Got an error loading your seed data.",
|
||||
},
|
||||
-1,
|
||||
3000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ export default class SharedPhotoView extends Vue {
|
||||
title: "Error",
|
||||
text: "Got an error loading this data.",
|
||||
},
|
||||
-1,
|
||||
3000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export default class StatisticsView extends Vue {
|
||||
title: "Mounting Error",
|
||||
text: error.message,
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
title: 'Information Alert',
|
||||
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"
|
||||
@@ -66,7 +66,7 @@
|
||||
title: 'Success Alert',
|
||||
text: 'Congratulations!',
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
)
|
||||
"
|
||||
class="font-bold uppercase bg-emerald-600 text-white px-3 py-2 rounded-md mr-2"
|
||||
@@ -83,7 +83,7 @@
|
||||
title: 'Warning Alert',
|
||||
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"
|
||||
@@ -100,7 +100,7 @@
|
||||
title: 'Danger Alert',
|
||||
text: 'Something terrible has happened!',
|
||||
},
|
||||
-1,
|
||||
5000,
|
||||
)
|
||||
"
|
||||
class="font-bold uppercase bg-rose-600 text-white px-3 py-2 rounded-md mr-2"
|
||||
|
||||
Reference in New Issue
Block a user