Commit a4236fa
committed
refactor: Extract Settings screen components and enhance UI
This commit refactors the `SettingsScreen` by extracting its UI components into separate, reusable composables within a new `components` package. This improves code organization, modularity, and maintainability.
The "Data & Privacy" section has been temporarily commented out, and the website link has been updated for better accuracy. Additionally, the `readableFileSize` utility now explicitly uses `Locale.US` to ensure consistent formatting.
### Key Changes:
* **Component Extraction (`presentation/screen/setting/components`):**
* `SettingsSection`: A wrapper for grouping related settings under a title.
* `PathSettingItem`: A card for displaying and managing a file path setting, including validation status, reset, and edit actions.
* `LinkSettingItem`: A clickable card for settings that link to external URLs.
* `SwitchSettingItem`: A card with a label, description, and a toggle switch.
* `SocialLinkButton`: A dedicated button for social media links.
* `PathPickerDialog`: A dialog for selecting directory paths, using `filekit` for the file picker UI.
* **UI & Logic Updates (`SettingsScreen.kt`):**
* The `SettingsScreen` now uses the newly extracted composable components, simplifying its structure.
* The "Data & Privacy" section, which contained the crash reporting toggle, has been commented out.
* The value for the "Website" link has been updated to the full URL.
* **Utility Enhancement (`Utils.kt`):**
* The `readableFileSize` function now uses `Locale.US` to ensure consistent decimal formatting across different system locales.1 parent 305b5a4 commit a4236fa
File tree
9 files changed
+497
-367
lines changed- composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer
- core/utility
- presentation/screen/setting
- components
- docs/favicon
9 files changed
+497
-367
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
0 commit comments