forked from trent_larson/crowd-funder-for-time-pwa
Fix HomeView notification migration to use proper constants pattern
- Add NOTIFY_CONTACT_LOADING_ISSUE, NOTIFY_FEED_LOADING_ISSUE, and NOTIFY_CONFIRMATION_ERROR constants to notifications.ts - Update HomeView.vue to import and use notification constants instead of literal strings - Update migration templates to document constants vs literal strings pattern - Add comprehensive documentation for notification constants usage Ensures consistency with established pattern used in ActivityListItem.vue and other migrated components. Linter passes without errors.
This commit is contained in:
@@ -259,7 +259,10 @@ import {
|
||||
import { containsHiddenDid, isHiddenDid } from "../libs/endorserServer";
|
||||
import ProjectIcon from "./ProjectIcon.vue";
|
||||
import { createNotifyHelpers } from "@/utils/notify";
|
||||
import { NOTIFY_PERSON_HIDDEN, NOTIFY_UNKNOWN_PERSON } from "@/constants/notifications";
|
||||
import {
|
||||
NOTIFY_PERSON_HIDDEN,
|
||||
NOTIFY_UNKNOWN_PERSON,
|
||||
} from "@/constants/notifications";
|
||||
import { TIMEOUTS } from "@/utils/notify";
|
||||
|
||||
@Component({
|
||||
@@ -284,17 +287,11 @@ export default class ActivityListItem extends Vue {
|
||||
}
|
||||
|
||||
notifyHiddenPerson() {
|
||||
this.notify.warning(
|
||||
NOTIFY_PERSON_HIDDEN.message,
|
||||
TIMEOUTS.STANDARD,
|
||||
);
|
||||
this.notify.warning(NOTIFY_PERSON_HIDDEN.message, TIMEOUTS.STANDARD);
|
||||
}
|
||||
|
||||
notifyUnknownPerson() {
|
||||
this.notify.warning(
|
||||
NOTIFY_UNKNOWN_PERSON.message,
|
||||
TIMEOUTS.STANDARD,
|
||||
);
|
||||
this.notify.warning(NOTIFY_UNKNOWN_PERSON.message, TIMEOUTS.STANDARD);
|
||||
}
|
||||
|
||||
@Emit()
|
||||
@@ -340,7 +337,7 @@ export default class ActivityListItem extends Vue {
|
||||
handleConfirmClick() {
|
||||
if (!this.canConfirm) {
|
||||
notifyWhyCannotConfirm(
|
||||
(msg, timeout) => this.notify.info(msg.text ?? '', timeout),
|
||||
(msg, timeout) => this.notify.info(msg.text ?? "", timeout),
|
||||
this.isRegistered,
|
||||
this.record.fullClaim?.["@type"],
|
||||
this.record,
|
||||
|
||||
Reference in New Issue
Block a user