Skip to content

Normalize OS name to handel windows variants#50

Merged
me-shaon merged 1 commit intomainfrom
fix/gh-46-windows-logo-not-showing
Sep 17, 2025
Merged

Normalize OS name to handel windows variants#50
me-shaon merged 1 commit intomainfrom
fix/gh-46-windows-logo-not-showing

Conversation

@OmarFaruk-0x01
Copy link
Copy Markdown
Collaborator

@OmarFaruk-0x01 OmarFaruk-0x01 commented Sep 16, 2025

Fixing #46

Problem

The Windows logo was not displaying in the Operating System Card because there was a mismatch between how OS information was captured and displayed:

  • CaptureRequest trait saves specific Windows versions like "Windows 10", "Windows 7", "Windows XP", etc.
  • operating-systems.blade.php only matched exact strings and had no case for Windows variants

Solution

Updated the getOperatingSystemImage() function to properly handle all Windows operating system variants by:

  • Normalizing the OS string (remove spaces, convert to lowercase)
  • Adding a check for Windows variants using str_starts_with($normalizedOs, 'windows')

@OmarFaruk-0x01 OmarFaruk-0x01 self-assigned this Sep 16, 2025
@OmarFaruk-0x01 OmarFaruk-0x01 added the bug Something isn't working label Sep 16, 2025
@me-shaon me-shaon merged commit 5fbe3a5 into main Sep 17, 2025
18 checks passed
@me-shaon me-shaon deleted the fix/gh-46-windows-logo-not-showing branch September 21, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants