forked from trent_larson/crowd-funder-for-time-pwa
Extract literal strings from complex modals to notification constants
Replace hardcoded text in raw $notify calls with centralized constants: - MembersList.vue: 2 complex modals (contact admission workflow) - ContactsView.vue: 2 complex modals (registration, onboarding meeting) - ProjectViewView.vue: 1 complex modal (claim confirmation) Preserves advanced modal features (promptToStopAsking, custom buttons, nested workflows) while standardizing text through constants for maintainability and future localization support.
This commit is contained in:
@@ -192,6 +192,10 @@ import * as libsUtil from "../libs/util";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import {
|
||||
NOTIFY_ADD_CONTACT_FIRST,
|
||||
NOTIFY_CONTINUE_WITHOUT_ADDING,
|
||||
} from "@/constants/notifications";
|
||||
|
||||
interface Member {
|
||||
admitted: boolean;
|
||||
@@ -378,10 +382,10 @@ export default class MembersList extends Vue {
|
||||
{
|
||||
group: "modal",
|
||||
type: "confirm",
|
||||
title: "Add as Contact First?",
|
||||
text: "This person is not in your contacts. Would you like to add them as a contact first?",
|
||||
yesText: "Add as Contact",
|
||||
noText: "Skip Adding Contact",
|
||||
title: NOTIFY_ADD_CONTACT_FIRST.title,
|
||||
text: NOTIFY_ADD_CONTACT_FIRST.text,
|
||||
yesText: NOTIFY_ADD_CONTACT_FIRST.yesText,
|
||||
noText: NOTIFY_ADD_CONTACT_FIRST.noText,
|
||||
onYes: async () => {
|
||||
await this.addAsContact(decrMember);
|
||||
// After adding as contact, proceed with admission
|
||||
@@ -393,9 +397,9 @@ export default class MembersList extends Vue {
|
||||
{
|
||||
group: "modal",
|
||||
type: "confirm",
|
||||
title: "Continue Without Adding?",
|
||||
text: "Are you sure you want to proceed with admission? If they are not a contact, you will not know their name after this meeting.",
|
||||
yesText: "Continue",
|
||||
title: NOTIFY_CONTINUE_WITHOUT_ADDING.title,
|
||||
text: NOTIFY_CONTINUE_WITHOUT_ADDING.text,
|
||||
yesText: NOTIFY_CONTINUE_WITHOUT_ADDING.yesText,
|
||||
onYes: async () => {
|
||||
await this.toggleAdmission(decrMember);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user