136 Commits

Author SHA1 Message Date
44e4bd3218 refactor: Clean up UI components and improve JSON import/export
- Removed unused parameters and functions related to biometric protection and save/reset operations in AppShell.kt and AppDialogs.kt.
- Simplified logging and toast messages in JsonImportExportDialog.kt.
- Improved null safety and file output stream handling in JsonImportExportDialog.kt.
- Updated AndroidManifest.xml with target API level and tools namespace.
2025-11-06 22:18:49 +01:00
c2ea7c98ef refactor: Remove unused parameters and code in UI components - Cleaned up AppShell.kt, AppTopBar.kt, AppContent.kt, ShoppingListDetailScreen.kt, WebAppIntegrationScreen.kt, NoteDetailScreen.kt, ShoppingListsViewModel.kt, NotesViewModel.kt, RecipesViewModel.kt, and EncryptionPasswordDialog.kt by removing unused parameters, imports, and functions, and updating Base64 usage and shared preferences editing. 2025-11-06 20:51:11 +01:00
a10602c6a5 feat: Remove unused PatternInput.kt file
This commit removes the  file as the  Composable function was not used anywhere in the project.
2025-11-06 19:24:27 +01:00
62ff3594d4 chore: Commit remaining changes 2025-11-06 19:18:15 +01:00
a5bed3031a Refactor: Clean up unused code and fix warnings
This commit addresses several linter warnings and removes unused code to improve maintainability.

- Removed unused function  and property  in .
- Removed unused parameter  from , , and .
- Fixed a variable shadowing issue with  in .
- Inlined a redundant variable in .
2025-11-06 19:16:38 +01:00
20d9139256 Fix: Remove redundant explicit type argument in AppShell.kt 2025-11-06 17:28:20 +01:00
cf799eba12 Refactor: State management in AppShell.kt 2025-11-06 17:24:08 +01:00
fd04f9b5d9 fix: Restore Log import in AppDialogs
Restored the  import in  to fix an "Unresolved reference 'Log'" error that was introduced by a previous commit.
2025-11-06 15:42:10 +01:00
28cc1313b4 refactor: Remove unused Log import from AppDialogs
Removed the unused  import from  to clean up the code.
2025-11-06 15:39:33 +01:00
7c5c31c638 fix: Correct GuidedTourScreen after pager migration
Fixed the build errors in GuidedTourScreen.kt that occurred after migrating to androidx.compose.foundation.pager.
- Added pageCount to rememberPagerState.
- Removed count from HorizontalPager.
- Restored the R import.
2025-11-06 15:35:33 +01:00
12839ea88e refactor: Remove redundant 'jsonString != null' checks
Removed redundant 'if (jsonString != null)' checks in JsonImportExportDialog.kt as jsonString is always non-null at these points, addressing 'Condition is always true' warnings.
2025-11-06 14:53:29 +01:00
fb8e7917bc refactor: Migrate GuidedTourScreen to androidx.compose.foundation.pager
Migrated the GuidedTourScreen from deprecated Accompanist Pager to androidx.compose.foundation.pager.
Removed HorizontalPagerIndicator usage, as a direct replacement is not available and requires custom implementation.
2025-11-06 14:51:46 +01:00
4f0edbca22 refactor: Remove unused import from AppContent
Removed the unused  import from  to clean up the code.
2025-11-06 14:38:17 +01:00
7032420cb5 docs: Adjust screenshot order in README
Adjusted the order of screenshots in README.md and removed unnecessary empty lines for better readability.
2025-11-06 13:18:28 +01:00
43e500542e docs: Refactor screenshot section in README
Refactored the screenshot section in README.md to improve the layout and presentation of the images.
2025-11-06 12:23:01 +01:00
241f4a6539 docs: Update README screenshot descriptions
Updated the descriptions and titles for the screenshots in README.md to better reflect their content.
2025-11-06 12:18:59 +01:00
947b9fdd4c feat: Update README with new screenshots
Updated the README.md file to reflect the new screenshot paths and added the screenshots directory.
2025-11-06 10:23:34 +01:00
6e2b1945d2 feat: Add privacy policy and link in about screen 2025-11-05 21:52:27 +01:00
f2e5750269 chore: Clean up .gitignore and remove IDE files 2025-11-05 21:21:11 +01:00
2424068d59 Fix(encryption): Resolve startup password unlock issues
- Fixed `Unresolved reference` error for startup password dialog variables by correctly declaring them in `AppShell.kt`.
- Added missing German translations for encryption-related strings in `strings.xml`.
- Corrected `onUnlockEncryption` logic in `AppShell.kt` to properly handle password-based decryption, addressing the "Unlock failed" error.
- Ensured the app closes when the `StartupPasswordDialog` is cancelled in `AppDialogs.kt`.
- Prevented automatic biometric binding when setting an encryption password in `EncryptionPasswordDialog.kt`, allowing users to choose password-only encryption.
- Adjusted biometric prompt behavior in `AppShell.kt` to allow multiple fingerprint attempts before falling back to the password dialog.
2025-11-04 21:07:24 +01:00
9abec4e66a feat(security): Enhance password protection and fix lock state bugs
This commit introduces several improvements to the password protection feature for notes, recipes, and shopping lists.

- Password confirmation and visibility: When setting a password, the user is now prompted to enter it twice for confirmation. A visibility toggle has been added to both the set password and unlock dialogs to improve user experience.
- Differentiated unlock methods: The app now distinguishes between password and biometric protection. If an item is locked with a password, the app will directly prompt for the password instead of attempting biometric authentication first.
- Fixed disappearing lock icon: A bug was fixed where the lock icon would disappear after an item was unlocked and then edited. The lock state is now correctly preserved.
2025-11-04 13:18:45 +01:00
e9d5ff1cec Feat: Implementiert Navigation zum übergeordneten Verzeichnis nach dem Sperren und behebt die Anzeige des Schlosssymbols. 2025-11-04 11:23:06 +01:00
fdfbe339d8 Fix: Behebt den Absturz beim BiometricPrompt durch Entfernen des negativen Button-Textes. 2025-11-04 10:55:09 +01:00
6029da0ee5 refactor: Remove PIN lock and consolidate with pattern lock
- Removed the separate PIN lock functionality.
- Consolidated PIN lock related UI and logic into the pattern lock implementation.
- Deleted  and introduced .
- Updated , , and  to reflect these changes.
- Added  string resource.
2025-11-04 10:04:47 +01:00
1dbbab7b47 feat: Implement pattern lock and fix lock icon visibility
- Implement pattern lock functionality with a custom pattern input view.
- Fix an issue where the lock icon was only visible for password-locked items.
- Add missing German translations.
2025-11-03 16:00:14 +01:00
06d2b21a11 Feat: Implement new lock methods (Pattern, PIN)
This commit introduces new lock methods for notes, recipes, and shopping lists, allowing users to choose between Password, Biometric, Pattern, and PIN for item protection.

Changes include:
- Expanded `LockMethod` enum with `PATTERN` and `PIN`.
- Updated `ChooseLockMethodDialog` to display new lock options.
- Added `lockMethod` field to `Note`, `Recipe`, and `ShoppingList` data classes.
- Implemented database migration (version 9 to 10) to support the new `lockMethod` field.
- Modified `AppShell.kt` to correctly handle the selection of new lock methods.
- Created placeholder dialogs (`SetPatternDialog`, `SetPinDialog`) and ViewModel functions for future implementation of pattern and PIN entry UIs.
- Updated `AppTopBar.kt` to show the "Lock" option in the dropdown menu for all item types, triggering the `ChooseLockMethodDialog`.
2025-11-03 14:29:00 +01:00
de1d02f31b Fix: Resolve race condition when saving items
This commit fixes a bug that prevented new items (notes, recipes, and shopping lists) from being saved and existing items from being renamed.

The issue was caused by a race condition where the item details were being reset before the save operation could complete. This was due to a nested coroutine launch that caused the UI to update prematurely.

The fix involves:
- Removing the nested coroutine launch to ensure sequential execution of the save and UI reset operations.
- Moving the `reset...Details()` calls to the ViewModels to ensure they are only called after the save operation is complete.
2025-11-03 14:00:27 +01:00
f613e27c6d Fix: ShoppingList protection not applying
Updated the  function in  to directly accept  as a parameter. This ensures that the correct  is fetched from the repository and its protection status is updated, addressing the issue where protection was not being applied due to an incorrect or uninitialized  from the UI state.

