fix: hidden theme link not working

This commit is contained in:
Robin van der Linde 2023-03-09 20:54:12 +01:00
parent e185606e73
commit d5e128b1ed
Signed by untrusted user: Robin-van-der-Linde
GPG key ID: 53956B3252478F0D
2 changed files with 6 additions and 7 deletions

View file

@ -27,7 +27,7 @@
$: knownThemes = hiddenThemes.filter((theme) => knownThemesId.includes(theme.id)) $: knownThemes = hiddenThemes.filter((theme) => knownThemesId.includes(theme.id))
</script> </script>
<ThemesList {search} {state} {onMainScreen} themes={knownThemes} isCustom={true} hideThemes={false}> <ThemesList {search} {state} {onMainScreen} themes={knownThemes} isCustom={false} hideThemes={false}>
<svelte:fragment slot="title"> <svelte:fragment slot="title">
<h3>{t.previouslyHiddenTitle.toString()}</h3> <h3>{t.previouslyHiddenTitle.toString()}</h3>
<p> <p>

View file

@ -8,7 +8,7 @@
import CustomGeneratorButton from "./CustomGeneratorButton.svelte" import CustomGeneratorButton from "./CustomGeneratorButton.svelte"
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"
export let search: UIEventSource<string> export let search: UIEventSource<string>
export let themes: LayoutInformation[] export let themes: LayoutInformation[]
@ -44,7 +44,7 @@
<slot name="title" /> <slot name="title" />
{#if onMainScreen} {#if onMainScreen}
<div class="md:grid md:grid-flow-row md:grid-cols-2 lg:grid-cols-3 gap-4"> <div class="md:grid md:grid-flow-row md:grid-cols-2 lg:grid-cols-3 gap-4">
{#if ($search === undefined || $search === "") && !isCustom} {#if ($search === undefined || $search === "") && !isCustom && hideThemes}
<CustomGeneratorButton userDetails={state.osmConnection.userDetails} /> <CustomGeneratorButton userDetails={state.osmConnection.userDetails} />
<ProfessionalServicesButton /> <ProfessionalServicesButton />
{/if} {/if}
@ -55,9 +55,9 @@
{/if} {/if}
{/each} {/each}
</div> </div>
{:else } {:else}
<div> <div>
{#if ($search === undefined || $search === "") && !isCustom} {#if ($search === undefined || $search === "") && !isCustom && hideThemes}
<CustomGeneratorButton userDetails={state.osmConnection.userDetails} /> <CustomGeneratorButton userDetails={state.osmConnection.userDetails} />
<ProfessionalServicesButton /> <ProfessionalServicesButton />
{/if} {/if}
@ -68,8 +68,7 @@
{/if} {/if}
{/each} {/each}
</div> </div>
{/if} {/if}
{#if filteredThemes.length == 0} {#if filteredThemes.length == 0}
<NoThemeResultButton {search} /> <NoThemeResultButton {search} />