Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor getDeviceName() for readability #6319

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kepper104
Copy link

Refactored a long if-else into a cleaner, easier to extend mapping

Changes

  • Removed long if-else statement that maps the device type to a string; Added an easily readable and extensible mapping instead.
  • Added myself to CONTRIBUTORS.md ;)

Issues
No GitHub issue previously associated, found it on SonarCloud

Refactored a long if-else into a cleaner, easier to extend mapping
@kepper104 kepper104 requested a review from a team as a code owner November 14, 2024 14:27
@jellyfin-bot
Copy link
Collaborator

jellyfin-bot commented Nov 14, 2024

Cloudflare Pages deployment

Latest commit 049c8ed
Status ✅ Deployed!
Preview URL https://ba9aab0d.jellyfin-web.pages.dev
Type 🔀 Preview

View build logs

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint doesn't pass. Please fix all ESLint issues.

src/components/apphost.js Outdated Show resolved Hide resolved
src/components/apphost.js Outdated Show resolved Hide resolved
src/components/apphost.js Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@thornbill thornbill added the cleanup Cleanup of legacy code or code smells label Nov 21, 2024
@thornbill thornbill added this to the v10.11.0 milestone Nov 21, 2024
Renamed deviceMappings to BrowserName and moved it under the appName declaration as requested
Copy link

sonarcloud bot commented Nov 21, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Cleanup of legacy code or code smells
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants