From 596f6059ced302c16a5d52484d65c22ba944654d Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Wed, 9 Jul 2025 07:03:36 +0000 Subject: [PATCH] refactor: extract long CSS classes to computed properties in ImageMethodDialog - Replace 20 long class strings with computed properties for better maintainability - Improve template readability and semantic structure - Centralize styling logic for consistent UI patterns - Maintain all existing functionality while improving code organization --- src/components/ImageMethodDialog.vue | 411 ++++++++++++++++++--------- src/constants/notifications.ts | 234 +++++++++++++++ src/views/NewEditProjectView.vue | 82 +++--- 3 files changed, 561 insertions(+), 166 deletions(-) diff --git a/src/components/ImageMethodDialog.vue b/src/components/ImageMethodDialog.vue index 69d9b860..49f58d0f 100644 --- a/src/components/ImageMethodDialog.vue +++ b/src/components/ImageMethodDialog.vue @@ -3,70 +3,30 @@

- Uploading Image… - {{ - crop ? "Crop Image" : "Preview Image" - }} - Upload Image - Add Photo + {{ dialogHeading }}

-
+
-
+
Camera preview not started. -
- - Note: This mobile browser may not support direct camera - access, or the app is treating it as a native app.
- Tip: Try using a desktop browser, or check if your browser - supports camera access for web apps.
- Developer: The platform detection logic may be skipping - camera preview for mobile browsers.
- Action: Review platformCapabilities.isMobile and - ensure web browsers on mobile are not treated as native apps. -
- - Tip: Your browser supports camera APIs, but the preview did - not start. Try refreshing the page or checking browser permissions. - -
-
- Error: {{ error || cameraStateMessage }} -
-
- Status: {{ cameraStateMessage || "Unknown reason." }} -
+
Status: {{ cameraFeedbackMessage }}