forked from trent_larson/crowd-funder-for-time-pwa
Replace hardcoded notification strings with standardized constants
- Replace literal strings with notification constants in ContactsView.vue: * "Got an error sending the invite." → NOTIFY_INVITE_ERROR.message * "Could not set visibility on the server." → NOTIFY_VISIBILITY_ERROR.message * "Unconfirmed Hours" → NOTIFY_UNCONFIRMED_HOURS.title - Remove unused NOTIFY_REGISTER_PROCESSING import - Remove unused NOTIFICATION_TIMEOUTS constant in ShareMyContactInfoView.vue - Fix unused parameter warnings in danger() and warning() methods - Resolve all notification-related linting errors
This commit is contained in:
@@ -57,12 +57,6 @@ import { Account } from "@/db/tables/accounts";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
|
||||
// Constants for magic numbers
|
||||
const NOTIFICATION_TIMEOUTS = {
|
||||
COPY_SUCCESS: 5000,
|
||||
SHARE_CONTACTS: 10000,
|
||||
ERROR: 5000,
|
||||
} as const;
|
||||
|
||||
const DELAYS = {
|
||||
SHARE_CONTACTS_DELAY: 3000,
|
||||
} as const;
|
||||
@@ -153,10 +147,7 @@ export default class ShareMyContactInfoView extends Vue {
|
||||
* Show success notifications after copying
|
||||
*/
|
||||
private async showSuccessNotifications(): Promise<void> {
|
||||
this.notify.copied(
|
||||
"contact info",
|
||||
TIMEOUTS.LONG,
|
||||
);
|
||||
this.notify.copied("contact info", TIMEOUTS.LONG);
|
||||
|
||||
const numContacts = await this.$contactCount();
|
||||
if (numContacts > 0) {
|
||||
|
||||
Reference in New Issue
Block a user