Commit b2e9e2d
authored
Reimplemented the whole passcode handeling logic implemented and the ability to change passcode. (#56)
* Refactor passcode management and introduce `PasscodeManager`
* Introduced `PasscodeManager`, `PasscodeStorageAdapter`, and `PasscodeAction` to provide a more robust state management system for passcode operations.
* Renamed `PasscodeEvent` to `PasscodeEvents` and `PasscodeState` to `PasscodeStates` to avoid naming collisions with new manager components.
* Added a `Change` step to the passcode utility and updated `PasscodeHeader` to support the change passcode flow.
* Updated `PasscodeSaver` with `resetPasscode` functionality and renamed callback parameters for clarity (`saveNewPasscode`, `clearCurrentPasscode`).
* Modified `SampleAppNavigation` and `HomeScreen` to support the "Change Passcode" feature.
* Added `.claude` to `.gitignore`.
* Imported `VisibilityOff` icon for use in passcode components.
* Refactor passcode management and UI configuration
* Replaced `PasscodeSaver` and `PasscodeRepository` with a new `PasscodeManager` and `PasscodeStorageAdapter` for improved state handling and persistence.
* Replaced custom `PreferenceDataStore` with `com.russhwolf.settings.Settings` throughout the shared module.
* Introduced `PasscodeScreenConfig.kt` containing data classes (`PasscodeAppearanceConfig`, `PasscodeLogoConfig`, etc.) to provide granular styling control for the passcode screen.
* Updated `PasscodeScreen` to use the new configuration classes and collect state from `PasscodeManager` via `collectAsStateWithLifecycle`.
* Refactored `PasscodeStep` and related logic to support a clearer state machine (Unset, Enter, Create, Confirm, ChangeVerify).
* Updated `SampleAppNavigation` and `HomeScreen` to integrate with the new `PasscodeManager` and action-based event handling.
* Removed unused components and files, including `PasscodeRepository.kt` and `PreferenceDataStore.kt`.
* Improved `PasscodeHeader` and button components to respond to the new `PasscodeStep` architecture.
* Clean up passcode logic and refactor build configurations
* Removed deprecated `PasscodeSaver.kt` and `Step.kt` in favor of the new `PasscodeManager` implementation.
* Updated `PasscodeScreen.kt` to handle `PasscodeEvent` updates and improved code formatting.
* Commented out `PasscodeStepIndicator` and `PasscodeToolbar` pending compatibility fixes with the new passcode logic.
* Added copyright headers and improved formatting in `PasscodeStorageAdapterImpl.kt` and `PasscodeManager.kt`.
* Standardized trailing commas and whitespace across multiple files in `cmp-sample-shared`.
* Removed unused imports in `PasscodeScreenConfig.kt`, `PasscodeHeader.kt`, and `SampleAppNavigation.kt`.
* Update passcode change flow and state management
* Added `confirm_old_passcode` string resource and integrated it into `PasscodeHeader` for the `ChangeVerify` step.
* Implemented unique animation transitions (offset, alpha, and scale) for the `ChangeVerify` header in `PasscodeHeader`.
* Renamed `clearState` to `clearStates` in `PasscodeManager` and ensured consistent calls across passcode handling methods.
* Fixed passcode builder logic in `PasscodeManager` to properly clear `creationPasscodeBuilder` and `finalConfirmationPasscodeBuilder` during the creation and verification flows.
* Updated `handleChangeVerifyPasscode` to transition to the `Create` step upon successful verification of the old passcode.
* Update .gitignore and PULL_REQUEST_TEMPLATE.md
* Removed `.claude` from `.gitignore`.
* Removed Jira ticket references and links from `PULL_REQUEST_TEMPLATE.md`.
* Updated the static analysis check instructions in the PR template to remove the reference to `ci-prepush.sh`.1 parent 8c311a9 commit b2e9e2d
20 files changed
Lines changed: 867 additions & 846 deletions
File tree
- .github
- mifos-authenticator-passcode/src/commonMain
- composeResources/values
- kotlin/org/mifos/authenticator/passcode
- components
- screen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 1 | | |
6 | 2 | | |
7 | 3 | | |
| |||
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
13 | | - | |
| 9 | + | |
14 | 10 | | |
15 | 11 | | |
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | | - | |
| 27 | + | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 51 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 54 | + | |
60 | 55 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
74 | 59 | | |
75 | 60 | | |
| 61 | + | |
| 62 | + | |
76 | 63 | | |
77 | 64 | | |
78 | 65 | | |
79 | 66 | | |
80 | | - | |
| 67 | + | |
81 | 68 | | |
82 | 69 | | |
83 | 70 | | |
84 | | - | |
85 | 71 | | |
86 | 72 | | |
87 | 73 | | |
| |||
115 | 101 | | |
116 | 102 | | |
117 | 103 | | |
118 | | - | |
| 104 | + | |
119 | 105 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 106 | | |
124 | 107 | | |
125 | 108 | | |
126 | 109 | | |
127 | 110 | | |
128 | 111 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 112 | | |
133 | 113 | | |
134 | 114 | | |
| |||
139 | 119 | | |
140 | 120 | | |
141 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
142 | 129 | | |
143 | 130 | | |
144 | 131 | | |
| |||
149 | 136 | | |
150 | 137 | | |
151 | 138 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
162 | 154 | | |
163 | 155 | | |
164 | 156 | | |
| |||
199 | 191 | | |
200 | 192 | | |
201 | 193 | | |
| 194 | + | |
202 | 195 | | |
| 196 | + | |
203 | 197 | | |
204 | 198 | | |
205 | 199 | | |
| |||
222 | 216 | | |
223 | 217 | | |
224 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
225 | 233 | | |
226 | 234 | | |
0 commit comments