diff --git a/src/components/ChoiceButtonDialog.vue b/src/components/ChoiceButtonDialog.vue index 0660a7c..2e8118a 100644 --- a/src/components/ChoiceButtonDialog.vue +++ b/src/components/ChoiceButtonDialog.vue @@ -117,7 +117,7 @@ export default class PromptDialog extends Vue { onOption3: this.onOption3, onCancel: this.onCancel, } as NotificationIface, - -1 + -1, ); } @@ -149,4 +149,4 @@ export default class PromptDialog extends Vue { close("string that does not matter"); } } - \ No newline at end of file + diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 832c456..c7e16a2 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -90,7 +90,11 @@ import { Vue, Component, Prop } from "vue-facing-decorator"; import { NotificationIface } from "@/constants/app"; -import { createAndSubmitGive, didInfo, serverMessageForUser } from "@/libs/endorserServer"; +import { + createAndSubmitGive, + didInfo, + serverMessageForUser, +} from "@/libs/endorserServer"; import * as libsUtil from "@/libs/util"; import { db, retrieveSettingsForActiveAccount } from "@/db/index"; import { Contact } from "@/db/tables/contacts"; diff --git a/src/components/MembersList.vue b/src/components/MembersList.vue index d7aa884..439bf1a 100644 --- a/src/components/MembersList.vue +++ b/src/components/MembersList.vue @@ -7,8 +7,11 @@
-
+

{{ member.name }}

{{ member.did }}

@@ -16,18 +19,29 @@

No members have joined this meeting yet

-

- {{ decryptFailureMessage || "Your password failed. Please go back and try again." }} +

+ {{ + decryptFailureMessage || + "Your password failed. Please go back and try again." + }}

