forked from jsnbuchanan/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:
@@ -595,7 +595,7 @@ import TopMessage from "../components/TopMessage.vue";
|
||||
import QuickNav from "../components/QuickNav.vue";
|
||||
import EntityIcon from "../components/EntityIcon.vue";
|
||||
import ProjectIcon from "../components/ProjectIcon.vue";
|
||||
import { APP_SERVER, NotificationIface } from "../constants/app";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
// Removed legacy logging import - migrated to PlatformServiceMixin
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import * as libsUtil from "../libs/util";
|
||||
@@ -607,6 +607,7 @@ import { useClipboard } from "@vueuse/core";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import { NOTIFY_CONFIRM_CLAIM } from "@/constants/notifications";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
/**
|
||||
* Project View Component
|
||||
* @author Matthew Raymer
|
||||
@@ -739,6 +740,8 @@ export default class ProjectViewView extends Vue {
|
||||
// Utility References
|
||||
libsUtil = libsUtil;
|
||||
serverUtil = serverUtil;
|
||||
/** Production share domain for deep links */
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
|
||||
/**
|
||||
* Component lifecycle hook that initializes the project view
|
||||
@@ -799,7 +802,8 @@ export default class ProjectViewView extends Vue {
|
||||
)
|
||||
? this.projectId.substring(serverUtil.ENDORSER_CH_HANDLE_PREFIX.length)
|
||||
: this.projectId;
|
||||
const deepLink = `${APP_SERVER}/deep-link/project/${shortestProjectId}`;
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
const deepLink = `${PROD_SHARE_DOMAIN}/deep-link/project/${shortestProjectId}`;
|
||||
useClipboard()
|
||||
.copy(deepLink)
|
||||
.then(() => {
|
||||
|
||||
Reference in New Issue
Block a user