File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -514,10 +514,11 @@ export function useSearch(
514514 }
515515
516516 // Project types
517- if ( projectTypes . value . length === 1 ) {
518- parts . push ( `project_types = "${ projectTypes . value [ 0 ] } "` )
519- } else if ( projectTypes . value . length > 1 ) {
520- const quoted = projectTypes . value . map ( ( v ) => `"${ v } "` ) . join ( ', ' )
517+ const mappedProjectTypes = projectTypes . value . map ( mapProjectTypeToSearch )
518+ if ( mappedProjectTypes . length === 1 ) {
519+ parts . push ( `project_types = "${ mappedProjectTypes [ 0 ] } "` )
520+ } else if ( mappedProjectTypes . length > 1 ) {
521+ const quoted = mappedProjectTypes . map ( ( v ) => `"${ v } "` ) . join ( ', ' )
521522 parts . push ( `project_types IN [${ quoted } ]` )
522523 }
523524
@@ -754,6 +755,14 @@ export function useSearch(
754755 }
755756}
756757
758+ const PROJECT_TYPE_SEARCH_MAP : Partial < Record < ProjectType , string > > = {
759+ server : 'minecraft_java_server' ,
760+ }
761+
762+ function mapProjectTypeToSearch ( projectType : ProjectType ) : string {
763+ return PROJECT_TYPE_SEARCH_MAP [ projectType ] ?? projectType
764+ }
765+
757766function getEnvironmentFilterGroups ( client : boolean , server : boolean ) : string [ ] [ ] {
758767 const groups : string [ ] [ ] = [ ]
759768 if ( client && server ) {
You can’t perform that action at this time.
0 commit comments