Skip to content

v1.0.4

Choose a tag to compare

@GGQQmax GGQQmax released this 19 Mar 01:45
· 40 commits to main since this release
18e7ef9
Enhance student ID management and implement barcode feature (#9)

* Update student ID management and display in settings

- Update `LoginWebView` to extract student ID from the page content (e.g., `.user-info` or `.navbar-text` selectors) and pass it to the success callback.
- Enhance `CourseRepository` to store, retrieve, and clear the student ID using DataStore.
- Update `SettingsScreen` to display the current Student ID above the logout button.
- Modify `ClassScheduleScreen` to save the extracted student ID upon successful login.

* Implement library barcode feature in `OtherScreen`

- Update `OtherScreen.kt` to include a "Library Barcode" list item that displays the user's student ID as a barcode.
- Implement a custom `Code39Barcode` Composable using `Canvas` to render Code39 formatted barcodes.
- Add an overlay UI with a `Surface` card to show the scannable barcode and student ID when the feature is activated.
- Integrate `CourseRepository` to fetch the `studentId` from the data store.

* Refactor library barcode feature into a standalone screen

- Relocate `OtherScreen.kt` to `app/dauphin/views/screens/other/` and refactor it to delegate barcode display to a new screen.
- Implement `BarcodeScreen.kt` to provide a dedicated, full-screen view for the library barcode with a white background for better scan reliability.
- Update `App.kt` to manage navigation state between the main navigation suite and the new `BarcodeScreen`.
- Replace the previous overlay-based barcode display with a Scaffold-based layout including a top app bar and back navigation.
- Use `OutlinedCard` and `Code39Barcode` in the new screen to display student ID information.

* Remove hardcoded white background from BarcodeScreen

- Update `BarcodeScreen.kt` to remove the hardcoded `Color.White` background from the main `Column` to allow for better theme integration.

* Update `BarcodeScreen` UI and `TopAppBar` configuration

- Set `windowInsets` to zero and update `containerColor` to use the surface color in `TopAppBar`.
- Reduce padding in the barcode container column from 12.dp to 6.dp for a more compact layout.