Complete ProjectsView.vue Triple Migration Pattern with literal extraction

Apply full database migration (databaseUtil → PlatformServiceMixin), replace
raw SQL with service methods, migrate 3 notifications to helper methods.
Preserve 1 complex modal for advanced routing features while extracting
all literal strings to NOTIFY_CAMERA_SHARE_METHOD constant.

Add computed properties (offerTabClasses, projectTabClasses) to streamline
template logic and comprehensive JSDoc documentation for all methods.
Update migration templates to mandate literal extraction from complex modals.

ProjectsView.vue now appropriately incomplete: helper methods for simple
notifications, raw $notify preserved only where advanced features required.
This commit is contained in:
Matthew Raymer
2025-07-07 08:00:25 +00:00
parent 11e11cda26
commit d8fbed3873
6 changed files with 328 additions and 114 deletions

View File

@@ -95,25 +95,25 @@ import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
/**
* Import Account View Component
*
*
* Allows users to import existing identifiers using seed phrases:
* - Secure mnemonic phrase input with validation
* - Advanced options for custom derivation paths
* - Legacy uPort compatibility support
* - Test environment utilities for development
*
*
* Features:
* - Secure seed phrase import functionality
* - Custom derivation path configuration
* - Account erasure options for fresh imports
* - Development mode test utilities
* - Comprehensive error handling and validation
*
*
* Security Considerations:
* - Seed phrases are handled securely and not logged
* - Import process includes validation and error recovery
* - Advanced options are hidden by default
*
*
* @author Matthew Raymer
*/
@Component({
@@ -148,7 +148,7 @@ export default class ImportAccountView extends Vue {
/**
* Component initialization
*
*
* Loads account count and server settings for import configuration
* Uses PlatformServiceMixin for secure database access
*/
@@ -167,7 +167,7 @@ export default class ImportAccountView extends Vue {
/**
* Handles cancel button click
*
*
* Navigates back to previous view
*/
public onCancelClick() {
@@ -176,7 +176,7 @@ export default class ImportAccountView extends Vue {
/**
* Checks if running on production server
*
*
* @returns True if not on production server (enables test utilities)
*/
public isNotProdServer() {
@@ -185,11 +185,11 @@ export default class ImportAccountView extends Vue {
/**
* Imports identifier from mnemonic phrase
*
*
* Processes the mnemonic phrase with optional custom derivation path
* and account erasure options. Handles validation and error scenarios
* with appropriate user feedback.
*
*
* Error Handling:
* - Invalid mnemonic format validation
* - Import process failure recovery
@@ -209,12 +209,12 @@ export default class ImportAccountView extends Vue {
if (err == "Error: invalid mnemonic") {
this.notify.error(
"Please check your mnemonic and try again.",
TIMEOUTS.LONG
TIMEOUTS.LONG,
);
} else {
this.notify.error(
"Got an error creating that identifier.",
TIMEOUTS.LONG
TIMEOUTS.LONG,
);
}
}