Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Apr 11, 2024
1 parent aa4fdac commit b4c2eff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/addons/AddOnsNavigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
All
</SidebarItem>
<SidebarItem
active={active === "pinned"}
active={active === "active"}
href="/app/add-ons?active=true"
--hover="var(--orange-light)"
>
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/common/Empty.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
.container {
display: flex;
padding: 1.5rem;
flex: 1 0 0;
flex-direction: column;
align-items: center;
justify-content: center;
Expand Down
23 changes: 16 additions & 7 deletions src/routes/app/add-ons/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<script lang="ts">
import { goto } from "$app/navigation";
import { _ } from "svelte-i18n";
import { Hourglass24, Infinity16, Star16, StarFill16 } from "svelte-octicons";
import {
Hourglass24,
Infinity16,
Plug24,
Star16,
StarFill16,
} from "svelte-octicons";
import AddOnList from "@/addons/browser/AddOnList.svelte";
import Paginator from "@/common/Paginator.svelte";
Expand All @@ -16,6 +22,7 @@
import Error from "@/lib/components/common/Error.svelte";
import SidebarItem from "@/lib/components/sidebar/SidebarItem.svelte";
import Premium from "@/common/icons/Premium.svelte";
import ListItem from "@/addons/browser/AddOnListItem.svelte";
import AddOnsNavigation from "@/lib/components/addons/AddOnsNavigation.svelte";
export let data;
Expand Down Expand Up @@ -47,17 +54,17 @@
<Search slot="center" />
</PageToolbar>

{#if hasFilter("active")}
{#if active === "active"}
<aside class="pinned tip">
<div class="icon"><Pin size={1.75} /></div>
<p class="message">{$_("addonBrowserDialog.pinnedTip")}</p>
</aside>
{:else if hasFilter("featured")}
{:else if active === "featured"}
<aside class="featured tip">
<div class="icon"><Star size={1.75} /></div>
<p class="message">{$_("addonBrowserDialog.featuredTip")}</p>
</aside>
{:else if hasFilter("premium")}
{:else if active === "premium"}
<aside class="premium tip">
<div class="icon"><Credit badge size={1.75} /></div>
<p class="message">{$_("addonBrowserDialog.premiumTip")}</p>
Expand All @@ -66,9 +73,11 @@
{#await data.addons}
<Empty icon={Hourglass24}>Loading…</Empty>
{:then page}
<div class="list">
<AddOnList items={page.results} />
</div>
{#each page.results as addon}
<ListItem {addon} />
{:else}
<Empty icon={Plug24}>No Add-Ons Found</Empty>
{/each}
{:catch error}
<Error>{String(error)}</Error>
{/await}
Expand Down

0 comments on commit b4c2eff

Please sign in to comment.