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:
@@ -113,14 +113,15 @@
|
||||
* @since 2024-12-19
|
||||
*/
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import * as R from "ramda";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import * as R from "ramda";
|
||||
import * as serverUtil from "../libs/endorserServer";
|
||||
import { APP_SERVER, NotificationIface } from "../constants/app";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { createNotifyHelpers } from "@/utils/notify";
|
||||
import { TIMEOUTS } from "@/utils/notify";
|
||||
import { NOTIFY_COPIED_TO_CLIPBOARD } from "@/constants/notifications";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
|
||||
@Component({ name: "HiddenDidDialog" })
|
||||
export default class HiddenDidDialog extends Vue {
|
||||
@@ -139,6 +140,7 @@ export default class HiddenDidDialog extends Vue {
|
||||
|
||||
R = R;
|
||||
serverUtil = serverUtil;
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
|
||||
// =================================================
|
||||
// COMPUTED PROPERTIES - Template Streamlining
|
||||
@@ -180,7 +182,8 @@ export default class HiddenDidDialog extends Vue {
|
||||
this.activeDid = activeDid;
|
||||
this.allMyDids = allMyDids;
|
||||
|
||||
this.deepLinkUrl = APP_SERVER + "/deep-link/" + this.deepLinkPathSuffix;
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
this.deepLinkUrl = `${PROD_SHARE_DOMAIN}/deep-link/${this.deepLinkPathSuffix}`;
|
||||
this.isOpen = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user