Note: This commit also includes other uncommitted changes as requested by the user.
2025-11-02 21:20:18 +01:00
416f1e37aa fix(security): Implement persistent secret key for reliable re-locking
- Introduced a `SecretKeySaver` to persistently store the encryption `secretKey` across configuration changes using `rememberSaveable`.
- Ensured that the `secretKey` is updated in the `AppShell`'s state upon successful biometric authentication for unlocking notes, lists, and recipes.
- This addresses the bug where locked items could be bypassed due to the `secretKey` being lost on screen rotation or other configuration changes, leading to failed re-locking.
- This also resolves the issue where the unlock button for locked items would only work after an app restart.
2025-11-02 09:45:06 +01:00
e8a392aafc feat(security): Always require fingerprint to unlock items
- The biometric prompt will now always be shown when unlocking a shopping list, note, or recipe, regardless of other settings.
2025-11-02 09:16:12 +01:00
f41dbbe4ae fix: Resolve biometric prompt issues and screen rotation behavior
- Fixed an issue where the biometric prompt appeared twice when attempting to change the encryption password. The redundant prompt has been removed.
- Addressed an issue where the biometric prompt would reappear on screen rotation for locked notes, lists, and recipes. The unlock state now persists across configuration changes.
2025-11-02 08:34:28 +01:00
31d75abf48 feat(security): Require fingerprint for encryption password change
- The "Remove Encryption" button has been removed from the settings.
- Changing the encryption password now exclusively requires fingerprint authentication.
- This resolves a crash that occurred when device credential fallback was enabled with a negative button on the biometric prompt.

Also includes dependency updates.
2025-11-02 08:10:30 +01:00
34f4caeff2 feat: Improve JSON import error handling and logging
This commit introduces several improvements to the JSON import functionality:

- Enhanced error handling for both manual and automatic JSON imports in  and .
  - Implemented graceful fallback to unencrypted parsing if decryption fails.
  - Added specific error handling for  and generic  during JSON parsing.
  - Provided user-friendly Toast messages for import failures.
- Improved error logging in  for  when encrypted data is too short.
- Added missing string resources for import error messages and their German translations.
- Ensured correct placement of  resource to avoid duplicates and created missing .
- Added debug logging to show raw JSON strings before parsing for better diagnostics.

These changes make the import process more robust and provide clearer feedback to the user in case of corrupted or malformed import files.
2025-11-01 15:06:52 +01:00
c0d36e82f8 Fix: Compilation errors in MainActivity.kt
- Corrected 'Unresolved reference 'prefs'' by updating 'OnSharedPreferenceChangeListener' to use 'sharedPreferences' parameter.
- Reverted 'showDeleteConfirmationDialog' to 'var ... by remember' to resolve ''val' cannot be reassigned' and 'Assignment type mismatch' errors.
2025-11-01 12:23:03 +01:00
f9cbd3d2c3 Refactor: Code-Bereinigung und Kotlin-Update
- Entferne ungenutzte Funktionen und Parameter in ViewModels und Composable-Funktionen.
- Optimiere String-Manipulationen und Uri-Parsing.
- Aktualisiere die Kotlin-Version in libs.versions.toml.
- Füge neue Einträge zu .idea/dictionaries/project.xml hinzu und ignoriere neue .idea-Dateien.
2025-11-01 10:59:28 +01:00
9d2f0d4dd6 Feat: Make delete password optional for web app integration and translate messages. 2025-10-31 15:37:57 +01:00
5a64db4149 Fix: Folder recognition and UI update for sync folder selection 2025-10-31 15:11:09 +01:00
684fdb290a feat: Add guided tour feature
This commit introduces a guided tour feature to the app.

