forked from MapComplete/MapComplete
Chore: formatting
This commit is contained in:
parent
867cb4dcfb
commit
e99485d697
2 changed files with 22 additions and 23 deletions
|
@ -154,12 +154,15 @@ export default class MoreScreen extends Combine {
|
|||
]).SetClass("flex flex-col border border-gray-300 p-2 rounded-lg")
|
||||
}
|
||||
|
||||
public static MatchesLayout(layout: {
|
||||
public static MatchesLayout(
|
||||
layout: {
|
||||
id: string
|
||||
title: any
|
||||
shortDescription: any
|
||||
keywords?: any[]
|
||||
}, search: string): boolean {
|
||||
},
|
||||
search: string
|
||||
): boolean {
|
||||
if (search === undefined) {
|
||||
return true
|
||||
}
|
||||
|
@ -170,11 +173,7 @@ export default class MoreScreen extends Combine {
|
|||
if (layout.id === "personal") {
|
||||
return false
|
||||
}
|
||||
const entitiesToSearch = [
|
||||
layout.shortDescription,
|
||||
layout.title,
|
||||
...(layout.keywords ?? []),
|
||||
]
|
||||
const entitiesToSearch = [layout.shortDescription, layout.title, ...(layout.keywords ?? [])]
|
||||
for (const entity of entitiesToSearch) {
|
||||
if (entity === undefined) {
|
||||
continue
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import ProfessionalServicesButton from "./ProfessionalServicesButton.svelte"
|
||||
import ThemeButton from "./ThemeButton.svelte"
|
||||
import { LayoutInformation } from "../../Models/ThemeConfig/LayoutConfig"
|
||||
import MoreScreen from "./MoreScreen";
|
||||
import MoreScreen from "./MoreScreen"
|
||||
|
||||
export let search: UIEventSource<string>
|
||||
export let themes: LayoutInformation[]
|
||||
|
|
Loading…
Reference in a new issue