File tree Expand file tree Collapse file tree
resources/views/components/analytics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55@php
66 if (! function_exists (' getOperatingSystemImage' )) {
77 function getOperatingSystemImage ($os ): string {
8- $os = str_replace (' ' , ' ' , strtolower ($os ));
9- return match ($os ){
10- ' windows' => asset (' vendor/request-analytics/operating-systems/windows-logo.png' ),
8+ $normalizedOs = str_replace (' ' , ' ' , strtolower ($os ));
9+
10+ // Handle Windows variants (Windows 10, Windows 7, etc.)
11+ if (str_starts_with ($normalizedOs , ' windows' )) {
12+ return asset (' vendor/request-analytics/operating-systems/windows-logo.png' );
13+ }
14+
15+ return match ($normalizedOs ){
1116 ' linux' => asset (' vendor/request-analytics/operating-systems/linux.png' ),
1217 ' macos' , ' macosx' => asset (' vendor/request-analytics/operating-systems/mac-logo.png' ),
1318 ' android' => asset (' vendor/request-analytics/operating-systems/android-os.png' ),
You can’t perform that action at this time.
0 commit comments