- A new  has been added to provide an introduction to the app's functionalities.
- A "Show Guided Tour" button has been added to the settings screen, allowing users to revisit the tour.
- Logic has been implemented to display the guided tour automatically on the first launch of the app.
- String resources for the guided tour have been added in both English and German.
- Accompanist Pager dependencies have been added to  for the tour's UI.
- Minor fixes to XML escaping in string resources have been applied.
2025-10-30 17:30:44 +01:00
2cd2e616d4 feat: Add reset functionality and localize Toast messages in WebAppIntegration
- Implemented a "Reset" button with a confirmation dialog in WebAppIntegrationScreen.
- Added resetWebAppIntegration() to WebAppIntegrationViewModel to clear stored credentials.
- Localized all Toast messages in WebAppIntegrationViewModel by using string resources.
- Added corresponding string resources and German translations.
2025-10-30 14:37:38 +01:00
2f36954c2a feat: Improve WebAppIntegrationScreen UI and scrollability
- Removed redundant Scaffold and TopAppBar from WebAppIntegrationScreen.
- Configured MainActivity's TopAppBar to show a back arrow for WebAppIntegrationScreen.
- Made WebAppIntegrationScreen content scrollable to improve usability in landscape mode.
2025-10-30 14:20:26 +01:00
de91d6e2de feat: Improve web app import and update about screen libraries
- Replaced "Import from Web App" TextButton with an IconButton (CloudDownload icon) in ShoppingListDetailScreen.
- Moved the web app import button to the TopAppBar in MainActivity, positioned left of the search icon for ShoppingListDetailScreen.
- Updated AboutScreen to include a more comprehensive list of used open-source libraries.
- Added corresponding string resources and German translations for the new library entries.
2025-10-30 14:06:44 +01:00
8e2ad2f0ec chore: Ignore sharelist directory
The `sharelist/` directory contains the web app, which is a separate project and should not be part of this repository.
2025-10-30 13:05:50 +01:00
557af7fd9a feat: Mark single item in web app
When an item was marked as done in the mobile app, all items were marked as done in the web app. This was because the `importItemsFromWebApp` function always marked all fetched items as processed on the server.

This commit fixes this by:
- Removing the call to `markItems` from `importItemsFromWebApp`.
- Adding a new function `markItemInWebApp` that is called when a single item is tapped, which correctly synchronizes the state of the single item with the web app.
2025-10-30 13:04:47 +01:00
8037489986 fix: Beheben des Deserialisierungsfehlers beim Web-App-Import
- Ändert die Datentypen für `is_standard` und `marked` in der `Item`-Datenklasse von `Boolean` auf `Int`, um sie an die API-Antwort (0/1) anzupassen.
- Verbessert die Importlogik, um das Hinzufügen doppelter Artikel zu verhindern.
2025-10-30 11:07:13 +01:00
16ba4f62ca feat: Web-App-Integration für geteilte Einkaufslisten implementieren
- Ersetzt die lokale `web-app` durch eine Client-Server-Architektur.
- Implementiert den `WebAppClient` für die Kommunikation mit dem neuen Web-API, einschließlich Authentifizierung, Abrufen und Ändern von Artikeln.
- Aktualisiert die ViewModels und das Repository, um den neuen Web-Client zu integrieren.
- Fügt die erforderlichen Netzwerkberechtigungen und String-Ressourcen hinzu.
- Das alte `web-app`-Verzeichnis wird entfernt.
2025-10-30 08:33:00 +01:00
e0b81837e1 feat: Implement web app integration functionality\n\nThis commit introduces the initial framework for integrating the Android app with a web application.\n\nKey changes include:\n- Added a new "Web App Integration" settings screen for configuring web app URL, username, password, and a deletion password.\n- Implemented secure storage and retrieval of web app credentials using FileEncryptor and SharedPreferences.\n- Integrated Ktor HTTP client for future web API communication.\n- Extended NoteshopRepository to include methods for testing web app connection, importing items, and deleting marked items.\n- Added an "Import from Web App" button to the shopping list detail screen.\n- Modified the "Remove completed items" functionality to trigger deletion of marked items in the web app. 2025-10-29 16:38:56 +01:00
be44321c99 chore(android): Commit existing uncommitted changes in MainActivity and strings.xml 2025-10-22 21:48:34 +02:00
fae079b77f feat(web-app): Implement standard item list and improved item adding logic (see diff for details) 2025-10-22 21:46:59 +02:00
312477ab19 Feat: Display selected sync folder in navigation drawer
Adds the currently selected sync folder path to the navigation drawer.

This provides users with clear feedback on which folder is configured for synchronization. The displayed path is shortened to `Parent / Child` for readability and to prevent layout issues.
2025-10-20 13:07:12 +02:00
6068833eba Fix: Prevent data loss when disabling encryption
Resolves a critical bug that caused permanent data loss of locked items when encryption was disabled.

The previous implementation deleted the encryption key without decrypting the data first. This commit introduces a safe-offboarding process:
- When disabling encryption, the user is now authenticated to retrieve the secret key.
- New `decryptAllLockedItems` functions in the ViewModels are called to decrypt all locked notes, recipes, and shopping lists across the app.
- Only after successful decryption is the key permanently deleted.

Additionally, this commit removes the last remnants of the old session-based unlocking logic and standardizes the auto-relock-on-exit behavior across all detail screens for a consistent user experience.
2025-10-20 12:11:11 +02:00