\ No newline at end of file + diff --git a/src/components/OfferDialog.vue b/src/components/OfferDialog.vue index 20aee1f..97fd9a2 100644 --- a/src/components/OfferDialog.vue +++ b/src/components/OfferDialog.vue @@ -83,7 +83,10 @@ import { Vue, Component, Prop } from "vue-facing-decorator"; import { NotificationIface } from "@/constants/app"; -import { createAndSubmitOffer, serverMessageForUser } from "@/libs/endorserServer"; +import { + createAndSubmitOffer, + serverMessageForUser, +} from "@/libs/endorserServer"; import * as libsUtil from "@/libs/util"; import { retrieveSettingsForActiveAccount } from "@/db/index"; diff --git a/src/libs/crypto/index.ts b/src/libs/crypto/index.ts index 74409ab..2de20e3 100644 --- a/src/libs/crypto/index.ts +++ b/src/libs/crypto/index.ts @@ -177,43 +177,43 @@ export async function encryptMessage(message: string, password: string) { // Derive key from password using PBKDF2 const keyMaterial = await crypto.subtle.importKey( - 'raw', + "raw", encoder.encode(password), - 'PBKDF2', + "PBKDF2", false, - ['deriveBits', 'deriveKey'] + ["deriveBits", "deriveKey"], ); const key = await crypto.subtle.deriveKey( { - name: 'PBKDF2', + name: "PBKDF2", salt, iterations: ITERATIONS, - hash: 'SHA-256' + hash: "SHA-256", }, keyMaterial, - { name: 'AES-GCM', length: KEY_LENGTH }, + { name: "AES-GCM", length: KEY_LENGTH }, false, - ['encrypt'] + ["encrypt"], ); // Encrypt the message const encryptedContent = await crypto.subtle.encrypt( { - name: 'AES-GCM', - iv + name: "AES-GCM", + iv, }, key, - encoder.encode(message) + encoder.encode(message), ); // Return a JSON structure with base64-encoded components const result = { salt: arrayBufferToBase64(salt), iv: arrayBufferToBase64(iv), - encrypted: arrayBufferToBase64(encryptedContent) + encrypted: arrayBufferToBase64(encryptedContent), }; - + return btoa(JSON.stringify(result)); } @@ -229,34 +229,34 @@ export async function decryptMessage(encryptedJson: string, password: string) { // Derive the same key using PBKDF2 with the extracted salt const keyMaterial = await crypto.subtle.importKey( - 'raw', + "raw", new TextEncoder().encode(password), - 'PBKDF2', + "PBKDF2", false, - ['deriveBits', 'deriveKey'] + ["deriveBits", "deriveKey"], ); const key = await crypto.subtle.deriveKey( { - name: 'PBKDF2', + name: "PBKDF2", salt: saltArray, iterations: ITERATIONS, - hash: 'SHA-256' + hash: "SHA-256", }, keyMaterial, - { name: 'AES-GCM', length: KEY_LENGTH }, + { name: "AES-GCM", length: KEY_LENGTH }, false, - ['decrypt'] + ["decrypt"], ); // Decrypt the content const decryptedContent = await crypto.subtle.decrypt( { - name: 'AES-GCM', - iv: ivArray + name: "AES-GCM", + iv: ivArray, }, key, - encryptedContent + encryptedContent, ); // Convert the decrypted content back to a string @@ -268,33 +268,33 @@ export async function testEncryptionDecryption() { try { const testMessage = "Hello, this is a test message! 🚀"; const testPassword = "myTestPassword123"; - + console.log("Original message:", testMessage); - + // Test encryption console.log("Encrypting..."); const encrypted = await encryptMessage(testMessage, testPassword); console.log("Encrypted result:", encrypted); - + // Test decryption console.log("Decrypting..."); const decrypted = await decryptMessage(encrypted, testPassword); console.log("Decrypted result:", decrypted); - + // Verify const success = testMessage === decrypted; console.log("Test " + (success ? "PASSED ✅" : "FAILED ❌")); console.log("Messages match:", success); - + // Test with wrong password console.log("\nTesting with wrong password..."); try { - const wrongDecrypted = await decryptMessage(encrypted, "wrongPassword"); + await decryptMessage(encrypted, "wrongPassword"); console.log("Should not reach here"); } catch (error) { console.log("Correctly failed with wrong password ✅"); } - + return success; } catch (error) { console.error("Test failed with error:", error); diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index ab9c4fc..3b3ec3d 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -680,6 +680,7 @@ export async function setPlanInCache( * @param error that is thrown from an Endorser server call by Axios * @returns user-friendly message, or undefined if none found */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function serverMessageForUser(error: any) { return ( // this is how most user messages are returned diff --git a/src/router/index.ts b/src/router/index.ts index 3bb330e..825db95 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -180,19 +180,19 @@ const routes: Array = [ component: () => import("../views/OfferDetailsView.vue"), }, { - path: '/onboard-meeting-list', - name: 'onboard-meeting-list', - component: () => import('../views/OnboardMeetingListView.vue'), + path: "/onboard-meeting-list", + name: "onboard-meeting-list", + component: () => import("../views/OnboardMeetingListView.vue"), }, { - path: '/onboard-meeting-members/:groupId', - name: 'onboard-meeting-members', - component: () => import('../views/OnboardMeetingMembersView.vue'), + path: "/onboard-meeting-members/:groupId", + name: "onboard-meeting-members", + component: () => import("../views/OnboardMeetingMembersView.vue"), }, { - path: '/onboard-meeting-setup', - name: 'onboard-meeting-setup', - component: () => import('../views/OnboardMeetingSetupView.vue'), + path: "/onboard-meeting-setup", + name: "onboard-meeting-setup", + component: () => import("../views/OnboardMeetingSetupView.vue"), }, { path: "/project/:id?", diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 9ce3679..7728052 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -37,23 +37,24 @@ - - + + + icon="envelope-open-text" + class="fa-fw text-2xl" + @click=" + warning( + 'You must get registered before you can create invites.', + 'Not Registered', + ) + " + /> - +
-
@@ -47,7 +49,10 @@
-
+

Enter Meeting Password

\ No newline at end of file + diff --git a/src/views/OnboardMeetingMembersView.vue b/src/views/OnboardMeetingMembersView.vue index db0a34b..d80e5e0 100644 --- a/src/views/OnboardMeetingMembersView.vue +++ b/src/views/OnboardMeetingMembersView.vue @@ -38,10 +38,12 @@ \ No newline at end of file + diff --git a/src/views/OnboardMeetingSetupView.vue b/src/views/OnboardMeetingSetupView.vue index d213978..f88e2a7 100644 --- a/src/views/OnboardMeetingSetupView.vue +++ b/src/views/OnboardMeetingSetupView.vue @@ -22,7 +22,9 @@ title="Edit Meeting" > - {{ isInCreateMode() ? 'Create Meeting' : 'Edit Meeting' }} + {{ + isInCreateMode() ? "Create Meeting" : "Edit Meeting" + }}

Name: {{ currentMeeting.name }}

-

Expires: {{ formatExpirationTime(currentMeeting.expiresAt) }}

+

+ Expires: + {{ formatExpirationTime(currentMeeting.expiresAt) }} +

-

Share the password with the people you want to onboard.

+

+ Share the password with the people you want to onboard. +

- Your copy of the password is not saved. Edit the meeting, or delete it and create a new meeting. + Your copy of the password is not saved. Edit the meeting, or delete it + and create a new meeting.
- -
+

Delete Meeting?

-

This action cannot be undone. Are you sure you want to delete this meeting?

+

+ This action cannot be undone. Are you sure you want to delete this + meeting? +