Chore: formatting

This commit is contained in:
Pieter Vander Vennet 2023-05-07 23:54:31 +02:00
parent 867cb4dcfb
commit e99485d697
2 changed files with 22 additions and 23 deletions

View file

@ -154,12 +154,15 @@ export default class MoreScreen extends Combine {
]).SetClass("flex flex-col border border-gray-300 p-2 rounded-lg") ]).SetClass("flex flex-col border border-gray-300 p-2 rounded-lg")
} }
public static MatchesLayout(layout: { public static MatchesLayout(
layout: {
id: string id: string
title: any title: any
shortDescription: any shortDescription: any
keywords?: any[] keywords?: any[]
}, search: string): boolean { },
search: string
): boolean {
if (search === undefined) { if (search === undefined) {
return true return true
} }
@ -170,11 +173,7 @@ export default class MoreScreen extends Combine {
if (layout.id === "personal") { if (layout.id === "personal") {
return false return false
} }
const entitiesToSearch = [ const entitiesToSearch = [layout.shortDescription, layout.title, ...(layout.keywords ?? [])]
layout.shortDescription,
layout.title,
...(layout.keywords ?? []),
]
for (const entity of entitiesToSearch) { for (const entity of entitiesToSearch) {
if (entity === undefined) { if (entity === undefined) {
continue continue

View file

@ -9,7 +9,7 @@
import ProfessionalServicesButton from "./ProfessionalServicesButton.svelte" import ProfessionalServicesButton from "./ProfessionalServicesButton.svelte"
import ThemeButton from "./ThemeButton.svelte" import ThemeButton from "./ThemeButton.svelte"
import { LayoutInformation } from "../../Models/ThemeConfig/LayoutConfig" import { LayoutInformation } from "../../Models/ThemeConfig/LayoutConfig"
import MoreScreen from "./MoreScreen"; import MoreScreen from "./MoreScreen"
export let search: UIEventSource<string> export let search: UIEventSource<string>
export let themes: LayoutInformation[] export let themes: LayoutInformation[]