forked from trent_larson/crowd-funder-for-time-pwa
Implement configurable domain names for all copy link functionality
- Add PROD_SHARE_DOMAIN constant using existing AppString.PROD_PUSH_SERVER - Update all 9 components/services to use configurable domain instead of hardcoded URLs - Fix localhost issues in development mode for all sharing functionality - Ensure all copy link buttons generate production URLs regardless of environment - Add proper TypeScript imports and component properties for template access - Maintain existing functionality while improving maintainability and consistency Files updated: - src/constants/app.ts (new constant) - src/views/ClaimView.vue (claim + certificate links) - src/views/ProjectViewView.vue (project links) - src/views/ConfirmGiftView.vue (confirm gift links) - src/components/HiddenDidDialog.vue (hidden DID links) - src/views/UserProfileView.vue (profile links) - src/views/InviteOneView.vue (invite links) - src/views/ContactsView.vue (contact import links) - src/views/OnboardMeetingSetupView.vue (meeting links) - src/libs/endorserServer.ts (contact import confirm links) Documentation added: - docs/domain-configuration.md (comprehensive guide) - README.md (quick reference section) Security audit: ✅ All changes maintain existing security model Testing: ✅ All linting errors resolved, only warnings remain Performance: ✅ No performance impact, improves user experience
This commit is contained in:
@@ -436,7 +436,7 @@ import { Component, Vue } from "vue-facing-decorator";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { RouteLocationNormalizedLoaded, Router } from "vue-router";
|
||||
import QuickNav from "../components/QuickNav.vue";
|
||||
import { APP_SERVER, NotificationIface } from "../constants/app";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import * as serverUtil from "../libs/endorserServer";
|
||||
import { GenericVerifiableCredential, GiveSummaryRecord } from "../interfaces";
|
||||
@@ -447,6 +447,7 @@ import TopMessage from "../components/TopMessage.vue";
|
||||
import { logger } from "../utils/logger";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
import {
|
||||
NOTIFY_GIFT_ERROR_LOADING,
|
||||
NOTIFY_GIFT_CONFIRMATION_SUCCESS,
|
||||
@@ -510,6 +511,7 @@ export default class ConfirmGiftView extends Vue {
|
||||
libsUtil = libsUtil;
|
||||
serverUtil = serverUtil;
|
||||
displayAmount = displayAmount;
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
|
||||
/**
|
||||
* Component lifecycle hook that initializes notification helpers
|
||||
@@ -570,7 +572,8 @@ export default class ConfirmGiftView extends Vue {
|
||||
|
||||
const claimId = decodeURIComponent(pathParam);
|
||||
|
||||
this.windowLocation = APP_SERVER + "/deep-link/confirm-gift/" + claimId;
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
this.windowLocation = `${PROD_SHARE_DOMAIN}/deep-link/confirm-gift/${claimId}`;
|
||||
|
||||
await this.loadClaim(claimId, this.activeDid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user