mainsail-crew / mainsail

Mainsail is the popular web interface for managing and controlling 3D printers with Klipper.
https://docs.mainsail.xyz
GNU General Public License v3.0
1.74k stars 376 forks source link

fix(Webcam): capitalize the connection state #2019

Closed meteyou closed 3 weeks ago

meteyou commented 2 months ago

Description

This PR capitalize in MediaMTX and Camera-Streamer the state in the output.

Related Tickets & Documents

none

Mobile & Desktop Screenshots/Recordings

none

[optional] Are there any post-deployment tasks we need to perform?

none

Summary by Sourcery

Capitalize the connection state output in the WebrtcCameraStreamer and WebrtcMediaMTX components to improve the user interface consistency.

Bug Fixes:

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request capitalizes the connection state in the output for MediaMTX and Camera-Streamer components. It modifies two Vue components to use a capitalize function for displaying the status.

File-Level Changes

Change Details Files
Capitalize the connection state in the output
  • Import the capitalize function from helpers
  • Add capitalize method to the component
  • Apply capitalize function to the status display
src/components/webcams/streamers/WebrtcCameraStreamer.vue
src/components/webcams/streamers/WebrtcMediaMTX.vue
Refactor WebrtcCameraStreamer component to use methods option
  • Move capitalize function to methods option in component decorator
  • Add capitalize property to the class
src/components/webcams/streamers/WebrtcCameraStreamer.vue

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.