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:
Matthew Raymer
2025-07-21 07:47:34 +00:00
parent 29e6d5e099
commit 7ab595cb60
12 changed files with 310 additions and 32 deletions

View File

@@ -282,9 +282,9 @@ import {
serverMessageForUser,
} from "../libs/endorserServer";
import { encryptMessage } from "../libs/crypto";
import { APP_SERVER } from "@/constants/app";
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
import { PROD_SHARE_DOMAIN } from "@/constants/app";
import {
NOTIFY_MEETING_INVALID_TIME,
NOTIFY_MEETING_NAME_REQUIRED,
@@ -326,6 +326,8 @@ export default class OnboardMeetingView extends Vue {
$route!: RouteLocationNormalizedLoaded;
$router!: Router;
notify!: ReturnType<typeof createNotifyHelpers>;
/** Production share domain for deep links */
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
currentMeeting: ServerMeeting | null = null;
newOrUpdatedMeetingInputs: MeetingSetupInputs | null = null;
@@ -660,7 +662,8 @@ export default class OnboardMeetingView extends Vue {
onboardMeetingMembersLink(): string {
if (this.currentMeeting) {
return `${APP_SERVER}/deep-link/onboard-meeting-members/${this.currentMeeting?.groupId}?password=${encodeURIComponent(
// Use production URL for sharing to avoid localhost issues in development
return `${PROD_SHARE_DOMAIN}/deep-link/onboard-meeting-members/${this.currentMeeting?.groupId}?password=${encodeURIComponent(
this.currentMeeting?.password || "",
)}`;
}