From cc86fe374f5930f253de712199c346dc45c57c34 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Sat, 5 Jul 2025 13:07:13 +0000 Subject: [PATCH] Extract LocationSearchSection as vue-facing-decorator component and integrate into AccountViewView - Created LocationSearchSection.vue using vue-facing-decorator (class-based, TypeScript, @Component, @Prop, @Emit). - Moved 'Location for Searches' UI and logic into the new component. - Replaced original location section markup in AccountViewView.vue with . - Passed isRegistered and searchAreaLabel props, and wired up @set-search-area event to a new placeholder openSearchAreaDialog() method. - Added placeholder openSearchAreaDialog() with a TODO for future implementation. - Ensured all linter errors are resolved and code is consistent with project conventions. --- src/components/LocationSearchSection.vue | 28 +++++++++++++++++++++++ src/views/AccountViewView.vue | 29 +++++++++++++++++++----- 2 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 src/components/LocationSearchSection.vue diff --git a/src/components/LocationSearchSection.vue b/src/components/LocationSearchSection.vue new file mode 100644 index 00000000..8bf41ce4 --- /dev/null +++ b/src/components/LocationSearchSection.vue @@ -0,0 +1,28 @@ + + + \ No newline at end of file diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 23d7521b..b5b444ed 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -151,12 +151,11 @@

Location for Searches

- - {{ isSearchAreasSet ? "Change" : "Set" }} Search Area… - + @@ -844,6 +843,7 @@ import UserNameDialog from "../components/UserNameDialog.vue"; import DataExportSection from "../components/DataExportSection.vue"; import IdentitySection from '@/components/IdentitySection.vue'; import RegistrationNotice from '@/components/RegistrationNotice.vue'; +import LocationSearchSection from '@/components/LocationSearchSection.vue'; import { AppString, DEFAULT_IMAGE_API_SERVER, @@ -899,6 +899,7 @@ const inputImportFileNameRef = ref(); DataExportSection, IdentitySection, RegistrationNotice, + LocationSearchSection, }, mixins: [PlatformServiceMixin], }) @@ -1709,5 +1710,21 @@ export default class AccountViewView extends Vue { // TODO: Implement share dialog logic this.notify.info('Share dialog not yet implemented.'); } + + get searchAreaLabel(): string { + // Return a string representing the current search area, or blank if not set + // Example: return this.searchAreaName || ''; + return this.isSearchAreasSet ? 'Custom Area Set' : ''; + } + + onSetSearchArea() { + // Call the existing logic for setting the search area, e.g., open the dialog + this.openSearchAreaDialog(); + } + + openSearchAreaDialog() { + // TODO: Implement search area dialog logic + this.notify.info('Search area dialog not yet implemented.'); + } }