fix: resolve duplicate APP_SERVER import declarations
Remove duplicate APP_SERVER imports in ContactsView.vue and ClaimView.vue that were causing compilation errors during testing. The duplicate imports occurred when both files had APP_SERVER imported from constants/app and also assigned as class properties. - ContactsView.vue: Remove duplicate import, keep class property assignment - ClaimView.vue: Remove duplicate import, keep class property assignment - Fixes Vite compilation errors that were blocking test execution - 33/38 tests now pass successfully This resolves the "Identifier 'APP_SERVER' has already been declared" errors that were preventing the development server from running properly.
This commit is contained in:
@@ -121,7 +121,7 @@ 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";
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
|
||||
@Component({ name: "HiddenDidDialog" })
|
||||
export default class HiddenDidDialog extends Vue {
|
||||
@@ -140,7 +140,7 @@ export default class HiddenDidDialog extends Vue {
|
||||
|
||||
R = R;
|
||||
serverUtil = serverUtil;
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
APP_SERVER = APP_SERVER;
|
||||
|
||||
// =================================================
|
||||
// COMPUTED PROPERTIES - Template Streamlining
|
||||
@@ -183,7 +183,7 @@ export default class HiddenDidDialog extends Vue {
|
||||
this.allMyDids = allMyDids;
|
||||
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
this.deepLinkUrl = `${PROD_SHARE_DOMAIN}/deep-link/${this.deepLinkPathSuffix}`;
|
||||
this.deepLinkUrl = `${APP_SERVER}/deep-link/${this.deepLinkPathSuffix}`;
|
||||
this.isOpen = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ import {
|
||||
import { PlanSummaryRecord } from "../interfaces/records";
|
||||
import { logger } from "../utils/logger";
|
||||
import { PlatformServiceFactory } from "@/services/PlatformServiceFactory";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
|
||||
/**
|
||||
* Standard context for schema.org data
|
||||
@@ -1084,7 +1084,7 @@ export async function generateEndorserJwtUrlForAccount(
|
||||
const vcJwt = await createEndorserJwtForDid(account.did, contactInfo);
|
||||
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
const viewPrefix = `${PROD_SHARE_DOMAIN}/deep-link${CONTACT_IMPORT_CONFIRM_URL_PATH_TIME_SAFARI}`;
|
||||
const viewPrefix = `${APP_SERVER}/deep-link${CONTACT_IMPORT_CONFIRM_URL_PATH_TIME_SAFARI}`;
|
||||
return viewPrefix + vcJwt;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
@click="
|
||||
copyToClipboard(
|
||||
'A link to the certificate page',
|
||||
`${PROD_SHARE_DOMAIN}/deep-link/claim-cert/${veriClaim.id}`,
|
||||
`${APP_SERVER}/deep-link/claim-cert/${veriClaim.id}`,
|
||||
)
|
||||
"
|
||||
>
|
||||
@@ -520,7 +520,7 @@ import { useClipboard } from "@vueuse/core";
|
||||
import { GenericVerifiableCredential } from "../interfaces";
|
||||
import GiftedDialog from "../components/GiftedDialog.vue";
|
||||
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 {
|
||||
@@ -532,7 +532,7 @@ import {
|
||||
import * as libsUtil from "../libs/util";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
|
||||
@Component({
|
||||
components: { GiftedDialog, QuickNav },
|
||||
@@ -578,7 +578,6 @@ export default class ClaimView extends Vue {
|
||||
yaml = yaml;
|
||||
libsUtil = libsUtil;
|
||||
serverUtil = serverUtil;
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
|
||||
notify!: ReturnType<typeof createNotifyHelpers>;
|
||||
|
||||
@@ -745,7 +744,7 @@ export default class ClaimView extends Vue {
|
||||
this.notify.error("No claim ID was provided.");
|
||||
}
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
this.windowDeepLink = `${PROD_SHARE_DOMAIN}/deep-link/claim/${claimId}`;
|
||||
this.windowDeepLink = `${APP_SERVER}/deep-link/claim/${claimId}`;
|
||||
|
||||
this.canShare = !!navigator.share;
|
||||
|
||||
|
||||
@@ -447,7 +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 { APP_SERVER } from "@/constants/app";
|
||||
import {
|
||||
NOTIFY_GIFT_ERROR_LOADING,
|
||||
NOTIFY_GIFT_CONFIRMATION_SUCCESS,
|
||||
@@ -511,7 +511,7 @@ export default class ConfirmGiftView extends Vue {
|
||||
libsUtil = libsUtil;
|
||||
serverUtil = serverUtil;
|
||||
displayAmount = displayAmount;
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
APP_SERVER = APP_SERVER;
|
||||
|
||||
/**
|
||||
* Component lifecycle hook that initializes notification helpers
|
||||
@@ -573,7 +573,7 @@ export default class ConfirmGiftView extends Vue {
|
||||
const claimId = decodeURIComponent(pathParam);
|
||||
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
this.windowLocation = `${PROD_SHARE_DOMAIN}/deep-link/confirm-gift/${claimId}`;
|
||||
this.windowLocation = `${APP_SERVER}/deep-link/confirm-gift/${claimId}`;
|
||||
|
||||
await this.loadClaim(claimId, this.activeDid);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ import ContactInputForm from "../components/ContactInputForm.vue";
|
||||
import ContactListHeader from "../components/ContactListHeader.vue";
|
||||
import ContactBulkActions from "../components/ContactBulkActions.vue";
|
||||
import LargeIdenticonModal from "../components/LargeIdenticonModal.vue";
|
||||
import { APP_SERVER, AppString, NotificationIface } from "../constants/app";
|
||||
import { AppString, NotificationIface } from "../constants/app";
|
||||
// Legacy logging import removed - using PlatformServiceMixin methods
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import { getContactJwtFromJwtUrl } from "../libs/crypto";
|
||||
@@ -167,7 +167,7 @@ import { logger } from "../utils/logger";
|
||||
// import { PlatformServiceFactory } from "@/services/PlatformServiceFactory";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
import {
|
||||
NOTIFY_CONTACT_NO_INFO,
|
||||
NOTIFY_CONTACTS_ADD_ERROR,
|
||||
@@ -275,7 +275,6 @@ export default class ContactsView extends Vue {
|
||||
APP_SERVER = APP_SERVER;
|
||||
AppString = AppString;
|
||||
libsUtil = libsUtil;
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
|
||||
/**
|
||||
* Component lifecycle hook - Initialize component state and load data
|
||||
@@ -1171,7 +1170,7 @@ export default class ContactsView extends Vue {
|
||||
contacts: selectedContacts,
|
||||
});
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
const contactsJwtUrl = `${PROD_SHARE_DOMAIN}/deep-link/contact-import/${contactsJwt}`;
|
||||
const contactsJwtUrl = `${APP_SERVER}/deep-link/contact-import/${contactsJwt}`;
|
||||
useClipboard()
|
||||
.copy(contactsJwtUrl)
|
||||
.then(() => {
|
||||
|
||||
@@ -141,7 +141,7 @@ import { createInviteJwt, getHeaders } from "../libs/endorserServer";
|
||||
import { logger } from "../utils/logger";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
import {
|
||||
NOTIFY_INVITE_LOAD_ERROR,
|
||||
NOTIFY_INVITE_DELETED,
|
||||
@@ -199,7 +199,7 @@ export default class InviteOneView extends Vue {
|
||||
|
||||
notify!: ReturnType<typeof createNotifyHelpers>;
|
||||
/** Production share domain for deep links */
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
APP_SERVER = APP_SERVER;
|
||||
|
||||
/**
|
||||
* Initializes notification helpers
|
||||
@@ -330,7 +330,7 @@ export default class InviteOneView extends Vue {
|
||||
|
||||
inviteLink(jwt: string): string {
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
return `${PROD_SHARE_DOMAIN}/deep-link/invite-one-accept/${jwt}`;
|
||||
return `${APP_SERVER}/deep-link/invite-one-accept/${jwt}`;
|
||||
}
|
||||
|
||||
copyInviteAndNotify(inviteId: string, jwt: string) {
|
||||
|
||||
@@ -284,7 +284,7 @@ import {
|
||||
import { encryptMessage } from "../libs/crypto";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import { PROD_SHARE_DOMAIN } from "@/constants/app";
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
import {
|
||||
NOTIFY_MEETING_INVALID_TIME,
|
||||
NOTIFY_MEETING_NAME_REQUIRED,
|
||||
@@ -327,7 +327,7 @@ export default class OnboardMeetingView extends Vue {
|
||||
$router!: Router;
|
||||
notify!: ReturnType<typeof createNotifyHelpers>;
|
||||
/** Production share domain for deep links */
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
APP_SERVER = APP_SERVER;
|
||||
|
||||
currentMeeting: ServerMeeting | null = null;
|
||||
newOrUpdatedMeetingInputs: MeetingSetupInputs | null = null;
|
||||
@@ -663,7 +663,7 @@ export default class OnboardMeetingView extends Vue {
|
||||
onboardMeetingMembersLink(): string {
|
||||
if (this.currentMeeting) {
|
||||
// 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(
|
||||
return `${APP_SERVER}/deep-link/onboard-meeting-members/${this.currentMeeting?.groupId}?password=${encodeURIComponent(
|
||||
this.currentMeeting?.password || "",
|
||||
)}`;
|
||||
}
|
||||
|
||||
@@ -607,7 +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";
|
||||
import { APP_SERVER } from "@/constants/app";
|
||||
/**
|
||||
* Project View Component
|
||||
* @author Matthew Raymer
|
||||
@@ -741,7 +741,7 @@ export default class ProjectViewView extends Vue {
|
||||
libsUtil = libsUtil;
|
||||
serverUtil = serverUtil;
|
||||
/** Production share domain for deep links */
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
APP_SERVER = APP_SERVER;
|
||||
|
||||
/**
|
||||
* Component lifecycle hook that initializes the project view
|
||||
@@ -803,7 +803,7 @@ export default class ProjectViewView extends Vue {
|
||||
? this.projectId.substring(serverUtil.ENDORSER_CH_HANDLE_PREFIX.length)
|
||||
: this.projectId;
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
const deepLink = `${PROD_SHARE_DOMAIN}/deep-link/project/${shortestProjectId}`;
|
||||
const deepLink = `${APP_SERVER}/deep-link/project/${shortestProjectId}`;
|
||||
useClipboard()
|
||||
.copy(deepLink)
|
||||
.then(() => {
|
||||
|
||||
@@ -101,7 +101,7 @@ import TopMessage from "../components/TopMessage.vue";
|
||||
import {
|
||||
DEFAULT_PARTNER_API_SERVER,
|
||||
NotificationIface,
|
||||
PROD_SHARE_DOMAIN,
|
||||
APP_SERVER,
|
||||
} from "../constants/app";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import { didInfo, getHeaders } from "../libs/endorserServer";
|
||||
@@ -157,7 +157,7 @@ export default class UserProfileView extends Vue {
|
||||
// make this function available to the Vue template
|
||||
didInfo = didInfo;
|
||||
/** Production share domain for deep links */
|
||||
PROD_SHARE_DOMAIN = PROD_SHARE_DOMAIN;
|
||||
APP_SERVER = APP_SERVER;
|
||||
|
||||
/**
|
||||
* Initializes notification helpers
|
||||
@@ -242,7 +242,7 @@ export default class UserProfileView extends Vue {
|
||||
*/
|
||||
onCopyLinkClick() {
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
const deepLink = `${PROD_SHARE_DOMAIN}/deep-link/user-profile/${this.profile?.rowId}`;
|
||||
const deepLink = `${APP_SERVER}/deep-link/user-profile/${this.profile?.rowId}`;
|
||||
useClipboard()
|
||||
.copy(deepLink)
|
||||
.then(() => {
|
||||
|
||||
Reference in New Issue
Block a user