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")
}
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

View file

@ -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[]