@@ -15,12 +15,17 @@ import Messages from "@moonlight-mod/wp/componentEditor_messages";
1515
1616import { AuthenticationStore , PresenceStore , SessionsStore } from "@moonlight-mod/wp/common_stores" ;
1717
18- type Platforms = "desktop" | "mobile" | "web" | "embedded" | "unknown" ;
18+ const VrHeadsetIcon = ( Object . values (
19+ spacepack . findByCode ( "M8.46 8.64a1 1 0 0 1 1 1c0 .44-.3.8-.72.92l-.11.07c-.08.06-.2.19-.2.41a.99.99" ) [ 0 ] ?. exports
20+ ) ?. [ 0 ] ?? ( ( ) => { } ) ) as React . ComponentType < IconsProps > ;
21+
22+ type Platforms = "desktop" | "mobile" | "web" | "embedded" | "vr" | "unknown" ;
1923const IconsForPlatform : Record < Exclude < Platforms , "unknown" > , React . ComponentType < IconsProps > > = {
2024 desktop : ScreenIcon ,
2125 mobile : MobilePhoneIcon ,
2226 web : GlobeEarthIcon ,
23- embedded : GameControllerIcon
27+ embedded : GameControllerIcon ,
28+ vr : VrHeadsetIcon
2429} ;
2530
2631const { humanizeStatus } = spacepack . findByCode ( "humanizeStatus:" ) [ 0 ] . exports . ZP ;
@@ -71,11 +76,13 @@ export default function PlatformIcons({ user, extraClasses, configKey, size = "x
7176 for ( const platform of Object . keys ( platforms ) ) {
7277 const status = platforms [ platform ] ;
7378
79+ let platformName = `${ platform . charAt ( 0 ) . toUpperCase ( ) } ${ platform . slice ( 1 ) } ` ;
80+ if ( platform === "vr" ) platformName = "VR" ;
7481 const props = {
75- text : `${ humanizeStatus ( status , false ) } on ${ platform . charAt ( 0 ) . toUpperCase ( ) } ${ platform . slice ( 1 ) } ` ,
82+ text : `${ humanizeStatus ( status , false ) } ${ platform === "vr" ? "i" : "o" } n ${ platformName } ` ,
7683 key : `platform-icons-tooltip-${ platform } `
7784 } ;
78- const Icon = IconsForPlatform [ platform as Exclude < Platforms , "unknown" > ] ;
85+ const Icon = IconsForPlatform [ platform as Exclude < Platforms , "unknown" > ] ?? ( ( ) => { } ) ;
7986 const color = StatusColors [ status as Exclude < Statuses , "offline" | "invisible" > ] ;
8087
8188 elements . push (
0 commit comments