From 7f5a64dceb6ccf5e5c8f42a66332202ea1500f18 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 21 Aug 2025 17:22:33 +0800 Subject: [PATCH 1/4] UI: update HomeView onboard alert style - Style-wise, make it consistent with similar alerts - Introduce visual hierarchy to buttons - Responsive button layout --- src/views/HomeView.vue | 43 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 4aa3523d..935a47ff 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -86,30 +86,29 @@ Raymer * @version 1.0.0 */ Identity creation is now handled by router navigation guard. -->
-
- To share, someone must register you. -
- +
+
+

To share, someone must register you.

+
+ + + See advanced options + +
-
- - See advanced options - -
-- 2.30.2 From 47a7b03ccad9c55842c48e15061f93c11fe48e0d Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 21 Aug 2025 19:06:55 +0800 Subject: [PATCH 2/4] Refactor: simplify RegistrationNotice component interface - Centralize all registration notice logic within upgraded RegistrationNotice component - Clean up unused methods and imports in HomeView and AccountViewView - Customizable message to maintain original contextual wordings unique to each view Component is now more focused and follows Vue.js best practices for conditional rendering. --- src/components/RegistrationNotice.vue | 167 ++++++++++++++++++++++---- src/views/AccountViewView.vue | 23 +--- src/views/HomeView.vue | 112 ++--------------- 3 files changed, 161 insertions(+), 141 deletions(-) diff --git a/src/components/RegistrationNotice.vue b/src/components/RegistrationNotice.vue index c9faffea..f7b32d65 100644 --- a/src/components/RegistrationNotice.vue +++ b/src/components/RegistrationNotice.vue @@ -1,33 +1,156 @@ +/** * @file RegistrationNotice.vue * @description Reusable component for +displaying user registration status and related actions. * Shows registration +notice when user is not registered, with options to show identifier info * or +access advanced options. * * @author Matthew Raymer * @version 1.0.0 * @created +2025-08-21T17:25:28-08:00 */ + diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index eb99665c..aca100ff 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -55,9 +55,10 @@ @@ -781,6 +782,7 @@ import { DEFAULT_PUSH_SERVER, IMAGE_TYPE_PROFILE, NotificationIface, + PASSKEYS_ENABLED, } from "../constants/app"; import { Contact } from "../db/tables/contacts"; import { @@ -851,6 +853,7 @@ export default class AccountViewView extends Vue { readonly DEFAULT_PUSH_SERVER: string = DEFAULT_PUSH_SERVER; readonly DEFAULT_IMAGE_API_SERVER: string = DEFAULT_IMAGE_API_SERVER; readonly DEFAULT_PARTNER_API_SERVER: string = DEFAULT_PARTNER_API_SERVER; + readonly PASSKEYS_ENABLED: boolean = PASSKEYS_ENABLED; // Identity and settings properties activeDid: string = ""; @@ -1789,20 +1792,6 @@ export default class AccountViewView extends Vue { this.doCopyTwoSecRedo(did, () => (this.showDidCopy = !this.showDidCopy)); } - get showRegistrationNotice(): boolean { - // Show the notice if not registered and any other conditions you want - return !this.isRegistered; - } - - onShareInfo() { - // Navigate to QR code sharing page - mobile uses full scan, web uses basic - if (Capacitor.isNativePlatform()) { - this.$router.push({ name: "contact-qr-scan-full" }); - } else { - this.$router.push({ name: "contact-qr" }); - } - } - onRecheckLimits() { this.checkLimits(); } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 935a47ff..fe6fbc28 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -86,32 +86,14 @@ Raymer * @version 1.0.0 */ Identity creation is now handled by router navigation guard. -->
-
-
-

To share, someone must register you.

-
- - - See advanced options - -
-
- -
- -
+ + +
@@ -251,8 +233,6 @@ Raymer * @version 1.0.0 */
- - @@ -260,7 +240,6 @@ Raymer * @version 1.0.0 */ import { UAParser } from "ua-parser-js"; import { Component, Vue } from "vue-facing-decorator"; import { Router } from "vue-router"; -import { Capacitor } from "@capacitor/core"; //import App from "../App.vue"; import EntityIcon from "../components/EntityIcon.vue"; @@ -271,10 +250,9 @@ import InfiniteScroll from "../components/InfiniteScroll.vue"; import OnboardingDialog from "../components/OnboardingDialog.vue"; import QuickNav from "../components/QuickNav.vue"; import TopMessage from "../components/TopMessage.vue"; -import UserNameDialog from "../components/UserNameDialog.vue"; -import ChoiceButtonDialog from "../components/ChoiceButtonDialog.vue"; import ImageViewer from "../components/ImageViewer.vue"; import ActivityListItem from "../components/ActivityListItem.vue"; +import RegistrationNotice from "../components/RegistrationNotice.vue"; import { AppString, NotificationIface, @@ -382,12 +360,11 @@ interface FeedError { GiftedPrompts, InfiniteScroll, OnboardingDialog, - ChoiceButtonDialog, QuickNav, TopMessage, - UserNameDialog, ImageViewer, ActivityListItem, + RegistrationNotice, }, mixins: [PlatformServiceMixin], }) @@ -1643,67 +1620,6 @@ export default class HomeView extends Vue { return known ? "text-slate-500" : "text-slate-100"; } - /** - * Shows name input dialog if needed - * - * @public - * @callGraph - * Called by: Template - * Calls: - * - UserNameDialog.open() - * - promptForShareMethod() - * - * @chain - * Template -> showNameThenIdDialog() -> promptForShareMethod() - * - * @requires - * - this.$refs.userNameDialog - * - this.givenName - */ - showNameThenIdDialog() { - if (!this.givenName) { - (this.$refs.userNameDialog as UserNameDialog).open(() => { - this.promptForShareMethod(); - }); - } else { - this.promptForShareMethod(); - } - } - - /** - * Shows dialog for sharing method selection - * - * @internal - * @callGraph - * Called by: showNameThenIdDialog() - * Calls: ChoiceButtonDialog.open() - * - * @chain - * Template -> showNameThenIdDialog() -> promptForShareMethod() - * - * @requires - * - this.$refs.choiceButtonDialog - * - this.$router - */ - promptForShareMethod() { - (this.$refs.choiceButtonDialog as ChoiceButtonDialog).open({ - title: "How can you share your info?", - text: "", - option1Text: "We are in a meeting together", - option2Text: "We are nearby with cameras", - option3Text: "We will share some other way", - onOption1: () => { - this.$router.push({ name: "onboard-meeting-list" }); - }, - onOption2: () => { - this.handleQRCodeClick(); - }, - onOption3: () => { - this.$router.push({ name: "share-my-contact-info" }); - }, - }); - } - /** * Opens image viewer dialog * @@ -1716,14 +1632,6 @@ export default class HomeView extends Vue { this.isImageViewerOpen = true; } - private handleQRCodeClick() { - if (Capacitor.isNativePlatform()) { - this.$router.push({ name: "contact-qr-scan-full" }); - } else { - this.$router.push({ name: "contact-qr" }); - } - } - openPersonDialog( giver?: GiverReceiverInputInfo | "Unnamed", prompt?: string, -- 2.30.2 From 2cb2f3ef3a56977405d1b48fa2722dd3fe81a49c Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 21 Aug 2025 19:07:15 +0800 Subject: [PATCH 3/4] Fix: update notice locator --- test-playwright/00-noid-tests.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-playwright/00-noid-tests.spec.ts b/test-playwright/00-noid-tests.spec.ts index 5218c330..e4b874af 100644 --- a/test-playwright/00-noid-tests.spec.ts +++ b/test-playwright/00-noid-tests.spec.ts @@ -37,7 +37,7 @@ * Key Selectors: * - Activity list: 'ul#listLatestActivity li' * - Discover list: 'ul#listDiscoverResults li' - * - Account notices: '#noticeBeforeShare', '#noticeBeforeAnnounce' + * - Account notices: '#noticeBeforeShare', '#noticeSomeoneMustRegisterYou' * - Identity details: '#sectionIdentityDetails code.truncate' * * State Verification: @@ -99,7 +99,7 @@ test('Check no-ID messaging in account', async ({ page }) => { await page.goto('./account'); // Check 'a friend needs to register you' notice - await expect(page.locator('#noticeBeforeAnnounce')).toBeVisible(); + await expect(page.locator('#noticeSomeoneMustRegisterYou')).toBeVisible(); }); test('Check ability to share contact', async ({ page }) => { -- 2.30.2 From 25e79249dd4794296c550fb43b4b8fef34862531 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 21 Aug 2025 19:29:31 +0800 Subject: [PATCH 4/4] Feat: integrate RegistrationNotice component into ProjectsView - Replace custom onboarding button with RegistrationNotice component - Maintain v-else conditional rendering for unregistered users - Remove unused methods and imports related to custom registration flow - Use contextual message "To announce a project, get someone to onboard you." - Remove unnecessary wrapping div in RegistrationNotice Completes registration UI standardization across all main views. --- src/components/RegistrationNotice.vue | 42 +++++++------- src/views/ProjectsView.vue | 80 ++++----------------------- 2 files changed, 31 insertions(+), 91 deletions(-) diff --git a/src/components/RegistrationNotice.vue b/src/components/RegistrationNotice.vue index f7b32d65..19a8aa5d 100644 --- a/src/components/RegistrationNotice.vue +++ b/src/components/RegistrationNotice.vue @@ -5,30 +5,28 @@ access advanced options. * * @author Matthew Raymer * @version 1.0.0 * @created 2025-08-21T17:25:28-08:00 */